PHP Class eZ\Publish\Core\Persistence\Legacy\Tests\Content\FieldHandlerTest

Inheritance: extends LanguageAwareTestCase
Datei anzeigen Open project: ezsystems/ezpublish-kernel

Protected Properties

Property Type Description
$contentGatewayMock eZ\Publish\Core\Persistence\Legacy\Content\Gateway Gateway mock.
$fieldTypeMock eZ\Publish\SPI\FieldType\FieldType Field type mock.
$fieldTypeRegistryMock eZ\Publish\Core\Persistence\FieldTypeRegistry Field type registry mock.
$mapperMock eZ\Publish\Core\Persistence\Legacy\Content\Mapper Mapper mock.
$storageHandlerMock eZ\Publish\Core\Persistence\Legacy\Content\StorageHandler Storage handler mock.

Public Methods

Method Description
assertUpdateFieldsExistingLanguages ( boolean $storageHandlerUpdatesFields = false )
assertUpdateFieldsForInitialLanguage ( boolean $storageHandlerUpdatesFields = false )
assertUpdateFieldsWithNewLanguage ( boolean $storageHandlerUpdatesFields = false )
testCreateExistingFieldsInNewVersion ( )
testCreateExistingFieldsInNewVersionUpdatingStorageHandler ( )
testCreateNewFields ( )
testCreateNewFieldsForMainLanguage ( )
testCreateNewFieldsForMainLanguageUpdatingStorageHandler ( )
testCreateNewFieldsUpdatingStorageHandler ( )
testDeleteFields ( )
testLoadExternalFieldData ( )
testUpdateFieldsExistingLanguages ( )
testUpdateFieldsExistingLanguagesUpdatingStorageHandler ( )
testUpdateFieldsForInitialLanguage ( )
testUpdateFieldsForInitialLanguageUpdatingStorageHandler ( )
testUpdateFieldsWithNewLanguage ( )
testUpdateFieldsWithNewLanguageUpdatingStorageHandler ( )

Protected Methods

Method Description
assertCreateExistingFieldsInNewVersion ( boolean $storageHandlerUpdatesFields = false )
assertCreateNewFields ( boolean $storageHandlerUpdatesFields = false )
assertCreateNewFieldsForMainLanguage ( boolean $storageHandlerUpdatesFields = false )
getContentFixture ( ) : eZ\Publish\SPI\Persistence\Content Returns a Content fixture.
getContentGatewayMock ( ) : Gateway | PHPUnit_Framework_MockObject_MockObject Returns a mock object for the Content Gateway.
getContentNoFieldsFixture ( ) : eZ\Publish\SPI\Persistence\Content Returns a Content fixture.
getContentPartialFieldsFixture ( ) : eZ\Publish\SPI\Persistence\Content Returns a Content fixture.
getContentSingleLanguageFixture ( ) : eZ\Publish\SPI\Persistence\Content Returns a Content fixture.
getContentTypeFixture ( ) : eZ\Publish\SPI\Persistence\Content\Type Returns a ContentType fixture.
getFieldHandler ( ) : FieldHandler Returns a FieldHandler to test.
getFieldTypeMock ( ) : eZ\Publish\SPI\FieldType\FieldType | PHPUnit_Framework_MockObject_MockObject
getFieldTypeRegistryMock ( ) : FieldTypeRegistry | PHPUnit_Framework_MockObject_MockObject
getMapperMock ( ) : Mapper | PHPUnit_Framework_MockObject_MockObject Returns a Mapper mock.
getStorageHandlerMock ( ) : StorageHandler | PHPUnit_Framework_MockObject_MockObject Returns a StorageHandler mock.
getUpdateStructFixture ( ) : eZ\Publish\SPI\Persistence\Content\UpdateStruct Returns an UpdateStruct fixture.

Method Details

assertCreateExistingFieldsInNewVersion() protected method

protected assertCreateExistingFieldsInNewVersion ( boolean $storageHandlerUpdatesFields = false )
$storageHandlerUpdatesFields boolean

assertCreateNewFields() protected method

protected assertCreateNewFields ( boolean $storageHandlerUpdatesFields = false )
$storageHandlerUpdatesFields boolean

assertCreateNewFieldsForMainLanguage() protected method

protected assertCreateNewFieldsForMainLanguage ( boolean $storageHandlerUpdatesFields = false )
$storageHandlerUpdatesFields boolean

assertUpdateFieldsExistingLanguages() public method

public assertUpdateFieldsExistingLanguages ( boolean $storageHandlerUpdatesFields = false )
$storageHandlerUpdatesFields boolean

assertUpdateFieldsForInitialLanguage() public method

public assertUpdateFieldsForInitialLanguage ( boolean $storageHandlerUpdatesFields = false )
$storageHandlerUpdatesFields boolean

assertUpdateFieldsWithNewLanguage() public method

public assertUpdateFieldsWithNewLanguage ( boolean $storageHandlerUpdatesFields = false )
$storageHandlerUpdatesFields boolean

getContentFixture() protected method

