public function testStartStopProfile() { $alwaysSample = 100; $backend = self::createBackend(); $backend->expects($this->once())->method('storeProfile'); \QafooLabs\Profiler::start('foo', $alwaysSample); \QafooLabs\Profiler::setTransactionName(__CLASS__ . '::' . __METHOD__); $this->assertTrue(\QafooLabs\Profiler::isProfiling()); $this->assertTrue(\QafooLabs\Profiler::isStarted()); $this->assertEquals(22, strlen(\QafooLabs\Profiler::getProfileTraceUuid())); \QafooLabs\Profiler::stop(); $this->assertFalse(\QafooLabs\Profiler::isProfiling()); $this->assertFalse(\QafooLabs\Profiler::isStarted()); }