Skip to content

Commit

Permalink
fixup! fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Hartmann <[email protected]>
  • Loading branch information
Chartman123 committed Oct 5, 2024
1 parent 0f06790 commit 3f2bc42
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions tests/Unit/Controller/ApiControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -614,21 +614,6 @@ private function formAccess(bool $hasUserAccess = true, bool $hasFormExpired = f
->willReturn($canSubmit);
}

public function testCloneQuestion_notFound() {
$this->questionMapper->method('findById')->with(42)->willThrowException($this->createMock(IMapperException::class));
$this->expectException(OCSNotFoundException::class);
$this->apiController->newQuestion(1, null, '', 42);
}

public function testCloneQuestion_noPermission() {
$form = Form::fromParams(['ownerId' => 'otherUser']);
$question = Question::fromParams(['formId' => 1]);
$this->questionMapper->method('findById')->with(42)->willReturn($question);
$this->formMapper->method('findById')->with(1)->willReturn($form);
$this->expectException(OCSForbiddenException::class);
$this->apiController->newQuestion(1, null, '', 42);
}

public function testUploadFiles() {
$form = new Form();
$form->setId(1);
Expand Down

0 comments on commit 3f2bc42

Please sign in to comment.