-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OXDEV-8489: Add ModuleActivationBlockedExceptionTest.php
- Loading branch information
1 parent
1056fcb
commit 450882f
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
tests/Unit/Module/Exception/ModuleActivationBlockedExceptionTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright © OXID eSales AG. All rights reserved. | ||
* See LICENSE file for license details. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace OxidEsales\GraphQL\ConfigurationAccess\Tests\Unit\Module\Exception; | ||
|
||
use OxidEsales\GraphQL\ConfigurationAccess\Module\Exception\ModuleActivationBlockedException; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
/** | ||
* @covers \OxidEsales\GraphQL\ConfigurationAccess\Module\Exception\ModuleActivationBlockedException | ||
*/ | ||
final class ModuleActivationBlockedExceptionTest extends TestCase | ||
{ | ||
public function testException(): void | ||
{ | ||
$moduleId = uniqid(); | ||
$exception = new ModuleActivationBlockedException($moduleId); | ||
|
||
$this->assertInstanceOf(ModuleActivationBlockedException::class, $exception); | ||
$this->assertSame( | ||
sprintf('Module "%s" is in the blocklist and cannot be activated.', $moduleId), | ||
$exception->getMessage() | ||
); | ||
} | ||
} |