Check null for acl-fields

This commit is contained in:
Philipp Holzer 2019-10-28 18:16:10 +01:00
commit 3eda62bfa6
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
5 changed files with 29 additions and 16 deletions

View 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 [