* initial commit
* get list of activities * get activity by id
This commit is contained in:
22
test/AppTest/Action/PingActionTest.php
Normal file
22
test/AppTest/Action/PingActionTest.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace AppTest\Action;
|
||||
|
||||
use App\Action\PingAction;
|
||||
use Zend\Diactoros\Response;
|
||||
use Zend\Diactoros\ServerRequest;
|
||||
|
||||
class PingActionTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testResponse()
|
||||
{
|
||||
$pingAction = new PingAction();
|
||||
$response = $pingAction(new ServerRequest(['/']), new Response(), function () {
|
||||
});
|
||||
$json = json_decode((string) $response->getBody());
|
||||
|
||||
$this->assertTrue($response instanceof Response);
|
||||
$this->assertTrue($response instanceof Response\JsonResponse);
|
||||
$this->assertTrue(isset($json->ack));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user