Check null for acl-fields
This commit is contained in:
parent
aa94d27e6e
commit
3eda62bfa6
5 changed files with 29 additions and 16 deletions
|
@ -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 [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue