diff --git a/tests/tests/_data/dump.sql b/tests/tests/_data/dump.sql deleted file mode 100644 index 4bc742c..0000000 --- a/tests/tests/_data/dump.sql +++ /dev/null @@ -1 +0,0 @@ -/* Replace this file with actual dump of your database */ \ No newline at end of file diff --git a/tests/tests/_data/fixtures/Sparkles-12543.mp4 b/tests/tests/_data/fixtures/Sparkles-12543.mp4 new file mode 100644 index 0000000..25b1873 Binary files /dev/null and b/tests/tests/_data/fixtures/Sparkles-12543.mp4 differ diff --git a/tests/tests/acceptance/BasicTestCest.php b/tests/tests/acceptance/BasicTestCest.php index f5d9145..c9a7c09 100644 --- a/tests/tests/acceptance/BasicTestCest.php +++ b/tests/tests/acceptance/BasicTestCest.php @@ -1,6 +1,7 @@ didNotReceiveRequestsInRemoteService(); $I->seeRemoteServiceReceived(0, A::getRequest()); } + + public function shouldCreateAnExpectationWithBinaryResponseTest(AcceptanceTester $I) + { + $responseContents = file_get_contents(Configuration::dataDir() . '/fixtures/Sparkles-12543.mp4'); + $I->expectARequestToRemoteServiceWithAResponse( + Phiremock::on( + A::getRequest()->andUrl(Is::equalTo('/show-me-the-video')) + )->then( + Respond::withStatusCode(200)->andBinaryBody($responseContents) + ) + ); + + $responseBody = file_get_contents('http://localhost:18080/show-me-the-video'); + $I->assertEquals($responseContents, $responseBody); + } }