aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/Access/PermissionsTest.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-06-17 08:48:27 +0000
committerMario <mario@mariovavti.com>2024-06-17 08:48:27 +0000
commit082b615e506ee9eb77680598f6ee0be982ef0429 (patch)
tree25ae4580c99db73c90c2d90a8f9e560816ee278d /tests/unit/Access/PermissionsTest.php
parentff018b975b47a57433b5f76634f9948164919e25 (diff)
parent40a93d92c8d4702da0152e649388885ac583f493 (diff)
downloadvolse-hubzilla-082b615e506ee9eb77680598f6ee0be982ef0429.tar.gz
volse-hubzilla-082b615e506ee9eb77680598f6ee0be982ef0429.tar.bz2
volse-hubzilla-082b615e506ee9eb77680598f6ee0be982ef0429.zip
Merge branch 'add-tests-for-create-identity' into 'dev'
Add tests for create_identity + fixes See merge request hubzilla/core!2137
Diffstat (limited to 'tests/unit/Access/PermissionsTest.php')
-rw-r--r--tests/unit/Access/PermissionsTest.php26
1 files changed, 0 insertions, 26 deletions
diff --git a/tests/unit/Access/PermissionsTest.php b/tests/unit/Access/PermissionsTest.php
index dd001e68a..f9cb25b64 100644
--- a/tests/unit/Access/PermissionsTest.php
+++ b/tests/unit/Access/PermissionsTest.php
@@ -63,14 +63,6 @@ class PermissionsTest extends UnitTestCase {
// There are 17 default perms
$permsCount = 17;
- // Create a stub for global function t() with expectation
- $t = $this->getFunctionMock('Zotlabs\Access', 't');
- $t->expects($this->exactly(2*$permsCount))->willReturnCallback(
- function ($string) {
- return $string;
- }
- );
-
// static method Perms()
$perms = Permissions::Perms();
@@ -97,14 +89,6 @@ class PermissionsTest extends UnitTestCase {
// There are 17 default perms
$permsCount = 17;
- // Create a stub for global function t() with expectation
- $t = $this->getFunctionMock('Zotlabs\Access', 't');
- $t->expects($this->exactly(2*$permsCount))->willReturnCallback(
- function ($string) {
- return $string;
- }
- );
-
$perms = Permissions::Perms('view_');
$this->assertEquals($permsCount, count($perms));
@@ -125,9 +109,6 @@ class PermissionsTest extends UnitTestCase {
* @param array $expected The expected result perms array
*/
public function testFilledPerms($permarr, $expected) {
- // Create a stub for global function t()
- $t = $this->getFunctionMock('Zotlabs\Access', 't');
-
$this->assertEquals($expected, Permissions::FilledPerms($permarr));
}
/**
@@ -209,13 +190,6 @@ class PermissionsTest extends UnitTestCase {
* @uses ::call_hooks
*/
public function testFilledPermsNull() {
- // Create a stub for global function t() with expectation
- $t = $this->getFunctionMock('Zotlabs\Access', 't');
- $t->expects($this->atLeastOnce());
- // Create a stub for global function bt() with expectations
- $bt = $this->getFunctionMock('Zotlabs\Access', 'btlogger');
- $bt->expects($this->once())->with($this->equalTo('FilledPerms: null'));
-
$result = [
'view_stream' => 0,
'send_stream' => 0,