diff --git a/core/modules/views/tests/src/Kernel/Plugin/StyleMappingTest.php b/core/modules/views/tests/src/Kernel/Plugin/StyleMappingTest.php index 1cb4400..05f0b00 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/StyleMappingTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/StyleMappingTest.php @@ -64,11 +64,15 @@ protected function mappedOutputHelper($view) { $name = strtok((string) $field_attributes['class'][0], '-'); $field_id = strtok('-'); - // The expected result is the mapping name and the field value, - // separated by ':'. - $expected_result = $name . ':' . $data_set[$count][$field_id]; - $actual_result = (string) $field; - $this->assertIdentical($expected_result, $actual_result, format_string('The fields were mapped successfully: %name => %field_id', array('%name' => $name, '%field_id' => $field_id))); + /** + * The expected result is the mapping name and the field value, + * separated by ':'. + * + * [#2560467] Fix for unknown line returns being added in. + */ + $expected_result = preg_replace(array('/\r/', '/\n/'), '', $name . ':' . $data_set[$count][$field_id]); + $actual_result = preg_replace(array('/\r/', '/\n/'), '', (string) $field); + $this->assertEqual($actual_result, $expected_result,format_string('The fields were mapped successfully: %expected_result => %actual_result', array('%expected_result' => $expected_result, '%actual_result' => $actual_result))); } $count++;