Skip to content

Commit

Permalink
Delete handling exception is a runtime exception
Browse files Browse the repository at this point in the history
  • Loading branch information
loic425 committed Mar 28, 2024
1 parent c5205cd commit 660d7dd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
namespace spec\Sylius\Component\Resource\Exception;

use PhpSpec\ObjectBehavior;
use Sylius\Resource\Exception\ExceptionInterface;
use Sylius\Resource\Exception\RuntimeException;

final class DeleteHandlingExceptionSpec extends ObjectBehavior
{
Expand All @@ -22,6 +24,16 @@ function it_extends_an_exception(): void
$this->shouldHaveType(\Exception::class);
}

function it_is_a_runtime_exception(): void
{
$this->shouldHaveType(RuntimeException::class);
}

function it_implements_exception_interface(): void
{
$this->shouldImplement(ExceptionInterface::class);
}

function it_has_a_message(): void
{
$this->getMessage()->shouldReturn('Ups, something went wrong during deleting a resource, please try again.');
Expand Down
2 changes: 1 addition & 1 deletion src/Component/src/Exception/DeleteHandlingException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace Sylius\Resource\Exception;

class DeleteHandlingException extends \Exception
class DeleteHandlingException extends RuntimeException
{
protected string $flash;

Expand Down

0 comments on commit 660d7dd

Please sign in to comment.