/** * @covers \Joomla\Profiler\Profiler::setStart * * @expectedException \RuntimeException */ public function testTheProfilerStartTimeAndMemoryCannotBeChangedIfAPointHasBeenMarked() { $time = microtime(true); $memory = memory_get_usage(false); $this->instance->mark('test'); $this->instance->setStart($time, $memory); }
/** * Tests the count method. * * @return void * * @covers \Joomla\Profiler\Profiler::count * @since 1.0 */ public function testCount() { $this->assertCount(0, $this->instance); $this->instance->mark('start'); $this->instance->mark('foo'); $this->instance->mark('end'); $this->assertCount(3, $this->instance); }
/** * Render the profiler output. * * @return string * * @since 1.0 */ public function renderProfile() { return $this->profiler->render(); }