Resolved unit tests errors, down from 36 to 9.

Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
This commit is contained in:
Ryan Fletcher
2018-07-14 15:11:21 -04:00
committed by Julius Härtl
parent 881b05aeb1
commit e0049cf07b
2 changed files with 14 additions and 11 deletions

View File

@@ -231,7 +231,7 @@ class PermissionServiceTest extends \Test\TestCase {
$actual = $this->service->checkPermission($mapper, 1234, $permission);
$this->assertTrue($actual);
} else {
$this->setExpectedException(NoPermissionException::class);
$this->expectException(NoPermissionException::class);
$this->service->checkPermission($mapper, 1234, $permission);
}
@@ -255,7 +255,7 @@ class PermissionServiceTest extends \Test\TestCase {
$actual = $this->service->checkPermission($mapper, 1234, $permission);
$this->assertTrue($actual);
} else {
$this->setExpectedException(NoPermissionException::class);
$this->expectException(NoPermissionException::class);
$this->service->checkPermission($mapper, 1234, $permission);
}
@@ -263,8 +263,8 @@ class PermissionServiceTest extends \Test\TestCase {
public function testCheckPermissionNotFound() {
$mapper = $this->getMockBuilder(IPermissionMapper::class)->getMock();
$mapper->expects($this->once())->method('findBoardId')->willThrowException(new NoPermissionException(null));
$this->setExpectedException(NoPermissionException::class);
$mapper->expects($this->once())->method('findBoardId')->willThrowException(new NoPermissionException(null));
$this->expectException(NoPermissionException::class);
$this->service->checkPermission($mapper, 1234, Acl::PERMISSION_READ);
}