phpunit fails - CsvEncoderTest::testDecodeCsv

Created on 1 September 2020, about 4 years ago
Updated 16 November 2023, about 1 year ago

Problem/Motivation

Drupal 9.0.3
PHP 7.4.9

Running unit tests and this fails:

23) Drupal\Tests\csv_serialization\Unit\CsvEncoderTest::testDecodeCsv with data set #0 ('title,body,images,alias,statu...",,0\n', array(array('This is title 1', 'This is, body 1', 'img1.jpg', '', 1), array('This is title 2', 'This is, body 2', array('img1.jpg', 'img2.jpg'), '', 0), array('This is title 3', 'This is, body 3', array('img1.jpg', 'Image 1', 'img2.jpg', 'Image, 2'), '', 0)))
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     0 => Array (
-        'title' => 'This is title 1'
-        'body' => 'This is, body 1'
-        'images' => 'img1.jpg'
-        'alias' => ''
-        'status' => 1
+        0 => 'title'
+        1 => 'body'
+        2 => 'images'
+        3 => 'alias'
+        4 => 'status'
     )
     1 => Array (
-        'title' => 'This is title 2'
-        'body' => 'This is, body 2'
-        'images' => Array (...)
-        'alias' => ''
-        'status' => 0
+        0 => 'This is title 1'
+        1 => 'This is, body 1'
+        2 => 'img1.jpg'
+        3 => ''
+        4 => '1'
     )
     2 => Array (
-        'title' => 'This is title 3'
-        'body' => 'This is, body 3'
-        'images' => Array (...)
-        'alias' => ''
-        'status' => 0
+        0 => 'This is title 2'
+        1 => 'This is, body 2'
+        2 => Array (...)
+        3 => ''
+        4 => '0'
     )
+    3 => Array (...)
 )

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

πŸ‡³πŸ‡΄Norway steinmb

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024