mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-09 00:24:27 +02:00
Fix ACLFormatterTest
- Add nullable to expand() function again - Add angle bracket support to toString()
This commit is contained in:
parent
bc18cde412
commit
aa7be41728
6 changed files with 51 additions and 24 deletions
|
@ -164,15 +164,14 @@ class ACLFormaterTest extends TestCase
|
|||
}
|
||||
|
||||
/**
|
||||
* Test expected exception in case of wrong typehint
|
||||
*
|
||||
* @expectedException Error
|
||||
* Test nullable expand (=> no ACL set)
|
||||
*/
|
||||
public function testExpandNull()
|
||||
{
|
||||
$aclFormatter = new ACLFormatter();
|
||||
|
||||
$aclFormatter->expand(null);
|
||||
$this->assertNull($aclFormatter->expand(null));
|
||||
$this->assertNull($aclFormatter->expand());
|
||||
}
|
||||
|
||||
public function dataAclToString()
|
||||
|
@ -198,6 +197,23 @@ class ACLFormaterTest extends TestCase
|
|||
'input' => 'a,bsd23,4',
|
||||
'assert' => '<4>',
|
||||
],
|
||||
/** @see https://github.com/friendica/friendica/pull/7787 */
|
||||
'bug-7778-angle-brackets' => [
|
||||
'input' => ["<40195>"],
|
||||
'assert' => "<40195>",
|
||||
],
|
||||
Group::FOLLOWERS => [
|
||||
'input' => [Group::FOLLOWERS, 1],
|
||||
'assert' => '<' . Group::FOLLOWERS . '><1>',
|
||||
],
|
||||
Group::MUTUALS => [
|
||||
'input' => [Group::MUTUALS, 1],
|
||||
'assert' => '<' . Group::MUTUALS . '><1>',
|
||||
],
|
||||
'wrong-angle-brackets' => [
|
||||
'input' => ["<asd>","<123>"],
|
||||
'assert' => "<123>",
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue