diff --git a/tests/feeds_fetcher_file.test b/tests/feeds_fetcher_file.test index 6431698ff0ec92e0590d88742ec4d07e6fe42e32..18e97890d38607ac2b1bb81286b0faf213549350 100644 --- a/tests/feeds_fetcher_file.test +++ b/tests/feeds_fetcher_file.test @@ -25,10 +25,7 @@ class FeedsFileFetcherTestCase extends FeedsWebTestCase { // Set up an importer. $this->createImporterConfiguration('Node import', 'node'); // Set and configure plugins and mappings. - $edit = array( - 'content_type' => '', - ); - $this->drupalPost('admin/structure/feeds/node/settings', $edit, 'Save'); + $this->setSettings('node', NULL, array('content_type' => '')); $this->setPlugin('node', 'FeedsFileFetcher'); $this->setPlugin('node', 'FeedsCSVParser'); $mappings = array( diff --git a/tests/feeds_mapper_date.test b/tests/feeds_mapper_date.test index 60fb383cdf7130060d651edb94eb6b1013955e27..429bca1c1c51cdc5820d057d75766eba903ef686 100644 --- a/tests/feeds_mapper_date.test +++ b/tests/feeds_mapper_date.test @@ -43,8 +43,7 @@ class FeedsMapperDateTestCase extends FeedsMapperTestCase { $this->createImporterConfiguration('Date RSS', 'daterss'); $this->setSettings('daterss', NULL, array('content_type' => '', 'import_period' => FEEDS_SCHEDULE_NEVER)); $this->setPlugin('daterss', 'FeedsFileFetcher'); - $this->setPlugin('daterss', 'FeedsSyndicationParser'); - $this->setSettings('daterss', 'FeedsNodeProcessor', array('content_type' => $typename)); + $this->setSettings('daterss', 'FeedsNodeProcessor', array('bundle' => $typename)); $this->addMappings('daterss', array( 0 => array( 'source' => 'title', @@ -81,7 +80,7 @@ class FeedsMapperDateTestCase extends FeedsMapperTestCase { '01/06/2010 - 06:05', '01/06/2010 - 11:26', '01/07/2010 - 00:26', - ); + ); for ($i = 1; $i <= 6; $i++) { $this->drupalGet("node/$i/edit"); $this->assertNodeFieldValue('date', $values[$i-1]); diff --git a/tests/feeds_mapper_field.test b/tests/feeds_mapper_field.test index 130d0af3de806c3a6223b406d26657cec8813d24..2506a29565d80eabad634e13331b6b4db0ff4a61 100644 --- a/tests/feeds_mapper_field.test +++ b/tests/feeds_mapper_field.test @@ -38,7 +38,7 @@ class FeedsMapperFieldTestCase extends FeedsMapperTestCase { $this->setSettings('csv', NULL, array('content_type' => '', 'import_period' => FEEDS_SCHEDULE_NEVER)); $this->setPlugin('csv', 'FeedsFileFetcher'); $this->setPlugin('csv', 'FeedsCSVParser'); - $this->setSettings('csv', 'FeedsNodeProcessor', array('content_type' => $typename)); + $this->setSettings('csv', 'FeedsNodeProcessor', array('bundle' => $typename)); $this->addMappings('csv', array( 0 => array( 'source' => 'title', diff --git a/tests/feeds_mapper_file.test b/tests/feeds_mapper_file.test index 909e47ed8c5d4f9379c41c385a9616f62ae83b72..20c79122150dc2183f1692db913f1ce3aaf520de 100644 --- a/tests/feeds_mapper_file.test +++ b/tests/feeds_mapper_file.test @@ -47,7 +47,7 @@ class FeedsMapperFileTestCase extends FeedsMapperTestCase { // Create importer configuration. $this->createImporterConfiguration(); $this->setPlugin('syndication', 'FeedsSimplePieParser'); - $this->setSettings('syndication', 'FeedsNodeProcessor', array('content_type' => $typename)); + $this->setSettings('syndication', 'FeedsNodeProcessor', array('bundle' => $typename)); $this->addMappings('syndication', array( 0 => array( 'source' => 'title', @@ -90,7 +90,8 @@ class FeedsMapperFileTestCase extends FeedsMapperTestCase { // Create a CSV importer configuration. $this->createImporterConfiguration('Node import from CSV', 'node'); $this->setPlugin('node', 'FeedsCSVParser'); - $this->setSettings('node', 'FeedsNodeProcessor', array('content_type' => $typename)); + $this->setSettings('node', 'FeedsNodeProcessor', array('bundle' => $typename)); + $this->setSettings('node', NULL, array('content_type' => '')); $this->addMappings('node', array( 0 => array( 'source' => 'title', @@ -101,10 +102,6 @@ class FeedsMapperFileTestCase extends FeedsMapperTestCase { 'target' => 'field_files' ), )); - $edit = array( - 'content_type' => '', - ); - $this->drupalPost('admin/structure/feeds/node/settings', $edit, 'Save'); // Import. $edit = array( diff --git a/tests/feeds_mapper_link.test b/tests/feeds_mapper_link.test index 5fddbb1564ab18eb8e6af3b8a60c2280544998e9..a64fc944eb16041beccd9da8265a032299c30ead 100644 --- a/tests/feeds_mapper_link.test +++ b/tests/feeds_mapper_link.test @@ -59,7 +59,7 @@ class FeedsMapperLinkTestCase extends FeedsMapperTestCase { // Create importer configuration. $this->createImporterConfiguration(); //Create a default importer configuration - $this->setSettings('syndication', 'FeedsNodeProcessor', array('content_type' => $typename)); //Processor settings + $this->setSettings('syndication', 'FeedsNodeProcessor', array('bundle' => $typename)); //Processor settings $this->addMappings('syndication', array( 0 => array( 'source' => 'title', diff --git a/tests/feeds_mapper_path.test b/tests/feeds_mapper_path.test index 55f75b021131856abe843eb9227114c328d52417..bb408dba2983c422606b0891cb86397ba80614e9 100644 --- a/tests/feeds_mapper_path.test +++ b/tests/feeds_mapper_path.test @@ -94,10 +94,7 @@ class FeedsMapperPathTestCase extends FeedsMapperTestCase { ); $this->drupalPost('admin/structure/taxonomy/add', $edit, t('Save')); - $this->setSettings('path_test', 'FeedsTermProcessor', array('vocabulary' => 'addams')); - - // Turn on update existing. - $this->setSettings('path_test', 'FeedsTermProcessor', array('update_existing' => 2)); + $this->setSettings('path_test', 'FeedsTermProcessor', array('bundle' => 'addams', 'update_existing' => 2)); // Add mappings. $this->addMappings('path_test', array( @@ -208,7 +205,7 @@ class FeedsMapperPathPathautoTestCase extends FeedsMapperTestCase { $aliases = array(); for ($i = 1; $i <= 9; $i++) { - $aliases[] = "path$i"; + $aliases[] = "content/pathauto$i"; } $this->assertAliasCount($aliases); @@ -229,12 +226,7 @@ class FeedsMapperPathPathautoTestCase extends FeedsMapperTestCase { } public function assertAliasCount($aliases) { - $in_db = db_select('url_alias', 'a') - ->fields('a') - ->condition('a.alias', $aliases) - ->execute() - ->fetchAll(); - + $in_db = db_query("SELECT * FROM {url_alias} WHERE alias IN (:aliases)", array(':aliases' => $aliases))->fetchAll(); $this->assertEqual(count($in_db), count($aliases), 'Correct number of aliases in db.'); } } diff --git a/tests/feeds_processor_node.test b/tests/feeds_processor_node.test index 677bd95a826c4099b1c4ea04e013881da651ed06..a61df7813aaf1565ad5f7c6649dcf743a8cbfe38 100644 --- a/tests/feeds_processor_node.test +++ b/tests/feeds_processor_node.test @@ -408,13 +408,13 @@ class FeedsRSStoNodesTest extends FeedsWebTestCase { } /** - * Test that nodes will not be created if the user is unauthorized to create + * Test that nodes will not be created if the user is unauthorized to create * them. */ public function testAuthorize() { - // Create a user with limited permissions. We can't use - // $this->drupalCreateUser here because we need to to set a specific user + // Create a user with limited permissions. We can't use + // $this->drupalCreateUser here because we need to to set a specific user // name. $edit = array( 'name' => 'Development Seed',