Skip to content
Snippets Groups Projects
Commit 1d164052 authored by megachriz's avatar megachriz Committed by Megachriz
Browse files

Issue #2838283 by MegaChriz: Fixed failing test FeedsMapperDateMultipleTestCase::test().

parent 8c7ebf09
No related branches found
No related tags found
No related merge requests found
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<item> <item>
<title>2 date values</title> <title>2 date values</title>
<guid>123456789</guid> <guid>123456789</guid>
<date>Wed, 06 Jan 2010 15:05:00 GMT+00:00</date> <date>Wed, 06 Jan 2010 15:00:00 GMT+00:00</date>
<date>Thu, 07 Jan 2010 15:08:00 GMT+00:00</date> <date>Thu, 07 Jan 2010 15:15:00 GMT+00:00</date>
</item> </item>
<item> <item>
<title>4 date values</title> <title>4 date values</title>
......
...@@ -112,7 +112,22 @@ class FeedsMapperDateMultipleTestCase extends FeedsMapperTestCase { ...@@ -112,7 +112,22 @@ class FeedsMapperDateMultipleTestCase extends FeedsMapperTestCase {
foreach ($values as $v => $key) { foreach ($values as $v => $key) {
$this->drupalGet("node/$v/edit"); $this->drupalGet("node/$v/edit");
foreach ($key as $delta => $value) { foreach ($key as $delta => $value) {
$this->assertFieldById('edit-field-date-und-' . $delta . '-value-date', $value); $id = 'edit-field-date-und-' . $delta . '-value-date';
// Find actual value.
$xpath = $this->constructFieldXpath('id', $id);
$fields = $this->xpath($xpath);
$field = reset($fields);
$actual = (string) $field['value'];
// Compose assert message.
$message = format_string('Found field by id @id with value @value (actual: @actual).', array(
'@id' => $id,
'@value' => $value,
'@actual' => $actual,
));
$this->assertFieldById($id, $value, $message);
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment