Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / tests / Drupal / Tests / Component / Utility / SortArrayTest.php
index 890d17171ebca424b6c410e44d85d6d479840ea0..ab2447065a76b4554e7074311b89f2ef759651a2 100644 (file)
@@ -2,8 +2,8 @@
 
 namespace Drupal\Tests\Component\Utility;
 
-use Drupal\Tests\UnitTestCase;
 use Drupal\Component\Utility\SortArray;
+use PHPUnit\Framework\TestCase;
 
 /**
  * Tests the SortArray component.
@@ -12,7 +12,7 @@ use Drupal\Component\Utility\SortArray;
  *
  * @coversDefaultClass \Drupal\Component\Utility\SortArray
  */
-class SortArrayTest extends UnitTestCase {
+class SortArrayTest extends TestCase {
 
   /**
    * Tests SortArray::sortByWeightElement() input against expected output.
@@ -49,42 +49,42 @@ class SortArrayTest extends UnitTestCase {
     $tests[] = [
       ['weight' => 1],
       ['weight' => 1],
-      0
+      0,
     ];
 
     // Weights set and $a is less (lighter) than $b.
     $tests[] = [
       ['weight' => 1],
       ['weight' => 2],
-      -1
+      -1,
     ];
 
     // Weights set and $a is greater (heavier) than $b.
     $tests[] = [
       ['weight' => 2],
       ['weight' => 1],
-      1
+      1,
     ];
 
     // Weights not set.
     $tests[] = [
       [],
       [],
-      0
+      0,
     ];
 
     // Weights for $b not set.
     $tests[] = [
       ['weight' => 1],
       [],
-      1
+      1,
     ];
 
     // Weights for $a not set.
     $tests[] = [
       [],
       ['weight' => 1],
-      -1
+      -1,
     ];
 
     return $tests;
@@ -125,42 +125,42 @@ class SortArrayTest extends UnitTestCase {
     $tests[] = [
       ['#weight' => 1],
       ['#weight' => 1],
-      0
+      0,
     ];
 
     // Weights set and $a is less (lighter) than $b.
     $tests[] = [
       ['#weight' => 1],
       ['#weight' => 2],
-      -1
+      -1,
     ];
 
     // Weights set and $a is greater (heavier) than $b.
     $tests[] = [
       ['#weight' => 2],
       ['#weight' => 1],
-      1
+      1,
     ];
 
     // Weights not set.
     $tests[] = [
       [],
       [],
-      0
+      0,
     ];
 
     // Weights for $b not set.
     $tests[] = [
       ['#weight' => 1],
       [],
-      1
+      1,
     ];
 
     // Weights for $a not set.
     $tests[] = [
       [],
       ['#weight' => 1],
-      -1
+      -1,
     ];
 
     return $tests;
@@ -201,35 +201,35 @@ class SortArrayTest extends UnitTestCase {
     $tests[] = [
       ['title' => 'test'],
       ['title' => 'test'],
-      0
+      0,
     ];
 
     // Title $a not set.
     $tests[] = [
       [],
       ['title' => 'test'],
-      -4
+      -4,
     ];
 
     // Title $b not set.
     $tests[] = [
       ['title' => 'test'],
       [],
-      4
+      4,
     ];
 
     // Titles set but not equal.
     $tests[] = [
       ['title' => 'test'],
       ['title' => 'testing'],
-      -1
+      -1,
     ];
 
     // Titles set but not equal.
     $tests[] = [
       ['title' => 'testing'],
       ['title' => 'test'],
-      1
+      1,
     ];
 
     return $tests;
@@ -270,35 +270,35 @@ class SortArrayTest extends UnitTestCase {
     $tests[] = [
       ['#title' => 'test'],
       ['#title' => 'test'],
-      0
+      0,
     ];
 
     // Title $a not set.
     $tests[] = [
       [],
       ['#title' => 'test'],
-      -4
+      -4,
     ];
 
     // Title $b not set.
     $tests[] = [
       ['#title' => 'test'],
       [],
-      4
+      4,
     ];
 
     // Titles set but not equal.
     $tests[] = [
       ['#title' => 'test'],
       ['#title' => 'testing'],
-      -1
+      -1,
     ];
 
     // Titles set but not equal.
     $tests[] = [
       ['#title' => 'testing'],
       ['#title' => 'test'],
-      1
+      1,
     ];
 
     return $tests;