25 lines
494 B
PHP
25 lines
494 B
PHP
<?php
|
|
|
|
namespace Tobyz\Tests\JsonApiServer;
|
|
|
|
use JsonApiPhp\JsonApi\Error;
|
|
use Tobyz\JsonApiServer\ErrorProviderInterface;
|
|
|
|
class MockException implements ErrorProviderInterface
|
|
{
|
|
public function getJsonApiErrors(): array
|
|
{
|
|
return [
|
|
new Error(
|
|
new Error\Title('Mock Error'),
|
|
new Error\Status($this->getJsonApiStatus())
|
|
)
|
|
];
|
|
}
|
|
|
|
public function getJsonApiStatus(): string
|
|
{
|
|
return '400';
|
|
}
|
|
}
|