Merge pull request #17621 from colemanw/sortOptions
[civicrm-core.git] / tests / phpunit / CRM / Utils / GlobalStackTest.php
index bc1e2139462f172dcd9c8c3bf183238c3c1bacd7..7c9c45a86c23eb48f17fc2366ebab8886ae6cded 100644 (file)
@@ -1,14 +1,13 @@
 <?php
 
-require_once 'CiviTest/CiviUnitTestCase.php';
-
 /**
  * Class CRM_Utils_GlobalStackTest
+ * @group headless
  */
 class CRM_Utils_GlobalStackTest extends CiviUnitTestCase {
 
   /**
-   * Temporarily override global variables and ensure that the variable data
+   * Temporarily override global variables and ensure that the variable data.
    * is set as expected (before/during/after the override).
    */
   public function testPushPop() {
@@ -23,13 +22,13 @@ class CRM_Utils_GlobalStackTest extends CiviUnitTestCase {
     $this->assertFalse(isset($_FOO['bang']));
     $this->assertEquals(1, $_EXTRA);
 
-    CRM_Utils_GlobalStack::singleton()->push(array(
-      '_FOO' => array(
+    CRM_Utils_GlobalStack::singleton()->push([
+      '_FOO' => [
         'bar' => 2,
         'bang' => 2,
-      ),
+      ],
       '_EXTRA' => 2,
-    ));
+    ]);
 
     $this->assertEquals(2, $_FOO['bar']);
     $this->assertEquals(1, $_FOO['whiz']);