public function FeedsWebTestBase::createImporterConfiguration in Feeds 8.2
Create an importer configuration.
Parameters
$name: The natural name of the feed.
$id: The persistent id of the feed.
$edit: Optional array that defines the basic settings for the feed in a format that can be posted to the feed's basic settings form.
19 calls to FeedsWebTestBase::createImporterConfiguration()
- FeedsCSVtoUsersTest::test in lib/
Drupal/ feeds/ Tests/ FeedsCSVtoUsersTest.php - Test node creation, refreshing/deleting feeds and feed items.
- FeedsFileFetcherTest::testPrivateFiles in lib/
Drupal/ feeds/ Tests/ FeedsFileFetcherTest.php - Test uploading private files.
- FeedsFileFetcherTest::testPublicFiles in lib/
Drupal/ feeds/ Tests/ FeedsFileFetcherTest.php - Test scheduling on cron.
- FeedsMapperConfigTest::test in lib/
Drupal/ feeds/ Tests/ FeedsMapperConfigTest.php - Basic test of mapping configuration.
- FeedsMapperDateMultipleTest::test in lib/
Drupal/ feeds/ Tests/ FeedsMapperDateMultipleTest.php - Testing import by loading a 4 item XML file.
File
- lib/
Drupal/ feeds/ Tests/ FeedsWebTestBase.php, line 176 - Common functionality for all Feeds tests.
Class
- FeedsWebTestBase
- Test basic Data API functionality.
Namespace
Drupal\feeds\TestsCode
public function createImporterConfiguration($name = 'Syndication', $id = 'syndication') {
// Create new feed configuration.
$this
->drupalGet('admin/structure/feeds');
$this
->clickLink('Add importer');
$edit = array(
'name' => $name,
'id' => $id,
);
$this
->drupalPost('admin/structure/feeds/create', $edit, 'Create');
// Assert message and presence of default plugins.
$this
->assertText('Your configuration has been created with default settings.');
$this
->assertPlugins($id, 'http', 'syndication', 'node');
// Per default attach to page content type.
$this
->setSettings($id, NULL, array(
'content_type' => 'page',
));
// Per default attached to article content type.
$this
->setSettings($id, 'node', array(
'bundle' => 'article',
));
}