mirror of
https://github.com/friendica/friendica
synced 2025-04-27 01:10:14 +00:00
adding test
This commit is contained in:
parent
107293bd61
commit
466f7a0ee5
2 changed files with 34 additions and 2 deletions
|
@ -177,5 +177,25 @@ class ProfilerTest extends MockedTest
|
|||
}
|
||||
|
||||
$profiler->saveLog($this->logger, 'test');
|
||||
|
||||
$output = $profiler->getRendertimeString();
|
||||
|
||||
foreach ($data as $perf => $items) {
|
||||
foreach ($items['functions'] as $function) {
|
||||
// assert that the output contains the functions
|
||||
$this->assertRegExp('/' . $function . ': \d+/', $output);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if no rendertime is set
|
||||
*/
|
||||
public function testNoRenderTime()
|
||||
{
|
||||
$profiler = new Profiler(true, false);
|
||||
|
||||
$this->assertFalse($profiler->isRendertime());
|
||||
self::assertEmpty($profiler->getRendertimeString());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue