public function testUpdateFieldsWithNewLanguageUpdatingStorageHandler()
{
$fieldHandler = $this->getFieldHandler();
$mapperMock = $this->getMapperMock();
$contentGatewayMock = $this->getContentGatewayMock();
$this->assertUpdateFieldsWithNewLanguage(true);
$mapperMock->expects($this->exactly(6))->method('convertToStorageValue')->with($this->isInstanceOf('eZ\\Publish\\SPI\\Persistence\\Content\\Field'))->will($this->returnValue(new StorageFieldValue()));
$contentGatewayMock->expects($this->exactly(3))->method('updateField')->with($this->isInstanceOf('eZ\\Publish\\SPI\\Persistence\\Content\\Field'), $this->isInstanceOf('eZ\\Publish\\Core\\Persistence\\Legacy\\Content\\StorageFieldValue'));
$field = new Field(array('type' => 'some-type', 'value' => new FieldValue(), 'fieldDefinitionId' => 2, 'languageCode' => 'ger-DE'));
$fieldHandler->updateFields($this->getContentFixture(), new UpdateStruct(array('initialLanguageId' => 8, 'fields' => array($field))), $this->getContentTypeFixture());
}