Skip to content

Commit

Permalink
Replace return mocks with invocation checks
Browse files Browse the repository at this point in the history
These methods do not return anything, and this will break when adding
the void type hint.
  • Loading branch information
greg0ire authored and jordisala1991 committed Mar 18, 2018
1 parent 4375274 commit a3fef65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/Controller/HelperControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,8 @@ public function testRetrieveAutocompleteItems()
$this->admin->getFormFieldDescription('barField')->willReturn($fieldDescription->reveal());
$this->admin->getFormFieldDescriptions()->willReturn(null);
$this->admin->id($entity)->willReturn(123);
$targetAdmin->checkAccess('list')->willReturn(null);
$targetAdmin->setFilterPersister(null)->willReturn(null);
$targetAdmin->checkAccess('list')->shouldBeCalled();
$targetAdmin->setFilterPersister(null)->shouldBeCalled();
$targetAdmin->getDatagrid()->willReturn($datagrid->reveal());
$targetAdmin->getObjectMetadata($entity)->willReturn($metadata->reveal());
$metadata->getTitle()->willReturn('FOO');
Expand Down

0 comments on commit a3fef65

Please sign in to comment.