Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Hartmann <[email protected]>
  • Loading branch information
Chartman123 committed Oct 27, 2024
1 parent 3b9c974 commit 947e0bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/Unit/Controller/ApiControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -442,13 +442,17 @@ public function testCreateNewForm($expectedForm) {
// TODO fix test, currently unset because behaviour has changed
$expected['state'] = null;
$expected['lastUpdated'] = null;
$this->formMapper->expects($this->once())
$form = $this->formMapper->expects($this->once())
->method('insert')
->with(self::callback(self::createFormValidator($expected)))
->willReturnCallback(function ($form) {
$form->setId(7);
return $form;
});
$this->formsService->expects($this->once())
->method('getForm')
->with($form)
->willReturn(new DataResponse($expected, Http::STATUS_CREATED));
$this->assertEquals(new DataResponse($expected, Http::STATUS_CREATED), $apiController->newForm());
}

Expand Down

0 comments on commit 947e0bf

Please sign in to comment.