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/PluginManagerTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/PluginManagerTest.php') diff --git a/tests/PluginManagerTest.php b/tests/PluginManagerTest.php index 3018999c..38cd5eba 100644 --- a/tests/PluginManagerTest.php +++ b/tests/PluginManagerTest.php @@ -6,7 +6,7 @@ use Shaarli\Config\ConfigManager; /** * Unit tests for Plugins */ -class PluginManagerTest extends \PHPUnit\Framework\TestCase +class PluginManagerTest extends \Shaarli\TestCase { /** * Path to tests plugin. -- cgit v1.2.3 From ab58f2542072e6bf34acd862f6cfed84b33feb29 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Tue, 29 Sep 2020 15:00:11 +0200 Subject: Compatibility with PHP 8 --- tests/PluginManagerTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/PluginManagerTest.php') diff --git a/tests/PluginManagerTest.php b/tests/PluginManagerTest.php index 38cd5eba..bbd2e142 100644 --- a/tests/PluginManagerTest.php +++ b/tests/PluginManagerTest.php @@ -81,8 +81,8 @@ class PluginManagerTest extends \Shaarli\TestCase $data = []; $this->pluginManager->executeHooks('error', $data); - $this->assertSame( - 'test [plugin incompatibility]: Class \'Unknown\' not found', + $this->assertMatchesRegularExpression( + '/test \[plugin incompatibility\]: Class [\'"]Unknown[\'"] not found/', $this->pluginManager->getErrors()[0] ); } -- cgit v1.2.3 From d246e2c5129fe8d3f8e1429b4e8ff8e3e486c779 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Tue, 29 Sep 2020 18:49:02 +0200 Subject: Use assertRegExp polyfill instead of regexMatches --- tests/PluginManagerTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/PluginManagerTest.php') diff --git a/tests/PluginManagerTest.php b/tests/PluginManagerTest.php index bbd2e142..efef5e87 100644 --- a/tests/PluginManagerTest.php +++ b/tests/PluginManagerTest.php @@ -1,4 +1,5 @@ pluginManager->executeHooks('error', $data); - $this->assertMatchesRegularExpression( + $this->assertRegExp( '/test \[plugin incompatibility\]: Class [\'"]Unknown[\'"] not found/', $this->pluginManager->getErrors()[0] ); -- cgit v1.2.3