This commit is contained in:
Michael 2022-01-06 07:41:29 +00:00
parent 9414edd64a
commit 0c5d2abf6b

View File

@ -6,6 +6,7 @@
namespace Friendica\Test\legacy; namespace Friendica\Test\legacy;
use Friendica\App; use Friendica\App;
use Friendica\Core\ACL;
use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\DI; use Friendica\DI;
use Friendica\Module\BaseApi; 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 * @return void
*/ */
public function testCheckAclInput() public function testCheckAclInput()
{ {
$result = check_acl_input('<aclstring>', BaseApi::getCurrentUserID()); $result = ACL::isValidContact('<aclstring>', BaseApi::getCurrentUserID());
// Where does this result come from? self::assertFalse($result);
self::assertEquals(1, $result);
} }
/** /**
* Test the check_acl_input() function with an empty ACL string. * Test the ACL::isValidContact() function with an empty ACL string.
* *
* @return void * @return void
*/ */
public function testCheckAclInputWithEmptyAclString() public function testCheckAclInputWithEmptyAclString()
{ {
$result = check_acl_input(' ', BaseApi::getCurrentUserID()); $result = ACL::isValidContact('', BaseApi::getCurrentUserID());
self::assertFalse($result); self::assertTrue($result);
} }
/** /**