public function testStartStopMeasurement() { $alwaysSample = 0; $backend = self::createBackend(); $backend->expects($this->once())->method('storeMeasurement'); \QafooLabs\Profiler::start('foo', $alwaysSample); \QafooLabs\Profiler::setTransactionName(__CLASS__ . '::' . __METHOD__); $this->assertFalse(\QafooLabs\Profiler::isProfiling()); $this->assertTrue(\QafooLabs\Profiler::isStarted()); \QafooLabs\Profiler::stop(); $this->assertFalse(\QafooLabs\Profiler::isProfiling()); $this->assertFalse(\QafooLabs\Profiler::isStarted()); }