diff --git a/application/symfony/tests/Unit/Domain/ActionManagement/Read/AbstractActionTest.php b/application/symfony/tests/Unit/Domain/ActionManagement/Read/AbstractActionTest.php new file mode 100644 index 0000000..5197920 --- /dev/null +++ b/application/symfony/tests/Unit/Domain/ActionManagement/Read/AbstractActionTest.php @@ -0,0 +1,57 @@ +actionService = $this->createMock(ActionServiceInterface::class); + $this->action = new class($this->actionService) extends AbstractAction { + public $isSecure; + public $validByForm; + + protected function isSecure(): bool + { + return $this->isSecure; + } + + protected function isValidByForm(): bool + { + return $this->validByForm; + } + + protected function proccess() + { + } + }; + } + + public function testNotValidByFormException(): void + { + $this->action->isSecure = true; + $this->action->validByForm = false; + $this->expectException(NotValidByFormException::class); + $this->action->execute(); + } +}