mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-27 08:18:24 +03:00
Renamed JsonErrorHandler to JsonErrorResponseGenerator
This commit is contained in:
parent
cd47aae902
commit
288249d0b8
3 changed files with 7 additions and 7 deletions
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
use Shlinkio\Shlink\Rest\ErrorHandler\JsonErrorHandler;
|
||||
use Shlinkio\Shlink\Rest\ErrorHandler\JsonErrorResponseGenerator;
|
||||
|
||||
return [
|
||||
|
||||
'error_handler' => [
|
||||
'plugins' => [
|
||||
'invokables' => [
|
||||
'application/json' => JsonErrorHandler::class,
|
||||
'application/json' => JsonErrorResponseGenerator::class,
|
||||
],
|
||||
'aliases' => [
|
||||
'application/x-json' => 'application/json',
|
||||
|
|
|
@ -8,7 +8,7 @@ use Psr\Http\Message\ServerRequestInterface as Request;
|
|||
use Zend\Diactoros\Response\JsonResponse;
|
||||
use Zend\Expressive\Router\RouteResult;
|
||||
|
||||
class JsonErrorHandler implements ErrorResponseGeneratorInterface, StatusCodeInterface
|
||||
class JsonErrorResponseGenerator implements ErrorResponseGeneratorInterface, StatusCodeInterface
|
||||
{
|
||||
/**
|
||||
* Final handler for an application.
|
|
@ -2,20 +2,20 @@
|
|||
namespace ShlinkioTest\Shlink\Rest\ErrorHandler;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Shlinkio\Shlink\Rest\ErrorHandler\JsonErrorHandler;
|
||||
use Shlinkio\Shlink\Rest\ErrorHandler\JsonErrorResponseGenerator;
|
||||
use Zend\Diactoros\Response;
|
||||
use Zend\Diactoros\ServerRequestFactory;
|
||||
|
||||
class JsonErrorHandlerTest extends TestCase
|
||||
class JsonErrorResponseGeneratorTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var JsonErrorHandler
|
||||
* @var JsonErrorResponseGenerator
|
||||
*/
|
||||
protected $errorHandler;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->errorHandler = new JsonErrorHandler();
|
||||
$this->errorHandler = new JsonErrorResponseGenerator();
|
||||
}
|
||||
|
||||
/**
|
Loading…
Reference in a new issue