]> git.mxchange.org Git - friendica.git/blobdiff - tests/src/Util/ACLFormaterTest.php
Merge pull request #7782 from nupplaphil/bug/7781-compose_acl_expand
[friendica.git] / tests / src / Util / ACLFormaterTest.php
index 19332f4953239fdbbea8061b04282993238afb2a..ac5b25e6c26346c6a1e50acba0dd28d969c6490b 100644 (file)
@@ -2,6 +2,7 @@
 
 namespace Friendica\Test\src\Util;
 
+use Error;
 use Friendica\Model\Group;
 use Friendica\Util\ACLFormatter;
 use PHPUnit\Framework\TestCase;
@@ -162,6 +163,18 @@ class ACLFormaterTest extends TestCase
                $this->assertEquals(array('1', '3'), $aclFormatter->expand($text));
        }
 
+       /**
+        * Test expected exception in case of wrong typehint
+        *
+        * @expectedException Error
+        */
+       public function testExpandNull()
+       {
+               $aclFormatter = new ACLFormatter();
+
+               $aclFormatter->expand(null);
+       }
+
        public function dataAclToString()
        {
                return [
@@ -195,6 +208,6 @@ class ACLFormaterTest extends TestCase
        {
                $aclFormatter = new ACLFormatter();
 
-               $this->assertEquals($assert, $aclFormatter->aclToString($input));
+               $this->assertEquals($assert, $aclFormatter->toString($input));
        }
 }