public function FeedsTamperWebTestCase::testBasic in Feeds Tamper 6
Same name and namespace in other branches
- 7 tests/feeds_tamper.test \FeedsTamperWebTestCase::testBasic()
File
- tests/feeds_tamper.test, line 145
- Tests for feeds_tamper.module.
Class
- FeedsTamperWebTestCase
- Simple tests for api functionality.
Code
public function testBasic() {
$this
->createImporterConfiguration();
$this
->addMappings('syndication', array(
array(
'source' => 'title',
'target' => 'title',
),
array(
'source' => 'guid',
'target' => 'guid',
'unique' => TRUE,
),
array(
'source' => 'description',
'target' => 'body',
),
));
$this
->setSettings('syndication', 'FeedsNodeProcessor', array(
'update_existing' => 1,
));
$settings = array(
'mode' => 0,
);
$id = $this
->addTamperPlugin('syndication', 'title', 'convert_case', $settings);
$nid = $this
->createFeedNode();
$this
->assertUppercaseDevseedFeedContent();
$this
->disableTamperPlugin($id);
$this
->drupalPost('node/' . $nid . '/import', array(), 'Import');
$this
->assertText('Updated 10 Story nodes.');
$this
->assertDevseedFeedContent();
}