|
|
@ -173,7 +173,7 @@ abstract class DbManagerTestCase extends ManagerTestCase |
|
|
|
|
|
|
|
|
|
|
|
if ($isValid) { |
|
|
|
if ($isValid) { |
|
|
|
$this->assertTrue(isset($permissions['createPost'])); |
|
|
|
$this->assertTrue(isset($permissions['createPost'])); |
|
|
|
$this->assertInstanceOf(Permission::className(), $permissions['createPost']); |
|
|
|
$this->assertInstanceOf(Permission::class, $permissions['createPost']); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$this->assertEmpty($permissions); |
|
|
|
$this->assertEmpty($permissions); |
|
|
|
} |
|
|
|
} |
|
|
@ -190,7 +190,7 @@ abstract class DbManagerTestCase extends ManagerTestCase |
|
|
|
|
|
|
|
|
|
|
|
if ($isValid) { |
|
|
|
if ($isValid) { |
|
|
|
$this->assertTrue(isset($roles['Author'])); |
|
|
|
$this->assertTrue(isset($roles['Author'])); |
|
|
|
$this->assertInstanceOf(Role::className(), $roles['Author']); |
|
|
|
$this->assertInstanceOf(Role::class, $roles['Author']); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$this->assertEmpty($roles); |
|
|
|
$this->assertEmpty($roles); |
|
|
|
} |
|
|
|
} |
|
|
@ -206,7 +206,7 @@ abstract class DbManagerTestCase extends ManagerTestCase |
|
|
|
$assignment = $this->auth->getAssignment('createPost', $searchUserId); |
|
|
|
$assignment = $this->auth->getAssignment('createPost', $searchUserId); |
|
|
|
|
|
|
|
|
|
|
|
if ($isValid) { |
|
|
|
if ($isValid) { |
|
|
|
$this->assertInstanceOf(Assignment::className(), $assignment); |
|
|
|
$this->assertInstanceOf(Assignment::class, $assignment); |
|
|
|
$this->assertEquals($userId, $assignment->userId); |
|
|
|
$this->assertEquals($userId, $assignment->userId); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$this->assertEmpty($assignment); |
|
|
|
$this->assertEmpty($assignment); |
|
|
@ -224,8 +224,8 @@ abstract class DbManagerTestCase extends ManagerTestCase |
|
|
|
|
|
|
|
|
|
|
|
if ($isValid) { |
|
|
|
if ($isValid) { |
|
|
|
$this->assertNotEmpty($assignments); |
|
|
|
$this->assertNotEmpty($assignments); |
|
|
|
$this->assertInstanceOf(Assignment::className(), $assignments['createPost']); |
|
|
|
$this->assertInstanceOf(Assignment::class, $assignments['createPost']); |
|
|
|
$this->assertInstanceOf(Assignment::className(), $assignments['updatePost']); |
|
|
|
$this->assertInstanceOf(Assignment::class, $assignments['updatePost']); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$this->assertEmpty($assignments); |
|
|
|
$this->assertEmpty($assignments); |
|
|
|
} |
|
|
|
} |
|
|
|