Refactored Http.

This commit is contained in:
Dmitry Khomutov 2018-03-04 17:22:14 +07:00
commit 1fdf9a7ab1
No known key found for this signature in database
GPG key ID: EC19426474B37AAC
19 changed files with 48 additions and 42 deletions

View file

@ -10,13 +10,13 @@ class WebhookControllerTest extends \PHPUnit\Framework\TestCase
{
$webController = new WebhookController(
$this->prophesize('PHPCensor\Config')->reveal(),
$this->prophesize('b8\Http\Request')->reveal(),
$this->prophesize('b8\Http\Response')->reveal()
$this->prophesize('PHPCensor\Http\Request')->reveal(),
$this->prophesize('PHPCensor\Http\Response')->reveal()
);
$error = $webController->handleAction('test', []);
self::assertInstanceOf('b8\Http\Response\JsonResponse', $error);
self::assertInstanceOf('PHPCensor\Http\Response\JsonResponse', $error);
$responseData = $error->getData();
self::assertEquals(500, $responseData['code']);