/** * @test */ public function cannot_check_exists_on_invalid_file() { $resource = new URLResource('file:///please/dont/create/this/path/so/this/test/will/work'); $this->assertFalse($resource->exists()); }
public function __construct() { // You can use resource right from your own code. $resource = new URLResource('http://www.google.com'); var_dump(fread($resource->getStream(), 1000)); }