public function testGetIndexFieldNameCustomField()
{
$mockedFieldNameResolver = $this->getMockedFieldNameResolver(array('getSearchableFieldMap'));
$customFieldMock = $this->getMock('eZ\\Publish\\API\\Repository\\Values\\Content\\Query\\CustomFieldInterface');
$customFieldMock->expects($this->once())->method('getCustomField')->with('content_type_identifier', 'field_definition_identifier')->will($this->returnValue('custom_field_name'));
$customFieldName = $mockedFieldNameResolver->getIndexFieldName($customFieldMock, 'content_type_identifier', 'field_definition_identifier', 'dummy', 'dummy', false);
$this->assertEquals('custom_field_name', key($customFieldName));
}