/** * Get md5 sum for the package * @param Feed $feed * @return string */ public function getMd5(Feed $feed) { $fullChecksum = $this->download($feed->getChecksumUrl()); // we got smth like "5776cbd0a95637ade4b2c0d8694d8fca -" //strip trailing space & dash return substr($fullChecksum, 0, 32); }
/** * @dataProvider feedFileNameProvider */ public function testGetDowngetDownloadedFileName($feedData, $filename) { $feed = new Feed($feedData); $this->assertEquals($filename, $feed->getDownloadedFileName()); }