Check null for acl-fields
This commit is contained in:
@@ -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 [
|
||||
|
||||
Reference in New Issue
Block a user