diff --git a/tests/Uri/Retrievers/FileGetContentsTest.php b/tests/Uri/Retrievers/FileGetContentsTest.php index d8b4b45a..bd284f2c 100644 --- a/tests/Uri/Retrievers/FileGetContentsTest.php +++ b/tests/Uri/Retrievers/FileGetContentsTest.php @@ -26,28 +26,6 @@ public function testFetchFile() $this->assertNotEmpty($result); } - public function testFalseReturn() - { - $res = new FileGetContents(); - - $this->setExpectedException( - '\JsonSchema\Exception\ResourceNotFoundException', - 'JSON schema not found at http://example.com/false' - ); - $res->retrieve('http://example.com/false'); - } - - public function testFetchDirectory() - { - $res = new FileGetContents(); - - $this->setExpectedException( - '\JsonSchema\Exception\ResourceNotFoundException', - 'JSON schema not found at file:///this/is/a/directory/' - ); - $res->retrieve('file:///this/is/a/directory/'); - } - public function testContentType() { $res = new FileGetContents(); @@ -70,15 +48,3 @@ public function testCanHandleHttp301PermanentRedirect() } } } - -namespace JsonSchema\Uri\Retrievers -{ - function file_get_contents($uri) - { - switch ($uri) { - case 'http://example.com/false': return false; - case 'file:///this/is/a/directory/': return ''; - default: return \file_get_contents($uri); - } - } -}