diff --git a/tests/phpunit.xml b/tests/phpunit.xml index 0c5ad458a5..721c99ae25 100644 --- a/tests/phpunit.xml +++ b/tests/phpunit.xml @@ -1,30 +1,31 @@ - + - - functional/ - legacy/ - src/ + timeoutForLargeTests="900" + xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> + + functional/ + legacy/ + src/ - - + + .. - - ../config/ - ../doc/ - ../images/ - ../library/ - ../spec/ - ../tests/ - ../view/ - ../vendor/ - - - + + + ../config/ + ../doc/ + ../images/ + ../library/ + ../spec/ + ../tests/ + ../view/ + ../vendor/ + + diff --git a/tests/src/Core/Logger/AbstractLoggerTest.php b/tests/src/Core/Logger/AbstractLoggerTest.php index d85e754c3f..64ff1e79f2 100644 --- a/tests/src/Core/Logger/AbstractLoggerTest.php +++ b/tests/src/Core/Logger/AbstractLoggerTest.php @@ -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) diff --git a/tests/src/Core/Logger/WorkerLoggerTest.php b/tests/src/Core/Logger/WorkerLoggerTest.php index 39b217552f..bec08494bf 100644 --- a/tests/src/Core/Logger/WorkerLoggerTest.php +++ b/tests/src/Core/Logger/WorkerLoggerTest.php @@ -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() diff --git a/tests/src/Core/SystemTest.php b/tests/src/Core/SystemTest.php index f37d2a2937..8dc43f36f9 100644 --- a/tests/src/Core/SystemTest.php +++ b/tests/src/Core/SystemTest.php @@ -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() diff --git a/tests/src/Util/ProfilerTest.php b/tests/src/Util/ProfilerTest.php index 9a9492d172..6e0eb80f35 100644 --- a/tests/src/Util/ProfilerTest.php +++ b/tests/src/Util/ProfilerTest.php @@ -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); } }