Security update for Core, with self-updated composer
[yaffs-website] / web / core / tests / Drupal / Tests / Component / Utility / NestedArrayTest.php
index 0371ebb3503d0d261e808c75baceec9759ad1a9c..80fc7ddf33ca4c3f3df4e8754c69efae573667a3 100644 (file)
@@ -3,13 +3,13 @@
 namespace Drupal\Tests\Component\Utility;
 
 use Drupal\Component\Utility\NestedArray;
-use Drupal\Tests\UnitTestCase;
+use PHPUnit\Framework\TestCase;
 
 /**
  * @coversDefaultClass \Drupal\Component\Utility\NestedArray
  * @group Utility
  */
-class NestedArrayTest extends UnitTestCase {
+class NestedArrayTest extends TestCase {
 
   /**
    * Form array to check.
@@ -268,13 +268,21 @@ class NestedArrayTest extends UnitTestCase {
       [0, 1, '', TRUE], NULL, [1 => 1, 3 => TRUE]
     ];
     $data['1d-array-callable'] = [
-      [0, 1, '', TRUE], function ($element) { return $element === ''; }, [2 => '']
+      [0, 1, '', TRUE],
+      function ($element) {
+        return $element === '';
+      },
+      [2 => ''],
     ];
     $data['2d-array'] = [
       [[0, 1, '', TRUE], [0, 1, 2, 3]], NULL, [0 => [1 => 1, 3 => TRUE], 1 => [1 => 1, 2 => 2, 3 => 3]],
     ];
     $data['2d-array-callable'] = [
-      [[0, 1, '', TRUE], [0, 1, 2, 3]], function ($element) { return is_array($element) || $element === 3; }, [0 => [], 1 => [3 => 3]],
+      [[0, 1, '', TRUE], [0, 1, 2, 3]],
+      function ($element) {
+        return is_array($element) || $element === 3;
+      },
+      [0 => [], 1 => [3 => 3]],
     ];
 
     return $data;