diff --git a/src/Module/Exception/ModuleActivationException.php b/src/Module/Exception/ModuleActivationException.php index 5178b8a..ccc51f9 100644 --- a/src/Module/Exception/ModuleActivationException.php +++ b/src/Module/Exception/ModuleActivationException.php @@ -13,7 +13,7 @@ final class ModuleActivationException extends NotFound { - public const EXCEPTION_MESSAGE = "An error occurred while activating the module."; + private const EXCEPTION_MESSAGE = "An error occurred while activating the module."; public function __construct() { diff --git a/src/Module/Exception/ModuleDeactivationException.php b/src/Module/Exception/ModuleDeactivationException.php index 68fc0b8..553084c 100644 --- a/src/Module/Exception/ModuleDeactivationException.php +++ b/src/Module/Exception/ModuleDeactivationException.php @@ -13,7 +13,7 @@ final class ModuleDeactivationException extends NotFound { - public const EXCEPTION_MESSAGE = "An error occurred while deactivating the module."; + private const EXCEPTION_MESSAGE = "An error occurred while deactivating the module."; public function __construct() { diff --git a/tests/Unit/Module/Exception/ModuleActivationExceptionTest.php b/tests/Unit/Module/Exception/ModuleActivationExceptionTest.php index 554366e..5598cc3 100644 --- a/tests/Unit/Module/Exception/ModuleActivationExceptionTest.php +++ b/tests/Unit/Module/Exception/ModuleActivationExceptionTest.php @@ -10,6 +10,7 @@ namespace OxidEsales\GraphQL\ConfigurationAccess\Tests\Unit\Module\Exception; use OxidEsales\GraphQL\ConfigurationAccess\Module\Exception\ModuleActivationException; +use OxidEsales\GraphQL\ConfigurationAccess\Module\Exception\ModuleDeactivationException; use PHPUnit\Framework\TestCase; /** @@ -17,11 +18,19 @@ */ final class ModuleActivationExceptionTest extends TestCase { - public function testException(): void + public function testActivationException(): void { $exception = new ModuleActivationException(); $this->assertInstanceOf(ModuleActivationException::class, $exception); $this->assertSame('An error occurred while activating the module.', $exception->getMessage()); } + + public function testDeactivationException(): void + { + $exception = new ModuleDeactivationException(); + + $this->assertInstanceOf(ModuleDeactivationException::class, $exception); + $this->assertSame('An error occurred while deactivating the module.', $exception->getMessage()); + } }