]> git.mxchange.org Git - friendica.git/commitdiff
Tests
authorMichael <heluecht@pirati.ca>
Thu, 6 Jan 2022 07:41:29 +0000 (07:41 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 6 Jan 2022 07:41:29 +0000 (07:41 +0000)
tests/legacy/ApiTest.php

index 7d08b6ec99c73653dd29171ca39ee922ef7fe7e4..cd996d6d4f2772194a2b2c566da202962351e2d9 100644 (file)
@@ -6,6 +6,7 @@
 namespace Friendica\Test\legacy;
 
 use Friendica\App;
+use Friendica\Core\ACL;
 use Friendica\Core\Config\Capability\IManageConfigValues;
 use Friendica\DI;
 use Friendica\Module\BaseApi;
@@ -691,26 +692,25 @@ class ApiTest extends FixtureTest
        }
 
        /**
-        * Test the check_acl_input() function.
+        * Test the ACL::isValidContact() function.
         *
         * @return void
         */
        public function testCheckAclInput()
        {
-               $result = check_acl_input('<aclstring>', BaseApi::getCurrentUserID());
-               // Where does this result come from?
-               self::assertEquals(1, $result);
+               $result = ACL::isValidContact('<aclstring>', BaseApi::getCurrentUserID());
+               self::assertFalse($result);
        }
 
        /**
-        * Test the check_acl_input() function with an empty ACL string.
+        * Test the ACL::isValidContact() function with an empty ACL string.
         *
         * @return void
         */
        public function testCheckAclInputWithEmptyAclString()
        {
-               $result = check_acl_input(' ', BaseApi::getCurrentUserID());
-               self::assertFalse($result);
+               $result = ACL::isValidContact('', BaseApi::getCurrentUserID());
+               self::assertTrue($result);
        }
 
        /**