public function forwardConvertsObjectsFoundInArgumentsIntoIdentifiersBeforePassingThemToRequest()
{
$originalArguments = ['foo' => 'bar', 'bar' => ['someObject' => new \stdClass()]];
$convertedArguments = ['foo' => 'bar', 'bar' => ['someObject' => ['__identity' => 'x']]];
$mockPersistenceManager = $this->createMock(PersistenceManagerInterface::class);
$mockPersistenceManager->expects($this->once())->method('convertObjectsToIdentityArrays')->with($originalArguments)->will($this->returnValue($convertedArguments));
$controller = $this->getAccessibleMock(AbstractController::class, ['processRequest']);
$this->inject($controller, 'persistenceManager', $mockPersistenceManager);
$controller->_call('initializeController', $this->mockActionRequest, $this->mockHttpResponse);
$this->mockActionRequest->expects($this->atLeastOnce())->method('setArguments')->with($convertedArguments);
try {
$controller->_call('forward', 'other', 'Bar', 'MyPackage', $originalArguments);
} catch (ForwardException $exception) {
}
}