You are here

public function FeedsWebTestBase::importFile in Feeds 8.2

Import a file through the import form. Assumes FeedsFileFetcher in place.

7 calls to FeedsWebTestBase::importFile()
FeedsCSVtoUsersTest::test in lib/Drupal/feeds/Tests/FeedsCSVtoUsersTest.php
Test node creation, refreshing/deleting feeds and feed items.
FeedsMapperDateMultipleTest::test in lib/Drupal/feeds/Tests/FeedsMapperDateMultipleTest.php
Testing import by loading a 4 item XML file.
FeedsMapperDateTest::test in lib/Drupal/feeds/Tests/FeedsMapperDateTest.php
Basic test loading a single entry CSV file.
FeedsMapperFieldTest::test in lib/Drupal/feeds/Tests/FeedsMapperFieldTest.php
Basic test loading a double entry CSV file.
FeedsMapperPathTest::testNodeAlias in lib/Drupal/feeds/Tests/FeedsMapperPathTest.php
Basic test loading a single entry CSV file.

... See full list

File

lib/Drupal/feeds/Tests/FeedsWebTestBase.php, line 359
Common functionality for all Feeds tests.

Class

FeedsWebTestBase
Test basic Data API functionality.

Namespace

Drupal\feeds\Tests

Code

public function importFile($id, $file) {
  $this
    ->assertTrue(file_exists($file), 'Source file exists');
  $edit = array(
    'files[feeds]' => $file,
  );
  $this
    ->drupalPost('import/' . $id, $edit, 'Import');
}