Add Branches and tags support stubs
This commit is contained in:
parent
8a20f5ec50
commit
4ca48af775
3 changed files with 6 additions and 9 deletions
|
|
@ -19,9 +19,9 @@ class Filter
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws FilterDecodeException
|
|
||||||
*
|
|
||||||
* @return Filter
|
* @return Filter
|
||||||
|
*
|
||||||
|
* @throws FilterDecodeException
|
||||||
*/
|
*/
|
||||||
public function setOrderDirection(string $orderDirection): self
|
public function setOrderDirection(string $orderDirection): self
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,10 @@
|
||||||
namespace Benzine\Exceptions;
|
namespace Benzine\Exceptions;
|
||||||
|
|
||||||
use Slim\Interfaces\ErrorRendererInterface;
|
use Slim\Interfaces\ErrorRendererInterface;
|
||||||
use Throwable;
|
|
||||||
|
|
||||||
class JsonErrorHandler implements ErrorRendererInterface
|
class JsonErrorHandler implements ErrorRendererInterface
|
||||||
{
|
{
|
||||||
public function __invoke(Throwable $exception, bool $displayErrorDetails): string
|
public function __invoke(\Throwable $exception, bool $displayErrorDetails): string
|
||||||
{
|
{
|
||||||
return json_encode([
|
return json_encode([
|
||||||
'error' => $exception->getMessage(),
|
'error' => $exception->getMessage(),
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ namespace Benzine\Tests\Traits;
|
||||||
|
|
||||||
use Benzine\App as BenzineApp;
|
use Benzine\App as BenzineApp;
|
||||||
use DI\Container;
|
use DI\Container;
|
||||||
use InvalidArgumentException;
|
|
||||||
use PHPUnit\Framework\MockObject\MockObject;
|
use PHPUnit\Framework\MockObject\MockObject;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
use Psr\Http\Message\ServerRequestInterface;
|
use Psr\Http\Message\ServerRequestInterface;
|
||||||
|
|
@ -12,7 +11,6 @@ use Psr\Http\Message\UriInterface;
|
||||||
use Slim\App as SlimApp;
|
use Slim\App as SlimApp;
|
||||||
use Slim\Factory\ServerRequestCreatorFactory;
|
use Slim\Factory\ServerRequestCreatorFactory;
|
||||||
use Slim\Psr7\Factory\ServerRequestFactory;
|
use Slim\Psr7\Factory\ServerRequestFactory;
|
||||||
use UnexpectedValueException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Container Trait.
|
* Container Trait.
|
||||||
|
|
@ -28,7 +26,7 @@ trait AppTestTrait
|
||||||
*
|
*
|
||||||
* @before
|
* @before
|
||||||
*
|
*
|
||||||
* @throws UnexpectedValueException
|
* @throws \UnexpectedValueException
|
||||||
*/
|
*/
|
||||||
protected function setupContainer(): void
|
protected function setupContainer(): void
|
||||||
{
|
{
|
||||||
|
|
@ -37,7 +35,7 @@ trait AppTestTrait
|
||||||
$container = $this->slimApp->getContainer();
|
$container = $this->slimApp->getContainer();
|
||||||
|
|
||||||
if ($container === null) {
|
if ($container === null) {
|
||||||
throw new UnexpectedValueException('Container must be initialized');
|
throw new \UnexpectedValueException('Container must be initialized');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->container = $container;
|
$this->container = $container;
|
||||||
|
|
@ -58,7 +56,7 @@ trait AppTestTrait
|
||||||
protected function mock(string $class): MockObject
|
protected function mock(string $class): MockObject
|
||||||
{
|
{
|
||||||
if (!class_exists($class)) {
|
if (!class_exists($class)) {
|
||||||
throw new InvalidArgumentException(sprintf('Class not found: %s', $class));
|
throw new \InvalidArgumentException(sprintf('Class not found: %s', $class));
|
||||||
}
|
}
|
||||||
|
|
||||||
$mock = $this->getMockBuilder($class)
|
$mock = $this->getMockBuilder($class)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue