mirror of
https://github.com/friendica/friendica
synced 2025-04-27 01:10:14 +00:00
Fix wrong $this->assert...()
with `self::assert...()
This commit is contained in:
parent
b3e5621d37
commit
efaec26b1d
63 changed files with 1192 additions and 1192 deletions
|
@ -134,7 +134,7 @@ class ProfilerTest extends MockedTest
|
|||
$profiler->saveTimestamp($timestamp, $name, $function);
|
||||
}
|
||||
|
||||
$this->assertGreaterThanOrEqual(0, $profiler->get($name));
|
||||
self::assertGreaterThanOrEqual(0, $profiler->get($name));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -154,7 +154,7 @@ class ProfilerTest extends MockedTest
|
|||
$profiler->saveTimestamp($timestamp, $name);
|
||||
$profiler->reset();
|
||||
|
||||
$this->assertEquals(0, $profiler->get($name));
|
||||
self::assertEquals(0, $profiler->get($name));
|
||||
}
|
||||
|
||||
public function dataBig()
|
||||
|
@ -227,7 +227,7 @@ class ProfilerTest extends MockedTest
|
|||
foreach ($data as $perf => $items) {
|
||||
foreach ($items['functions'] as $function) {
|
||||
// assert that the output contains the functions
|
||||
$this->assertRegExp('/' . $function . ': \d+/', $output);
|
||||
self::assertRegExp('/' . $function . ': \d+/', $output);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -249,8 +249,8 @@ class ProfilerTest extends MockedTest
|
|||
|
||||
$profiler = new Profiler($configCache);
|
||||
|
||||
$this->assertFalse($profiler->isRendertime());
|
||||
$this->assertEmpty($profiler->getRendertimeString());
|
||||
self::assertFalse($profiler->isRendertime());
|
||||
self::assertEmpty($profiler->getRendertimeString());
|
||||
|
||||
$profiler->saveTimestamp(time(), 'network', 'test1');
|
||||
|
||||
|
@ -266,8 +266,8 @@ class ProfilerTest extends MockedTest
|
|||
|
||||
$profiler->update($config);
|
||||
|
||||
$this->assertFalse($profiler->isRendertime());
|
||||
$this->assertEmpty($profiler->getRendertimeString());
|
||||
self::assertFalse($profiler->isRendertime());
|
||||
self::assertEmpty($profiler->getRendertimeString());
|
||||
|
||||
$config->shouldReceive('get')
|
||||
->with('system', 'profiler')
|
||||
|
@ -282,9 +282,9 @@ class ProfilerTest extends MockedTest
|
|||
|
||||
$profiler->saveTimestamp(time(), 'database', 'test2');
|
||||
|
||||
$this->assertTrue($profiler->isRendertime());
|
||||
self::assertTrue($profiler->isRendertime());
|
||||
$output = $profiler->getRendertimeString();
|
||||
$this->assertRegExp('/test1: \d+/', $output);
|
||||
$this->assertRegExp('/test2: \d+/', $output);
|
||||
self::assertRegExp('/test1: \d+/', $output);
|
||||
self::assertRegExp('/test2: \d+/', $output);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue