diff options
author | Max Kostikov <max@kostikov.co> | 2020-12-04 14:33:34 +0100 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2020-12-04 14:33:34 +0100 |
commit | a9dd6d6bdbc27e11ffe71644670686d82e05420f (patch) | |
tree | 05dd57d1c3f2a8b7541598544b92dbbfe964c329 /tests/unit/Access | |
parent | c9ce562369556ae01044dfb91541c4e4ee35af9e (diff) | |
parent | 9c7ec55b4049599f3a61192eaf020e3a112dfa0e (diff) | |
download | volse-hubzilla-a9dd6d6bdbc27e11ffe71644670686d82e05420f.tar.gz volse-hubzilla-a9dd6d6bdbc27e11ffe71644670686d82e05420f.tar.bz2 volse-hubzilla-a9dd6d6bdbc27e11ffe71644670686d82e05420f.zip |
Merge branch 'dev' into 'dev'
Dev sync
See merge request kostikov/core!2
Diffstat (limited to 'tests/unit/Access')
-rw-r--r-- | tests/unit/Access/AccessListTest.php | 7 | ||||
-rw-r--r-- | tests/unit/Access/PermissionRolesTest.php | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/tests/unit/Access/AccessListTest.php b/tests/unit/Access/AccessListTest.php index dbc19fabb..3c8d3e859 100644 --- a/tests/unit/Access/AccessListTest.php +++ b/tests/unit/Access/AccessListTest.php @@ -63,11 +63,12 @@ class AccessListTest extends UnitTestCase { /** * @expectedException PHPUnit\Framework\Error\Error */ +/* public function testPHPErrorOnInvalidConstructor() { $accessList = new AccessList('invalid'); // Causes: "Illegal string offset 'channel_allow_cid'" } - +*/ public function testDefaultGetExplicit() { $accessList = new AccessList([]); @@ -112,12 +113,14 @@ class AccessListTest extends UnitTestCase { /** * @expectedException PHPUnit\Framework\Error\Error */ +/* public function testPHPErrorOnInvalidSet() { $accessList = new AccessList([]); $accessList->set('invalid'); // Causes: "Illegal string offset 'allow_cid'" } +*/ /** * set_from_array() calls some other functions, too which are not yet unit tested. @@ -188,4 +191,4 @@ class AccessListTest extends UnitTestCase { ]; } -}
\ No newline at end of file +} diff --git a/tests/unit/Access/PermissionRolesTest.php b/tests/unit/Access/PermissionRolesTest.php index 58fd88bb1..dd55eb6e2 100644 --- a/tests/unit/Access/PermissionRolesTest.php +++ b/tests/unit/Access/PermissionRolesTest.php @@ -26,6 +26,7 @@ namespace Zotlabs\Tests\Unit\Access; use Zotlabs\Tests\Unit\UnitTestCase; use Zotlabs\Access\PermissionRoles; use phpmock\phpunit\PHPMock; +use DMS\PHPUnitExtensions\ArraySubset\Assert; /** * @brief Unit Test case for PermissionRoles class. @@ -68,7 +69,7 @@ class PermissionRolesTest extends UnitTestCase { 'social_private' => 'Social - Private' ]; - $this->assertArraySubset(['Social Networking' => $socialNetworking], $roles); + Assert::assertArraySubset(['Social Networking' => $socialNetworking], $roles); $this->assertEquals($socialNetworking, $roles['Social Networking']); $this->assertCount(5, $roles, 'There should be 5 permission groups.'); |