Skip to content

Commit

Permalink
OXDEV-8489: Add ModuleActivationBlockedExceptionTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelOxid committed Aug 15, 2024
1 parent 1056fcb commit 450882f
Showing 1 changed file with 31 additions and 0 deletions.
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()
);
}
}

0 comments on commit 450882f

Please sign in to comment.