Skip to content

Commit

Permalink
Merge pull request #1044 from spiral/feature/ignore-exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
spiralbot committed Jan 3, 2024
1 parent 777f77e commit b74733b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
1 change: 1 addition & 0 deletions src/Exception/ClientException/ServerErrorException.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/**
* HTTP 500 exception.
* @deprecated since v3.12
*/
class ServerErrorException extends ClientException
{
Expand Down
8 changes: 0 additions & 8 deletions tests/ExceptionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use Spiral\Http\Exception\ClientException\BadRequestException;
use Spiral\Http\Exception\ClientException\ForbiddenException;
use Spiral\Http\Exception\ClientException\NotFoundException;
use Spiral\Http\Exception\ClientException\ServerErrorException;
use Spiral\Http\Exception\ClientException\UnauthorizedException;

class ExceptionsTest extends TestCase
Expand Down Expand Up @@ -46,12 +45,6 @@ public function testUnauthorized(): void
$this->assertSame(401, $e->getCode());
}

public function testServerError(): void
{
$e = new ServerErrorException();
$this->assertSame(500, $e->getCode());
}

#[DataProvider('allExceptionsWithPreviousSet')]
public function testPreviousSetter(\Throwable $exception): void
{
Expand All @@ -63,7 +56,6 @@ public static function allExceptionsWithPreviousSet(): \Generator
yield [new Exception\ClientException\BadRequestException('', new \Exception())];
yield [new Exception\ClientException\ForbiddenException('', new \Exception())];
yield [new Exception\ClientException\NotFoundException('', new \Exception())];
yield [new Exception\ClientException\ServerErrorException('', new \Exception())];
yield [new Exception\ClientException\UnauthorizedException('', new \Exception())];
yield [new Exception\ClientException(0, '', new \Exception())];
yield [new Exception\DotNotFoundException('', 0, new \Exception())];
Expand Down

0 comments on commit b74733b

Please sign in to comment.