Skip to content

Commit

Permalink
Bump sebastian/diff from 4.0.3 to 4.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot-preview[bot] authored and lcobucci committed Oct 26, 2020
1 parent f3ca51c commit 25a0c04
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 20 deletions.
18 changes: 9 additions & 9 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions tests/Handler/CreateAndFetchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use Psr\Http\Message\ServerRequestInterface;
use Ramsey\Uuid\Uuid;
use Ramsey\Uuid\UuidInterface;
use stdClass;

/** @coversDefaultClass \Chimera\Routing\Handler\CreateAndFetch */
final class CreateAndFetchTest extends TestCase
Expand Down Expand Up @@ -85,7 +86,7 @@ public function handleShouldExecuteTheCommandAndReturnAnEmptyResponse(): void
self::assertInstanceOf(UnformattedResponse::class, $response);
self::assertSame(StatusCodeInterface::STATUS_CREATED, $response->getStatusCode());
self::assertSame('/testing/' . $this->id, $response->getHeaderLine('Location'));
self::assertSame([ExecuteQuery::class => 'query'], $response->getAttributes());
self::assertSame([ExecuteQuery::class => stdClass::class], $response->getAttributes());
self::assertSame('result', $response->getUnformattedContent());
}

Expand Down Expand Up @@ -126,15 +127,15 @@ public function handleShouldPreserveTheRequestGeneratedIdIfAlreadyPresent(): voi
self::assertInstanceOf(UnformattedResponse::class, $response);
self::assertSame(StatusCodeInterface::STATUS_CREATED, $response->getStatusCode());
self::assertSame('/testing/' . $this->id, $response->getHeaderLine('Location'));
self::assertSame([ExecuteQuery::class => 'query'], $response->getAttributes());
self::assertSame([ExecuteQuery::class => stdClass::class], $response->getAttributes());
self::assertSame('result', $response->getUnformattedContent());
}

private function handleRequest(ServerRequestInterface $request): ResponseInterface
{
$handler = new CreateAndFetch(
new ExecuteCommand($this->bus, $this->creator, 'command'),
new ExecuteQuery($this->bus, $this->creator, 'query'),
new ExecuteCommand($this->bus, $this->creator, stdClass::class),
new ExecuteQuery($this->bus, $this->creator, stdClass::class),
new ResponseFactory(),
'info',
$this->uriGenerator,
Expand Down
3 changes: 2 additions & 1 deletion tests/Handler/CreateOnlyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Psr\Http\Message\ServerRequestInterface;
use Ramsey\Uuid\Uuid;
use Ramsey\Uuid\UuidInterface;
use stdClass;

/** @coversDefaultClass \Chimera\Routing\Handler\CreateOnly */
final class CreateOnlyTest extends TestCase
Expand Down Expand Up @@ -124,7 +125,7 @@ public function handleShouldPreserveTheRequestGeneratedIdIfAlreadyPresent(): voi
private function handleRequest(ServerRequestInterface $request): ResponseInterface
{
$handler = new CreateOnly(
new ExecuteCommand($this->bus, $this->creator, 'command'),
new ExecuteCommand($this->bus, $this->creator, stdClass::class),
new ResponseFactory(),
'info',
$this->uriGenerator,
Expand Down
7 changes: 4 additions & 3 deletions tests/Handler/ExecuteAndFetchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Lcobucci\ContentNegotiation\UnformattedResponse;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use stdClass;

/** @coversDefaultClass \Chimera\Routing\Handler\ExecuteAndFetch */
final class ExecuteAndFetchTest extends TestCase
Expand Down Expand Up @@ -42,8 +43,8 @@ public function createDependencies(): void
public function handleShouldExecuteTheCommandAndReturnAnEmptyResponse(): void
{
$handler = new ExecuteAndFetch(
new ExecuteCommand($this->bus, $this->creator, 'command'),
new ExecuteQuery($this->bus, $this->creator, 'query'),
new ExecuteCommand($this->bus, $this->creator, stdClass::class),
new ExecuteQuery($this->bus, $this->creator, stdClass::class),
new ResponseFactory()
);

Expand All @@ -63,7 +64,7 @@ public function handleShouldExecuteTheCommandAndReturnAnEmptyResponse(): void

self::assertInstanceOf(UnformattedResponse::class, $response);
self::assertSame(StatusCodeInterface::STATUS_OK, $response->getStatusCode());
self::assertSame([ExecuteQuery::class => 'query'], $response->getAttributes());
self::assertSame([ExecuteQuery::class => stdClass::class], $response->getAttributes());
self::assertSame('result', $response->getUnformattedContent());
}
}
3 changes: 2 additions & 1 deletion tests/Handler/ExecuteOnlyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Lcobucci\ContentNegotiation\UnformattedResponse;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use stdClass;

/** @coversDefaultClass \Chimera\Routing\Handler\ExecuteOnly */
final class ExecuteOnlyTest extends TestCase
Expand Down Expand Up @@ -41,7 +42,7 @@ public function createDependencies(): void
public function handleShouldExecuteTheCommandAndReturnAnEmptyResponse(): void
{
$handler = new ExecuteOnly(
new ExecuteCommand($this->bus, $this->creator, 'command'),
new ExecuteCommand($this->bus, $this->creator, stdClass::class),
new ResponseFactory(),
StatusCodeInterface::STATUS_NO_CONTENT
);
Expand Down
5 changes: 3 additions & 2 deletions tests/Handler/FetchOnlyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Lcobucci\ContentNegotiation\UnformattedResponse;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use stdClass;

/** @coversDefaultClass \Chimera\Routing\Handler\FetchOnly */
final class FetchOnlyTest extends TestCase
Expand Down Expand Up @@ -41,7 +42,7 @@ public function createDependencies(): void
public function handleShouldExecuteTheQueryAndReturnItsContent(): void
{
$handler = new FetchOnly(
new ExecuteQuery($this->bus, $this->creator, 'query'),
new ExecuteQuery($this->bus, $this->creator, stdClass::class),
new ResponseFactory()
);

Expand All @@ -60,7 +61,7 @@ public function handleShouldExecuteTheQueryAndReturnItsContent(): void

self::assertInstanceOf(UnformattedResponse::class, $response);
self::assertSame(StatusCodeInterface::STATUS_OK, $response->getStatusCode());
self::assertSame([ExecuteQuery::class => 'query'], $response->getAttributes());
self::assertSame([ExecuteQuery::class => stdClass::class], $response->getAttributes());
self::assertSame('result', $response->getUnformattedContent());
}
}

0 comments on commit 25a0c04

Please sign in to comment.