Power Monitor
Fake Power Monitor#
Example test case#
Copied!
use Native\Desktop\Facades\PowerMonitor; #[\PHPUnit\Framework\Attributes\Test]public function example(): void{ PowerMonitor::fake(); $this->get('/whatever-action'); PowerMonitor::assertGetSystemIdleState('...');}
Available assertions#
assertGetSystemIdleStateassertGetSystemIdleStateCountassertGetSystemIdleTimeCountassertGetCurrentThermalStateCountassertIsOnBatteryPowerCount
NativePHP
Bring your
Laravel
skills to
mobile apps.
NativePHP Ultra
All NativePHP plugins, teams & priority support from
$35/mo
Learn More
The Vibes
The unofficial Laracon US
Day 3
Grab Your Spot
Only 100 tickets!
The Masterclass
Go from zero to
published app
in no time
in no time
Learn More
Early Bird Pricing