コード例 #1
0
 function testRemotefile404()
 {
     $http_mock = $this->getHttpMock();
     $http_mock->expectOnce('download', array($this->url, $this->tmpfile));
     $http_mock->setReturnValue('download', array('code' => 404, 'body' => false));
     $fproxy = new binarypool_fileobject($this->url, $http_mock);
     $this->assertFalse($fproxy->exists());
     $this->assertEqual($fproxy->isRemote(), true);
 }