diff --git a/tests/Unit/Controller/ApiControllerTest.php b/tests/Unit/Controller/ApiControllerTest.php index 2b614ccc0..5eb058853 100644 --- a/tests/Unit/Controller/ApiControllerTest.php +++ b/tests/Unit/Controller/ApiControllerTest.php @@ -492,11 +492,12 @@ public function testCreateNewForm($expectedForm) { $form->setLastUpdated(123456789); return $form; }); + $this->formMapper->method('findById')->with(7)->willReturn($expectedForm); $apiController->expects($this->once()) ->method('getForm') ->with(7) ->willReturn(new DataResponse('succeeded')); - $this->assertEquals(new DataResponse('succeeded'), $apiController->newForm()); + $this->assertEquals(new DataResponse('succeeded'), $this->$apiController->newForm()); } public function dataCloneForm_exceptions() {