示例#1
0
	/**
	 * Test the getHash method
	 */
	public function testGetHash() {
		$file = new \Core\Filestore\Backends\FileRemote($this->_testfile);

		// Download the file manually and check.
		$tmpfile = \Core\Filestore\Factory::File('tmp/test-fileremotetest-testgethash.dat');
		$tmpfile->putContents(file_get_contents($this->_testfile));

		$this->assertEquals(md5_file($tmpfile->getFilename()), $file->getHash());

		$tmpfile->delete();
	}