assertSame($expectedValue, SpLuGetUserPermissionByName::getPermissionValue($userId, $permissionName)); $this->assertSame($expectedValue, SpLuGetUserPermissionById::getPermissionValue($userId, $permissionId)); } public function testPermission0True() { static::permissionTest(true, "LU_TEST_SIMPLE_TRUE", 3, 0); } public function testPermission0False() { static::permissionTest(false, "LU_TEST_SIMPLE_FALSE", 4, 0); } public function testPermission0DoesNotExist() { static::permissionTest(null, "LU_TEST_DOES_NOT_EXIST", 0, 0); } public function testPermissionGroup1True() { static::permissionTest(true, "LU_TEST_GROUP_1_TRUE", 5, 1); } public function testPermissionGroup1False() { static::permissionTest(false, "LU_TEST_GROUP_1_FALSE", 6, 1); } public function testPermissionGroup2MultipleGroupsTrue() { static::permissionTest(true, "LU_TEST_GROUP_2_TRUE", 7, 2); } public function testPermissionGroup3MultipleGroupsTrueFalse() { static::permissionTest(false, "LU_TEST_GROUP_3_FALSE", 8, 3); } public function testPermissionGroup4MultipleGroupsFalse() { static::permissionTest(false, "LU_TEST_GROUP_4_FALSE", 9, 4); } public function testPermissionUser5True() { static::permissionTest(true, "LU_TEST_USER_5_TRUE", 10, 5); } public function testPermissionUser6False() { static::permissionTest(false, "LU_TEST_USER_6_FALSE", 11, 6); } }