public function testPauseResumeStatus() { $stopWatch = Stopwatch::create(); $this->assertFalse($stopWatch->wasStarted()); $this->assertFalse($stopWatch->isRunning()); $this->assertFalse($stopWatch->wasStopped()); $this->assertFalse($stopWatch->isPaused()); $stopWatch->start(); $this->assertTrue($stopWatch->wasStarted()); $this->assertTrue($stopWatch->isRunning()); $this->assertFalse($stopWatch->wasStopped()); $this->assertFalse($stopWatch->isPaused()); $stopWatch->pause(); $this->assertTrue($stopWatch->wasStarted()); $this->assertTrue($stopWatch->isRunning()); $this->assertFalse($stopWatch->wasStopped()); $this->assertTrue($stopWatch->isPaused()); $stopWatch->resume(); $this->assertTrue($stopWatch->wasStarted()); $this->assertTrue($stopWatch->isRunning()); $this->assertFalse($stopWatch->wasStopped()); $this->assertFalse($stopWatch->isPaused()); $stopWatch->pause(); $this->assertTrue($stopWatch->wasStarted()); $this->assertTrue($stopWatch->isRunning()); $this->assertFalse($stopWatch->wasStopped()); $this->assertTrue($stopWatch->isPaused()); $stopWatch->stop(); $this->assertTrue($stopWatch->wasStarted()); $this->assertFalse($stopWatch->isRunning()); $this->assertTrue($stopWatch->wasStopped()); $this->assertFalse($stopWatch->isPaused()); }