public function feedsDrushTest::testImportUsingFileOption in Feeds 7.2
Tests an import using the file option.
File
- tests/
drush/ feedsDrushTest.php, line 92
Class
- feedsDrushTest
- Tests Drush integration for Feeds. Based on Drush 8.
Namespace
UnishCode
public function testImportUsingFileOption() {
// Perform an import.
$this
->execDrush('feeds-import', array(
'node',
), array(
'file' => $this
->getFeedsDir() . '/tests/feeds/content.csv',
));
// Ensure that two nodes were created.
$eval = "print db_query('SELECT COUNT(*) FROM {node}')->fetchField()";
$this
->execDrush('php-eval', array(
$eval,
));
$this
->assertEquals('2', $this
->getOutput());
}