From c68fcae3d6bb43688cb682cea315049db649caf1 Mon Sep 17 00:00:00 2001 From: Christopher Georg Date: Fri, 8 Oct 2021 17:54:39 +0200 Subject: [PATCH 1/2] fix: test for phpunit 9 --- tests/Installer/CKEditorInstallerTest.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/Installer/CKEditorInstallerTest.php b/tests/Installer/CKEditorInstallerTest.php index 957da333..f6a49936 100644 --- a/tests/Installer/CKEditorInstallerTest.php +++ b/tests/Installer/CKEditorInstallerTest.php @@ -84,7 +84,12 @@ public function testInstallWithCustomBuild(): void public function testInstallWithCustomBuildWithInvalidVersion(): void { $this->expectException(\RuntimeException::class); - $this->expectExceptionMessageRegExp('/Specifying version for custom build is not supported/'); + + if(method_exists($this, 'expectExceptionMessageMatches')) { + $this->expectExceptionMessageMatches('/Specifying version for custom build is not supported/'); + } else { + $this->expectExceptionMessageRegExp('/Specifying version for custom build is not supported/'); + } $this->installer->install($options = ['release' => CKEditorInstaller::RELEASE_CUSTOM, 'custom_build_id' => '459c358ccf2e34f083e3c8847d3af23e', 'version' => '4.11.4']); } @@ -92,7 +97,12 @@ public function testInstallWithCustomBuildWithInvalidVersion(): void public function testInstallWithCustomBuildWithMissingId(): void { $this->expectException(\RuntimeException::class); - $this->expectExceptionMessageRegExp('/Custom build ID is not specified/'); + + if(method_exists($this, 'expectExceptionMessageMatches')) { + $this->expectExceptionMessageMatches('/Custom build ID is not specified/'); + } else { + $this->expectExceptionMessageRegExp('/Custom build ID is not specified/'); + } $this->installer->install($options = ['release' => CKEditorInstaller::RELEASE_CUSTOM]); } From 454bf9259edad6fbcb18f541250d7ad5fc24784f Mon Sep 17 00:00:00 2001 From: Christopher Georg Date: Fri, 8 Oct 2021 17:58:35 +0200 Subject: [PATCH 2/2] fix: test for phpunit 9 --- tests/Installer/CKEditorInstallerTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Installer/CKEditorInstallerTest.php b/tests/Installer/CKEditorInstallerTest.php index f6a49936..cc8025eb 100644 --- a/tests/Installer/CKEditorInstallerTest.php +++ b/tests/Installer/CKEditorInstallerTest.php @@ -85,7 +85,7 @@ public function testInstallWithCustomBuildWithInvalidVersion(): void { $this->expectException(\RuntimeException::class); - if(method_exists($this, 'expectExceptionMessageMatches')) { + if (method_exists($this, 'expectExceptionMessageMatches')) { $this->expectExceptionMessageMatches('/Specifying version for custom build is not supported/'); } else { $this->expectExceptionMessageRegExp('/Specifying version for custom build is not supported/'); @@ -98,7 +98,7 @@ public function testInstallWithCustomBuildWithMissingId(): void { $this->expectException(\RuntimeException::class); - if(method_exists($this, 'expectExceptionMessageMatches')) { + if (method_exists($this, 'expectExceptionMessageMatches')) { $this->expectExceptionMessageMatches('/Custom build ID is not specified/'); } else { $this->expectExceptionMessageRegExp('/Custom build ID is not specified/');