add autogenerated comment blocks to tests dir
[civicrm-core.git] / tests / phpunit / CRM / Utils / ArrayTest.php
index 2118c25b2f44a327d5d03e3c27be5eb5f741f8e6..9f636714e33e388f72cacd348dfe0bafd1bfca49 100644 (file)
@@ -20,6 +20,9 @@ class CRM_Utils_ArrayTest extends CiviUnitTestCase {
     $this->assertEquals('privately-modified', $fooNonReference['foo']);
   }
 
+  /**
+   * @return null
+   */
   private function &returnByReference() {
     static $foo;
     if ($foo === NULL) {
@@ -57,12 +60,18 @@ class CRM_Utils_ArrayTest extends CiviUnitTestCase {
       'familiar' => TRUE,
       'value' => 'Hey'
     );
+    $inputs[] = array(
+      'msgid' => 'greeting',
+      'familiar' => TRUE,
+      'value' => 'Universal greeting'
+    );
 
     $byLangMsgid = CRM_Utils_Array::index(array('lang', 'msgid'), $inputs);
     $this->assertEquals($inputs[4], $byLangMsgid['en']['greeting']);
     $this->assertEquals($inputs[1], $byLangMsgid['en']['parting']);
     $this->assertEquals($inputs[2], $byLangMsgid['fr']['greeting']);
     $this->assertEquals($inputs[3], $byLangMsgid['fr']['parting']);
+    $this->assertEquals($inputs[5], $byLangMsgid[NULL]['greeting']);
   }
 
   function testCollect() {