* initial commit

This commit is contained in:
Danyi Dávid
2018-05-02 11:01:38 +02:00
commit ff2721f67c
39 changed files with 5308 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<?php
declare(strict_types=1);
namespace AppTest\Handler;
use App\Handler\PingHandler;
use PHPUnit\Framework\TestCase;
use Psr\Http\Message\ServerRequestInterface;
use Zend\Diactoros\Response\JsonResponse;
class PingHandlerTest extends TestCase
{
public function testResponse()
{
$pingHandler = new PingHandler();
$response = $pingHandler->handle(
$this->prophesize(ServerRequestInterface::class)->reveal()
);
$json = json_decode((string) $response->getBody());
$this->assertInstanceOf(JsonResponse::class, $response);
$this->assertTrue(isset($json->ack));
}
}