public function FeedsFetcherResultTest::testGetFilePath in Feeds 7.2
@covers FeedsFetcherResult::getFilePath().
File
- tests/
FeedsFetcherResultTest.test, line 91
Class
- FeedsFetcherResultTest
- @coversDefaultClass FeedsFetcherResult @group feeds
Code
public function testGetFilePath() {
$file_path = $this->fetcherResult
->getFilePath();
// Assert that the file path starts with the in progress dir.
$this
->assertTrue(strpos($file_path, static::FEEDS_IN_PROGRESS_DIR) === 0, format_string('The file path starts with @path.', array(
'@path' => static::FEEDS_IN_PROGRESS_DIR,
)));
// Assert that the given file path exists.
$this
->assertTrue(file_exists($file_path), format_string('The file @file exists.', array(
'@file' => $file_path,
)));
// Assert that the file contains the raw result.
$this
->assertEqual($this->raw, file_get_contents($file_path));
}