diff --git a/tests/feeds_mapper.test b/tests/feeds_mapper.test
index f9951a1..0cd0d3d 100644
--- a/tests/feeds_mapper.test
+++ b/tests/feeds_mapper.test
@@ -2,11 +2,11 @@
/**
* @file
- * Helper class with auxiliary functions for feeds mapper module tests.
+ * Contains FeedsMapperTestCase.
*/
/**
- * Base class for implementing Feeds Mapper test cases.
+ * Helper class with auxiliary functions for feeds mapper module tests.
*/
class FeedsMapperTestCase extends FeedsWebTestCase {
@@ -183,4 +183,5 @@ class FeedsMapperTestCase extends FeedsWebTestCase {
$field_widgets = FeedsMapperTestCase::$field_widgets;
return isset($field_widgets[$field_type]) ? $field_widgets[$field_type] : NULL;
}
+
}
diff --git a/tests/feeds_mapper_config.test b/tests/feeds_mapper_config.test
index 566bbf9..b22764d 100644
--- a/tests/feeds_mapper_config.test
+++ b/tests/feeds_mapper_config.test
@@ -2,13 +2,14 @@
/**
* @file
- * Test cases for Feeds mapping configuration form.
+ * Contains FeedsMapperConfigTestCase.
*/
/**
- * Class for testing basic Feeds ajax mapping configurtaion form behavior.
+ * Test cases for Feeds mapping configuration form.
*/
class FeedsMapperConfigTestCase extends FeedsMapperTestCase {
+
public static function getInfo() {
return array(
'name' => 'Mapper: Config',
@@ -76,7 +77,6 @@ class FeedsMapperConfigTestCase extends FeedsMapperTestCase {
$this->assertEqual($settings['select'], 'option4');
$this->assertEqual($settings['second_value'], $second_callback_value);
-
// Check that form validation works.
// Click gear to get form.
$this->drupalPostAJAX(NULL, array(), 'mapping_settings_edit_0');
diff --git a/tests/feeds_mapper_date.test b/tests/feeds_mapper_date.test
index 0e242bc..7dd8cfa 100644
--- a/tests/feeds_mapper_date.test
+++ b/tests/feeds_mapper_date.test
@@ -2,16 +2,17 @@
/**
* @file
- * Test case for CCK date field mapper mappers/date.inc.
+ * Contains FeedsMapperDateTestCase.
*/
/**
- * Class for testing Feeds content mapper.
+ * Test case for CCK date field mapper mappers/date.inc.
*
* @todo: Add test method iCal
* @todo: Add test method for end date
*/
class FeedsMapperDateTestCase extends FeedsMapperTestCase {
+
public static function getInfo() {
return array(
'name' => 'Mapper: Date',
@@ -120,8 +121,7 @@ class FeedsMapperDateTestCase extends FeedsMapperTestCase {
}
/**
- * Tests if values are cleared out when an empty value or no value
- * is provided.
+ * Tests if values are cleared out when an empty value is provided.
*/
public function testClearOutValues() {
// Create content type.
@@ -268,4 +268,5 @@ class FeedsMapperDateTestCase extends FeedsMapperTestCase {
$this->assertNoText('datestamp_label');
$this->assertNoText('datetime_label');
}
+
}
diff --git a/tests/feeds_mapper_date_multiple.test b/tests/feeds_mapper_date_multiple.test
index 3886c5a..18c2991 100644
--- a/tests/feeds_mapper_date_multiple.test
+++ b/tests/feeds_mapper_date_multiple.test
@@ -2,16 +2,17 @@
/**
* @file
- * Test case for CCK date multi-field mapper mappers/date.inc.
+ * Contains FeedsMapperDateMultipleTestCase.
*/
/**
- * Class for testing Feeds content mapper.
+ * Test case for CCK date multi-field mapper mappers/date.inc.
*
* @todo: Add test method iCal
* @todo: Add test method for end date
*/
class FeedsMapperDateMultipleTestCase extends FeedsMapperTestCase {
+
public static function getInfo() {
return array(
'name' => 'Mapper: Date, multi value fields',
@@ -115,4 +116,5 @@ class FeedsMapperDateMultipleTestCase extends FeedsMapperTestCase {
}
}
}
+
}
diff --git a/tests/feeds_mapper_field.test b/tests/feeds_mapper_field.test
index ae1d9ef..7c9dbd6 100644
--- a/tests/feeds_mapper_field.test
+++ b/tests/feeds_mapper_field.test
@@ -2,13 +2,14 @@
/**
* @file
- * Test case for simple CCK field mapper mappers/content.inc.
+ * Contains FeedsMapperFieldTestCase.
*/
/**
- * Class for testing Feeds field mapper.
+ * Test case for simple CCK field mapper mappers/content.inc.
*/
class FeedsMapperFieldTestCase extends FeedsMapperTestCase {
+
public static function getInfo() {
return array(
'name' => 'Mapper: Fields',
@@ -24,7 +25,7 @@ class FeedsMapperFieldTestCase extends FeedsMapperTestCase {
/**
* Basic test loading a double entry CSV file.
*/
- function test() {
+ public function test() {
// Create content type.
$typename = $this->createContentType(array(), array(
'alpha' => 'text',
@@ -89,8 +90,7 @@ class FeedsMapperFieldTestCase extends FeedsMapperTestCase {
}
/**
- * Tests if values are cleared out when an empty value or no value
- * is provided.
+ * Tests if values are cleared out when an empty value is provided.
*/
public function testClearOutValues() {
// Create content type.
@@ -229,4 +229,5 @@ class FeedsMapperFieldTestCase extends FeedsMapperTestCase {
$this->assertNoText('gamma_number_decimal_label');
$this->assertNoText('delta_number_float_label');
}
+
}
diff --git a/tests/feeds_mapper_file.test b/tests/feeds_mapper_file.test
index b270fe9..2cb5acd 100644
--- a/tests/feeds_mapper_file.test
+++ b/tests/feeds_mapper_file.test
@@ -2,13 +2,14 @@
/**
* @file
- * Test case for Filefield mapper mappers/filefield.inc.
+ * Contains FeedsMapperFileTestCase.
*/
/**
- * Class for testing Feeds file mapper.
+ * Test case for Filefield mapper mappers/filefield.inc.
*/
class FeedsMapperFileTestCase extends FeedsMapperTestCase {
+
public static function getInfo() {
return array(
'name' => 'Mapper: File field',
@@ -332,7 +333,7 @@ class FeedsMapperFileTestCase extends FeedsMapperTestCase {
// Assert files exist.
$files = $this->listTestFiles();
foreach ($files as $file) {
- $file_path = drupal_realpath('public://') . '/' . rawurlencode($file);
+ $file_path = drupal_realpath('public://') . '/' . str_replace(' ', '_', $file);
$this->assertTrue(file_exists($file_path), format_string('The file %file exists.', array(
'%file' => $file_path,
)));
@@ -347,8 +348,7 @@ class FeedsMapperFileTestCase extends FeedsMapperTestCase {
foreach ($entities as $i => $entity) {
$this->drupalGet('node/' . $entity->entity_id . '/edit');
- $f = new FeedsEnclosure(array_shift($files), NULL);
- $this->assertRaw($f->getUrlEncodedValue());
+ $this->assertRaw(str_replace(' ', '_', array_shift($files)));
$this->assertRaw("Alt text $i");
$this->assertRaw("Title text $i");
}
@@ -363,8 +363,7 @@ class FeedsMapperFileTestCase extends FeedsMapperTestCase {
$files = $this->listTestFiles();
foreach ($entities as $i => $entity) {
$this->drupalGet('node/' . $entity->entity_id . '/edit');
- $f = new FeedsEnclosure(array_shift($files), NULL);
- $this->assertRaw($f->getUrlEncodedValue());
+ $this->assertRaw(str_replace(' ', '_', array_shift($files)));
$this->assertNoRaw("Alt text $i");
$this->assertNoRaw("Title text $i");
}
@@ -379,7 +378,7 @@ class FeedsMapperFileTestCase extends FeedsMapperTestCase {
// Assert files are removed.
$files = $this->listTestFiles();
foreach ($files as $file) {
- $file_path = drupal_realpath('public://') . '/' . rawurlencode($file);
+ $file_path = drupal_realpath('public://') . '/' . str_replace(' ', '_', $file);
$this->assertFalse(file_exists($file_path), format_string('The file %file no longer exists.', array(
'%file' => $file_path,
)));
@@ -387,8 +386,7 @@ class FeedsMapperFileTestCase extends FeedsMapperTestCase {
// Check if the files are removed from the node edit form as well.
foreach ($entities as $i => $entity) {
$this->drupalGet('node/' . $entity->entity_id . '/edit');
- $f = new FeedsEnclosure(array_shift($files), NULL);
- $this->assertNoRaw($f->getUrlEncodedValue());
+ $this->assertNoRaw(str_replace(' ', '_', array_shift($files)));
}
}
diff --git a/tests/feeds_mapper_format_config.test b/tests/feeds_mapper_format_config.test
index 92fa241..83bfdd6 100644
--- a/tests/feeds_mapper_format_config.test
+++ b/tests/feeds_mapper_format_config.test
@@ -9,6 +9,7 @@
* Class for testing "Text format" mapping configuration on text fields.
*/
class FeedsMapperFormatConfig extends FeedsMapperTestCase {
+
public static function getInfo() {
return array(
'name' => 'Mapper: Text format mapping configuration',
diff --git a/tests/feeds_mapper_hooks.test b/tests/feeds_mapper_hooks.test
index 5d76043..f99b2d3 100644
--- a/tests/feeds_mapper_hooks.test
+++ b/tests/feeds_mapper_hooks.test
@@ -2,13 +2,14 @@
/**
* @file
- * Test case for the various callbacks implemented for mappers.
+ * Contains FeedsMapperHookTestCase.
*/
/**
- * Class for testing Feeds field mapper.
+ * Test case for the various callbacks implemented for mappers.
*/
class FeedsMapperHookTestCase extends FeedsMapperTestCase {
+
public static function getInfo() {
return array(
'name' => 'Mapper: Hooks and callbacks',
diff --git a/tests/feeds_mapper_link.test b/tests/feeds_mapper_link.test
index a7baaa9..24f0179 100644
--- a/tests/feeds_mapper_link.test
+++ b/tests/feeds_mapper_link.test
@@ -2,13 +2,14 @@
/**
* @file
- * Test case for CCK link mapper mappers/date.inc.
+ * Contains FeedsMapperLinkTestCase.
*/
/**
- * Class for testing Feeds link mapper.
+ * Test case for CCK link mapper mappers/date.inc.
*/
class FeedsMapperLinkTestCase extends FeedsMapperTestCase {
+
/**
* Title for link fields with a static title.
*
@@ -131,7 +132,6 @@ class FeedsMapperLinkTestCase extends FeedsMapperTestCase {
// Test the static title.
$this->drupalGet('node/2');
$this->assertText($this->staticTitle, 'Static title link found.');
-
}
/**
@@ -350,4 +350,5 @@ class FeedsMapperLinkTestCase extends FeedsMapperTestCase {
return parent::getFormFieldsValues($field_name, $index);
}
}
+
}
diff --git a/tests/feeds_mapper_path.test b/tests/feeds_mapper_path.test
index bb408db..b7ccfa3 100644
--- a/tests/feeds_mapper_path.test
+++ b/tests/feeds_mapper_path.test
@@ -2,13 +2,14 @@
/**
* @file
- * Test case for path alias mapper path.inc.
+ * Contains FeedsMapperPathTestCase.
*/
/**
- * Class for testing Feeds path mapper.
+ * Test case for path alias mapper path.inc.
*/
class FeedsMapperPathTestCase extends FeedsMapperTestCase {
+
public static function getInfo() {
return array(
'name' => 'Mapper: Path',
@@ -25,7 +26,6 @@ class FeedsMapperPathTestCase extends FeedsMapperTestCase {
* Basic test loading a single entry CSV file.
*/
public function testNodeAlias() {
-
// Create importer configuration.
$this->createImporterConfiguration($this->randomName(), 'path_test');
$this->setPlugin('path_test', 'FeedsFileFetcher');
@@ -80,7 +80,6 @@ class FeedsMapperPathTestCase extends FeedsMapperTestCase {
* Test support for term aliases.
*/
public function testTermAlias() {
-
// Create importer configuration.
$this->createImporterConfiguration($this->randomName(), 'path_test');
$this->setPlugin('path_test', 'FeedsFileFetcher');
@@ -155,6 +154,7 @@ class FeedsMapperPathTestCase extends FeedsMapperTestCase {
* Class for testing Feeds path mapper with pathauto.module.
*/
class FeedsMapperPathPathautoTestCase extends FeedsMapperTestCase {
+
public static function getInfo() {
return array(
'name' => 'Mapper: Path with pathauto',
@@ -172,7 +172,6 @@ class FeedsMapperPathPathautoTestCase extends FeedsMapperTestCase {
* Basic for allowing pathauto to override the alias.
*/
public function test() {
-
// Create importer configuration.
$this->createImporterConfiguration($this->randomName(), 'path_test');
$this->setPlugin('path_test', 'FeedsFileFetcher');
@@ -229,4 +228,5 @@ class FeedsMapperPathPathautoTestCase extends FeedsMapperTestCase {
$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_mapper_profile.test b/tests/feeds_mapper_profile.test
index 9ced5db..b0d9efd 100644
--- a/tests/feeds_mapper_profile.test
+++ b/tests/feeds_mapper_profile.test
@@ -2,13 +2,14 @@
/**
* @file
- * Test suite for profile mapper mappers/profile.inc.
+ * Contains FeedsMapperProfileTestCase.
*/
/**
- * Class for testing Feeds profile mapper.
+ * Test suite for profile mapper mappers/profile.inc.
*/
class FeedsMapperProfileTestCase extends FeedsMapperTestCase {
+
public static function getInfo() {
return array(
'name' => 'Mapper: Profile',
@@ -17,7 +18,7 @@ class FeedsMapperProfileTestCase extends FeedsMapperTestCase {
);
}
- function setUp() {
+ public function setUp() {
// Call parent setup with required modules.
parent::setUp(array('profile'));
}
@@ -25,8 +26,7 @@ class FeedsMapperProfileTestCase extends FeedsMapperTestCase {
/**
* Basic test loading a doulbe entry CSV file.
*/
- function test() {
-
+ public function test() {
// Create profile fields.
$edit = array(
'category' => 'test',
@@ -99,4 +99,5 @@ class FeedsMapperProfileTestCase extends FeedsMapperTestCase {
$this->assertEqual($account->profile_textfield_test, 'blue', 'User profile_textfield_test is correct');
$this->assertEqual($account->profile_select_test, 'beta', 'User profile_select_test is correct');
}
+
}
diff --git a/tests/feeds_mapper_summary.test b/tests/feeds_mapper_summary.test
index 88cf9f1..db4c202 100644
--- a/tests/feeds_mapper_summary.test
+++ b/tests/feeds_mapper_summary.test
@@ -2,13 +2,14 @@
/**
* @file
- * Test case for mapping to node summary.
+ * Contains FeedsMapperNodeSummaryTestCase.
*/
/**
- * Class for testing Feeds summary mapper.
+ * Test case for mapping to node summary.
*/
class FeedsMapperNodeSummaryTestCase extends FeedsMapperTestCase {
+
public static function getInfo() {
return array(
'name' => 'Mapper: Text with summary',
diff --git a/tests/feeds_mapper_taxonomy.test b/tests/feeds_mapper_taxonomy.test
index 3ffb362..ed55751 100644
--- a/tests/feeds_mapper_taxonomy.test
+++ b/tests/feeds_mapper_taxonomy.test
@@ -2,13 +2,14 @@
/**
* @file
- * Test case for taxonomy mapper mappers/taxonomy.inc.
+ * Contains FeedsMapperTaxonomyTestCase.
*/
/**
- * Class for testing Feeds content mapper.
+ * Test case for taxonomy mapper mappers/taxonomy.inc.
*/
class FeedsMapperTaxonomyTestCase extends FeedsMapperTestCase {
+
public static function getInfo() {
return array(
'name' => 'Mapper: Taxonomy',
@@ -115,7 +116,6 @@ class FeedsMapperTaxonomyTestCase extends FeedsMapperTestCase {
* Tests inheriting taxonomy from the feed node.
*/
public function testInheritTaxonomy() {
-
// Adjust importer settings
$this->setSettings('syndication', NULL, array('import_period' => FEEDS_SCHEDULE_NEVER));
$this->setSettings('syndication', NULL, array('import_on_create' => FALSE));
diff --git a/tests/feeds_mapper_unique.test b/tests/feeds_mapper_unique.test
index 46b48dd..bdc6a10 100644
--- a/tests/feeds_mapper_unique.test
+++ b/tests/feeds_mapper_unique.test
@@ -9,6 +9,7 @@
* Class for testing Feeds unique callbacks.
*/
class FeedsMapperUniqueTestCase extends FeedsMapperTestCase {
+
public static function getInfo() {
return array(
'name' => 'Unique target callbacks',