/** * @group Phpreboot_Stopwatch_StopWatch_stop */ public function testStopWatchCanBeStopped() { $this->assertSame(Timer::STATE_NOT_STARTED, $this->stopWatch->getWatch()->getState(), "StopWatch timer state is not correct."); $this->assertTrue($this->stopWatch->start(), "StopWatch could not be started"); $this->assertSame(Timer::STATE_STARTED, $this->stopWatch->getWatch()->getState(), "StopWatch timer state is not correct after start."); $this->assertTrue($this->stopWatch->stop(), "StopWatch could not be stopped"); $this->assertSame(Timer::STATE_STOPPED, $this->stopWatch->getWatch()->getState(), "StopWatch timer state is not correct after stop."); }