From def39d0dd7a81a4af9ad68b62c9e9823fbc2b38e Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sat, 10 Aug 2019 12:31:32 +0200 Subject: Run Unit Tests against PHP 7.4 Bump PHPUnit version and fix unit test - Globals are handled differently and are persistent through tests - Tests without assertions are marked as risky: some of them are just meant to check that no error is raised. --- tests/config/ConfigPhpTest.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/config/ConfigPhpTest.php') diff --git a/tests/config/ConfigPhpTest.php b/tests/config/ConfigPhpTest.php index 67d878ce..fb91b51b 100644 --- a/tests/config/ConfigPhpTest.php +++ b/tests/config/ConfigPhpTest.php @@ -3,6 +3,10 @@ namespace Shaarli\Config; /** * Class ConfigPhpTest + * + * We run tests in separate processes due to the usage for $GLOBALS + * which are kept between tests. + * @runTestsInSeparateProcesses */ class ConfigPhpTest extends \PHPUnit\Framework\TestCase { -- cgit v1.2.3 From 8f60e1206e45e67c96a7630d4ff94e72fe875f09 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sat, 26 Sep 2020 15:08:39 +0200 Subject: Comply with PHPUnit V8: setup/teardown functions must return void --- tests/config/ConfigPhpTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/config/ConfigPhpTest.php') diff --git a/tests/config/ConfigPhpTest.php b/tests/config/ConfigPhpTest.php index fb91b51b..a9aa80f5 100644 --- a/tests/config/ConfigPhpTest.php +++ b/tests/config/ConfigPhpTest.php @@ -15,7 +15,7 @@ class ConfigPhpTest extends \PHPUnit\Framework\TestCase */ protected $configIO; - public function setUp() + protected function setUp(): void { $this->configIO = new ConfigPhp(); } -- cgit v1.2.3 From a5a9cf23acd1248585173aa32757d9720b5f2d62 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Tue, 29 Sep 2020 14:41:40 +0200 Subject: Compatibility with PHPUnit 9 --- tests/config/ConfigPhpTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/config/ConfigPhpTest.php') diff --git a/tests/config/ConfigPhpTest.php b/tests/config/ConfigPhpTest.php index a9aa80f5..7bf9fe64 100644 --- a/tests/config/ConfigPhpTest.php +++ b/tests/config/ConfigPhpTest.php @@ -8,7 +8,7 @@ namespace Shaarli\Config; * which are kept between tests. * @runTestsInSeparateProcesses */ -class ConfigPhpTest extends \PHPUnit\Framework\TestCase +class ConfigPhpTest extends \Shaarli\TestCase { /** * @var ConfigPhp -- cgit v1.2.3