]> git.mxchange.org Git - friendica.git/blobdiff - tests/src/Util/ACLFormaterTest.php
Merge remote-tracking branch 'upstream/2021.06-rc' into http-input-data
[friendica.git] / tests / src / Util / ACLFormaterTest.php
index 4dccda600a689a438bcb7670e95343ea1cbcddfd..f0fb9590f58bd5e1269da1184a03352bfc397abd 100644 (file)
@@ -1,14 +1,32 @@
 <?php
+/**
+ * @copyright Copyright (C) 2010-2021, the Friendica project
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
 
 namespace Friendica\Test\src\Util;
 
-use Error;
 use Friendica\Model\Group;
 use Friendica\Util\ACLFormatter;
 use PHPUnit\Framework\TestCase;
 
 /**
- * @brief ACLFormater utility testing class
+ * ACLFormater utility testing class
  */
 class ACLFormaterTest extends TestCase
 {
@@ -18,18 +36,18 @@ class ACLFormaterTest extends TestCase
 
                $acl = $aclFormatter->expand($text);
 
-               $this->assertEquals($assert, $acl);
+               self::assertEquals($assert, $acl);
 
-               $this->assertMergable($acl);
+               self::assertMergable($acl);
        }
 
        public function assertMergable(array $aclOne, array $aclTwo = [])
        {
-               $this->assertTrue(is_array($aclOne));
-               $this->assertTrue(is_array($aclTwo));
+               self::assertTrue(is_array($aclOne));
+               self::assertTrue(is_array($aclTwo));
 
                $aclMerged = array_unique(array_merge($aclOne, $aclTwo));
-               $this->assertTrue(is_array($aclMerged));
+               self::assertTrue(is_array($aclMerged));
 
                return $aclMerged;
        }
@@ -99,7 +117,7 @@ class ACLFormaterTest extends TestCase
         */
        public function testExpand($input, array $assert)
        {
-               $this->assertAcl($input, $assert);
+               self::assertAcl($input, $assert);
        }
 
        /**
@@ -112,11 +130,11 @@ class ACLFormaterTest extends TestCase
                $allow_people = $aclFormatter->expand();
                $allow_groups = $aclFormatter->expand();
 
-               $this->assertEmpty($aclFormatter->expand(null));
-               $this->assertEmpty($aclFormatter->expand());
+               self::assertEmpty($aclFormatter->expand(null));
+               self::assertEmpty($aclFormatter->expand());
 
                $recipients   = array_unique(array_merge($allow_people, $allow_groups));
-               $this->assertEmpty($recipients);
+               self::assertEmpty($recipients);
        }
 
        public function dataAclToString()
@@ -169,6 +187,6 @@ class ACLFormaterTest extends TestCase
        {
                $aclFormatter = new ACLFormatter();
 
-               $this->assertEquals($assert, $aclFormatter->toString($input));
+               self::assertEquals($assert, $aclFormatter->toString($input));
        }
 }