diff --git a/test/checking/phpunit.sh b/test/checking/phpunit.sh index 2cb646a..761e51f 100755 --- a/test/checking/phpunit.sh +++ b/test/checking/phpunit.sh @@ -1,4 +1,6 @@ -base="/storage/var/www/html/developers/clemens/core_data/php_libraries/trunk/"; +#!/usr/bin/env bash + +base="/storage/var/www/html/developers/clemens/core_data/composer-packages/CoreLibs-Composer-All/"; # -c phpunit.xml # --testdox # call with "t" to give verbose testdox output @@ -31,7 +33,7 @@ if [ ! -z "${2}" ] && [ -z "${php_bin}" ]; then esac; fi; -phpunit_call="${php_bin}${base}vendor/bin/phpunit ${opt_testdox} -c ${base}phpunit.xml ${base}4dev/tests/"; +phpunit_call="${php_bin}${base}vendor/bin/phpunit ${opt_testdox} -c ${base}phpunit.xml ${base}test/phpunit/"; ${phpunit_call}; diff --git a/test/phpunit/CoreLibsCombinedArrayHandlerTest.php b/test/phpunit/CoreLibsCombinedArrayHandlerTest.php index cd6a70f..1fac71a 100644 --- a/test/phpunit/CoreLibsCombinedArrayHandlerTest.php +++ b/test/phpunit/CoreLibsCombinedArrayHandlerTest.php @@ -712,12 +712,23 @@ final class CoreLibsCombinedArrayHandlerTest extends TestCase */ public function testArrayMergeRecursiveWarningA(): void { + set_error_handler( + static function (int $errno, string $errstr): never { + throw new Exception($errstr, $errno); + }, + E_USER_WARNING + ); + $arrays = func_get_args(); // first is expected warning $warning = array_shift($arrays); - $this->expectWarning(); - $this->expectWarningMessage($warning); + + // phpunit 10.0 compatible + $this->expectExceptionMessage(($warning)); + \CoreLibs\Combined\ArrayHandler::arrayMergeRecursive(...$arrays); + + restore_error_handler(); } /** diff --git a/test/phpunit/CoreLibsDBIOTest.php b/test/phpunit/CoreLibsDBIOTest.php index 8b4ba09..4c4dea3 100644 --- a/test/phpunit/CoreLibsDBIOTest.php +++ b/test/phpunit/CoreLibsDBIOTest.php @@ -3456,7 +3456,7 @@ final class CoreLibsDBIOTest extends TestCase 'id' => '51', 'error' => 'Max query call needs to be set to at least 1', // run:: can be +1 if called in set and not direct - 'source' => "/^main::run::run::run::run::run::run::(run::)?runBare::runTest::testDbErrorHandling::dbSetMaxQueryCall$/", + 'source' => "/^include::main::run::run::run::run::run::run::(run::)?runBare::runTest::testDbErrorHandling::dbSetMaxQueryCall$/", 'pg_error' => '', 'msg' => '', ] diff --git a/test/phpunit/CoreLibsDebugSupportTest.php b/test/phpunit/CoreLibsDebugSupportTest.php index 9bf2fef..e5bc52a 100644 --- a/test/phpunit/CoreLibsDebugSupportTest.php +++ b/test/phpunit/CoreLibsDebugSupportTest.php @@ -393,7 +393,7 @@ final class CoreLibsDebugSupportTest extends TestCase * Undocumented function * * @cover ::getCallerMethodList - * @testWith [["main", "run", "run", "run", "run", "run", "run", "runBare", "runTest", "testGetCallerMethodList"],["main", "run", "run", "run", "run", "run", "run", "run", "runBare", "runTest", "testGetCallerMethodList"]] + * @testWith [["main", "run", "run", "run", "run", "run", "run", "runBare", "runTest", "testGetCallerMethodList"],["include", "main", "run", "run", "run", "run", "run", "run", "run", "runBare", "runTest", "testGetCallerMethodList"]] * @testdox getCallerMethodList check if it returns $expected [$_dataName] * * @param array $expected diff --git a/test/phpunit/CoreLibsGetSystemTest.php b/test/phpunit/CoreLibsGetSystemTest.php index 26ea383..eef6aec 100644 --- a/test/phpunit/CoreLibsGetSystemTest.php +++ b/test/phpunit/CoreLibsGetSystemTest.php @@ -99,7 +99,7 @@ final class CoreLibsGetSystemTest extends TestCase 1 => 'phpunit', 2 => 'phpunit', // NOTE: this can change, so it is a regex check - 3 => "/^(\/?.*\/?)?www\/vendor\/bin\/phpunit$/", + 3 => "/^(\/?.*\/?)?vendor\/bin\/phpunit$/", ], 'some path with extension' => [ 0 => '/some/path/to/file.txt',