/** * UtilityTest::testFileExists() * * @covers ::fileExists * @return void */ public function testFileExists() { $res = Utility::fileExists('http://www.spiegel.de/static/sys/v10/icons/home_v2.png'); $this->assertTrue($res); $res = Utility::fileExists(Plugin::path('Tools') . 'tests' . DS . 'test_files' . DS . 'img' . DS . 'hotel.jpg'); $this->assertTrue($res); $res = Utility::fileExists('http://www.spiegel.de/static/sys/v10/icons/home_v2_inexistent.png'); $this->assertFalse($res); $res = Utility::fileExists(Plugin::path('Tools') . 'tests' . DS . 'test_files' . DS . 'img' . DS . 'fooooo.jpg'); $this->assertFalse($res); }