mirror of
https://github.com/friendica/friendica
synced 2024-12-22 19:20:17 +00:00
Replace assertRegExp() assertMatchesRegularExpression()
This commit is contained in:
parent
f4907a48d8
commit
015de29b7b
4 changed files with 7 additions and 7 deletions
|
@ -31,7 +31,7 @@ abstract class AbstractLoggerTest extends MockedTest
|
|||
{
|
||||
use LoggerDataTrait;
|
||||
|
||||
const LOGLINE = '/.* \[.*\]: .* \{.*\"file\":\".*\".*,.*\"line\":\d*,.*\"function\":\".*\".*,.*\"uid\":\".*\".*}/';
|
||||
const LOGLINE = '/.* \[.*]: .* {.*\"file\":\".*\".*,.*\"line\":\d*,.*\"function\":\".*\".*,.*\"uid\":\".*\".*}/';
|
||||
|
||||
const FILE = 'test';
|
||||
const LINE = 666;
|
||||
|
@ -72,7 +72,7 @@ abstract class AbstractLoggerTest extends MockedTest
|
|||
|
||||
public function assertLogline($string)
|
||||
{
|
||||
self::assertRegExp(self::LOGLINE, $string);
|
||||
self::assertMatchesRegularExpression(self::LOGLINE, $string);
|
||||
}
|
||||
|
||||
public function assertLoglineNums($assertNum, $string)
|
||||
|
|
|
@ -29,7 +29,7 @@ class WorkerLoggerTest extends MockedTest
|
|||
{
|
||||
private function assertUid($uid)
|
||||
{
|
||||
self::assertRegExp('/^[a-zA-Z0-9]{' . WorkerLogger::WORKER_ID_LENGTH . '}+$/', $uid);
|
||||
self::assertMatchesRegularExpression('/^[a-zA-Z0-9]{' . WorkerLogger::WORKER_ID_LENGTH . '}+$/', $uid);
|
||||
}
|
||||
|
||||
public function dataTest()
|
||||
|
|
|
@ -42,7 +42,7 @@ class SystemTest extends TestCase
|
|||
private function assertGuid($guid, $length, $prefix = '')
|
||||
{
|
||||
$length -= strlen($prefix);
|
||||
self::assertRegExp("/^" . $prefix . "[a-z0-9]{" . $length . "}?$/", $guid);
|
||||
self::assertMatchesRegularExpression("/^" . $prefix . "[a-z0-9]{" . $length . "}?$/", $guid);
|
||||
}
|
||||
|
||||
public function testGuidWithoutParameter()
|
||||
|
|
|
@ -229,7 +229,7 @@ class ProfilerTest extends MockedTest
|
|||
foreach ($data as $perf => $items) {
|
||||
foreach ($items['functions'] as $function) {
|
||||
// assert that the output contains the functions
|
||||
self::assertRegExp('/' . $function . ': \d+/', $output);
|
||||
self::assertMatchesRegularExpression('/' . $function . ': \d+/', $output);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -286,7 +286,7 @@ class ProfilerTest extends MockedTest
|
|||
|
||||
self::assertTrue($profiler->isRendertime());
|
||||
$output = $profiler->getRendertimeString();
|
||||
self::assertRegExp('/test1: \d+/', $output);
|
||||
self::assertRegExp('/test2: \d+/', $output);
|
||||
self::assertMatchesRegularExpression('/test1: \d+/', $output);
|
||||
self::assertMatchesRegularExpression('/test2: \d+/', $output);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue