fetch('http://notexisting.example.com'); $this->assertSame(false, $content); } public function testEmptyUrl() { $fetcher = new CurlFetcher(); $content = $fetcher->fetch(''); $this->assertSame(false, $content); } public function testValidUrl() { $fetcher = new CurlFetcher(); $content = $fetcher->fetch('http://httpbin.org/html'); $this->assertContains('Herman Melville', $content); } }