Skip to content

Commit

Permalink
OXDEV-8216: Revert added deactivationException test;
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelOxid committed Aug 12, 2024
1 parent 8299ccb commit d2f3018
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
8 changes: 0 additions & 8 deletions tests/Unit/Module/Exception/ModuleActivationExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,4 @@ public function testActivationException(): void
$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());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
*/
final class ModuleDeactivationExceptionTest extends TestCase
{
public function testException(): void
public function testDeactivationException(): void
{
$exception = new ModuleDeactivationException();

$this->assertInstanceOf(ModuleDeactivationException::class, $exception);
$this->assertSame(ModuleDeactivationException::EXCEPTION_MESSAGE, $exception->getMessage());
$this->assertSame('An error occurred while deactivating the module.', $exception->getMessage());
}
}
5 changes: 2 additions & 3 deletions tests/Unit/Module/Service/ModuleActivationsServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public function testModuleActivationAndDeactivationExceptions(
->willThrowException(new \Exception());

$this->expectException($exceptionClass);
$this->expectExceptionMessage($exceptionClass::EXCEPTION_MESSAGE);

$sut = $this->getSut(
moduleActivationBridge: $moduleActivationBridgeMock
Expand All @@ -82,13 +81,13 @@ public static function exceptionDataProvider(): \Generator
{
yield 'test activate module throws exception' => [
'method' => 'activate',
'exceptionClass' => ModuleActivationException::class,
'exceptionClass' => ModuleActivationException::class

];

yield 'test deactivate module throws exception' => [
'method' => 'deactivate',
'exceptionClass' => ModuleDeactivationException::class,
'exceptionClass' => ModuleDeactivationException::class

];
}
Expand Down

0 comments on commit d2f3018

Please sign in to comment.