Skip to content

Commit

Permalink
Merge pull request #3012 from kurzyx/issue-3010-context-never-passed-…
Browse files Browse the repository at this point in the history
…to-data-persister-remove

Fix Context never passed to data persister remove in WriteListener
  • Loading branch information
soyuka committed Aug 23, 2019
2 parents 7a78de4 + f1aa383 commit 561e05b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/EventListener/WriteListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function onKernelView(GetResponseForControllerResultEvent $event): void

break;
case 'DELETE':
$this->dataPersister->remove($controllerResult);
$this->dataPersister->remove($controllerResult, $attributes);
$event->setControllerResult(null);
break;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/EventListener/WriteListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public function testOnKernelViewWithControllerResultAndRemove()

$dataPersisterProphecy = $this->prophesize(DataPersisterInterface::class);
$dataPersisterProphecy->supports($dummy, Argument::type('array'))->willReturn(true)->shouldBeCalled();
$dataPersisterProphecy->remove($dummy)->shouldBeCalled();
$dataPersisterProphecy->remove($dummy, Argument::type('array'))->shouldBeCalled();

$iriConverterProphecy = $this->prophesize(IriConverterInterface::class);
$iriConverterProphecy->getIriFromItem($dummy)->shouldNotBeCalled();
Expand Down

0 comments on commit 561e05b

Please sign in to comment.