Add more unit testing

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2017-05-29 00:08:22 +02:00
parent 57f74c98db
commit 19a90809f9
12 changed files with 317 additions and 10 deletions

View File

@@ -120,6 +120,14 @@ class BoardControllerTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals(1, $this->controller->delete(123));
}
public function testDeleteUndo() {
$this->boardService->expects($this->once())
->method('deleteUndo')
->with(123)
->willReturn(1);
$this->assertEquals(1, $this->controller->deleteUndo(123));
}
public function testGetUserPermissions() {
$acl = [
Acl::PERMISSION_READ => true,