/** * Render the profiler output. * * @return \stdClass * * @since 1.0 */ private function getProfile() { $points = $this->profiler->getPoints(); $pointStart = $points[0]->getName(); $pointEnd = $points[count($points) - 1]->getName(); $profile = new \stdClass(); $profile->peak = $this->profiler->getMemoryBytesBetween($pointStart, $pointEnd); $profile->time = $this->profiler->getTimeBetween($pointStart, $pointEnd); return $profile; }
/** * @covers \Joomla\Profiler\Profiler::getPoints */ public function testTheProfilerReturnsTheMarkedPoints() { $this->assertEmpty($this->instance->getPoints()); }
/** * Tests the getPoints method. * * @return void * * @covers \Joomla\Profiler\Profiler::getPoints * @since 1.0 */ public function testGetPoints() { TestHelper::setValue($this->instance, 'points', false); $this->assertFalse($this->instance->getPoints()); }