Returns a Content fixture.
protected getContentFixture ( ) : eZ\Publish\SPI\Persistence\Content
return eZ\Publish\SPI\Persistence\Content

getContentGatewayMock() protected method

Returns a mock object for the Content Gateway.
protected getContentGatewayMock ( ) : Gateway | PHPUnit_Framework_MockObject_MockObject
return eZ\Publish\Core\Persistence\Legacy\Content\Gateway | PHPUnit_Framework_MockObject_MockObject

getContentNoFieldsFixture() protected method

Returns a Content fixture.
protected getContentNoFieldsFixture ( ) : eZ\Publish\SPI\Persistence\Content
return eZ\Publish\SPI\Persistence\Content

getContentPartialFieldsFixture() protected method

Returns a Content fixture.
protected getContentPartialFieldsFixture ( ) : eZ\Publish\SPI\Persistence\Content
return eZ\Publish\SPI\Persistence\Content

getContentSingleLanguageFixture() protected method

Returns a Content fixture.
protected getContentSingleLanguageFixture ( ) : eZ\Publish\SPI\Persistence\Content
return eZ\Publish\SPI\Persistence\Content

getContentTypeFixture() protected method

Returns a ContentType fixture.
protected getContentTypeFixture ( ) : eZ\Publish\SPI\Persistence\Content\Type
return eZ\Publish\SPI\Persistence\Content\Type

getFieldHandler() protected method

Returns a FieldHandler to test.
protected getFieldHandler ( ) : FieldHandler
return eZ\Publish\Core\Persistence\Legacy\Content\FieldHandler

getFieldTypeMock() protected method

protected getFieldTypeMock ( ) : eZ\Publish\SPI\FieldType\FieldType | PHPUnit_Framework_MockObject_MockObject
return eZ\Publish\SPI\FieldType\FieldType | PHPUnit_Framework_MockObject_MockObject

getFieldTypeRegistryMock() protected method

protected getFieldTypeRegistryMock ( ) : FieldTypeRegistry | PHPUnit_Framework_MockObject_MockObject
return eZ\Publish\Core\Persistence\FieldTypeRegistry | PHPUnit_Framework_MockObject_MockObject

getMapperMock() protected method

Returns a Mapper mock.
protected getMapperMock ( ) : Mapper | PHPUnit_Framework_MockObject_MockObject
return eZ\Publish\Core\Persistence\Legacy\Content\Mapper | PHPUnit_Framework_MockObject_MockObject

getStorageHandlerMock() protected method

Returns a StorageHandler mock.
protected getStorageHandlerMock ( ) : StorageHandler | PHPUnit_Framework_MockObject_MockObject
return eZ\Publish\Core\Persistence\Legacy\Content\StorageHandler | PHPUnit_Framework_MockObject_MockObject

getUpdateStructFixture() protected method

Returns an UpdateStruct fixture.
protected getUpdateStructFixture ( ) : eZ\Publish\SPI\Persistence\Content\UpdateStruct
return eZ\Publish\SPI\Persistence\Content\UpdateStruct

testCreateExistingFieldsInNewVersion() public method

testCreateExistingFieldsInNewVersionUpdatingStorageHandler() public method

testCreateNewFields() public method

public testCreateNewFields ( )

testCreateNewFieldsForMainLanguage() public method

testCreateNewFieldsForMainLanguageUpdatingStorageHandler() public method

testCreateNewFieldsUpdatingStorageHandler() public method

testDeleteFields() public method

public testDeleteFields ( )

testLoadExternalFieldData() public method

testUpdateFieldsExistingLanguages() public method

testUpdateFieldsExistingLanguagesUpdatingStorageHandler() public method

testUpdateFieldsForInitialLanguage() public method

testUpdateFieldsForInitialLanguageUpdatingStorageHandler() public method

testUpdateFieldsWithNewLanguage() public method

testUpdateFieldsWithNewLanguageUpdatingStorageHandler() public method

Property Details

$contentGatewayMock protected_oe property

Gateway mock.
protected Gateway,eZ\Publish\Core\Persistence\Legacy\Content $contentGatewayMock
return eZ\Publish\Core\Persistence\Legacy\Content\Gateway

$fieldTypeMock protected_oe property

Field type mock.
protected FieldType,eZ\Publish\SPI\FieldType $fieldTypeMock
return eZ\Publish\SPI\FieldType\FieldType

$fieldTypeRegistryMock protected_oe property

Field type registry mock.
protected FieldTypeRegistry,eZ\Publish\Core\Persistence $fieldTypeRegistryMock
return eZ\Publish\Core\Persistence\FieldTypeRegistry

$mapperMock protected_oe property

Mapper mock.
protected Mapper,eZ\Publish\Core\Persistence\Legacy\Content $mapperMock
return eZ\Publish\Core\Persistence\Legacy\Content\Mapper

$storageHandlerMock protected_oe property

Storage handler mock.
protected StorageHandler,eZ\Publish\Core\Persistence\Legacy\Content $storageHandlerMock
return eZ\Publish\Core\Persistence\Legacy\Content\StorageHandler