1 | <?php |
||
10 | class ToRespondWithMimeTypeExpectationTest extends \PHPUnit_Framework_TestCase |
||
11 | { |
||
12 | public function testExpectation() |
||
20 | |||
21 | public function testExpectationWithAllowedHttpErrors() |
||
29 | |||
30 | |||
31 | /** |
||
32 | * @expectedException Overwatch\ExpectationBundle\Exception\ExpectationFailedException |
||
33 | * @expectedExceptionMessage Expected http://someapi.test/endpoint.json to respond with mime type "application/json", actually responded "text/html" |
||
34 | */ |
||
35 | public function testExpectationFails() |
||
40 | |||
41 | /** |
||
42 | * @expectedException \InvalidArgumentException |
||
43 | * @expectedExceptionMessage The actual value provided is not a valid URL |
||
44 | */ |
||
45 | public function testExpectationWithInvalidUrl() |
||
50 | |||
51 | /** |
||
52 | * @expectedException \GuzzleHttp\Exception\RequestException |
||
53 | */ |
||
54 | public function testExpectationWithBadResponse() |
||
59 | |||
60 | private function createExpectationWithMockedResponse($resultMimeType, $httpCode = 200, $httpErrors = false) |
||
73 | } |
||
74 |