PHP Class eZ\Publish\Core\Persistence\Legacy\Tests\Content\Type\ContentUpdater\Action\AddFieldTest

Inheritance: extends PHPUnit_Framework_TestCas\PHPUnit_Framework_TestCase
Show file Open project: ezsystems/ezpublish-kernel

Protected Properties

Property Type Description
$addFieldAction eZ\Publish\Core\Persistence\Legacy\Content\Type\ContentUpdater\Action\AddField AddField action to test.
$contentGatewayMock eZ\Publish\Core\Persistence\Legacy\Content\Gateway Content gateway mock.
$contentMapperMock eZ\Publish\Core\Persistence\Legacy\Content\Mapper
$contentStorageHandlerMock eZ\Publish\Core\Persistence\Legacy\Content\StorageHandler Content gateway mock.
$fieldValueConverterMock eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter FieldValue converter mock.

Public Methods

Method Description
getFieldReference ( integer $id, integer $versionNo, string $languageCode ) : eZ\Publish\SPI\Persistence\Content\Field Returns a reference Field.
testApplyMultipleVersionsMultipleTranslations ( )
testApplyMultipleVersionsSingleTranslation ( )
testApplySingleVersionMultipleTranslations ( )
testApplySingleVersionSingleTranslation ( )
testCtor ( )
testInsertExistingField ( )
testInsertExistingFieldUpdating ( )
testInsertNewField ( )
testInsertNewFieldUpdating ( )

Protected Methods

Method Description
getContentFixture ( integer $versionNo, array $languageCodes ) : eZ\Publish\SPI\Persistence\Content Returns a Content fixture.
getContentGatewayMock ( ) : PHPUnit_Framework_MockObject_MockObject | Gateway Returns a Content Gateway mock.
getContentMapperMock ( ) : PHPUnit_Framework_MockObject_MockObject | Mapper Returns a Content mapper mock.
getContentStorageHandlerMock ( ) : PHPUnit_Framework_MockObject_MockObject | StorageHandler Returns a Content StorageHandler mock.
getFieldDefinitionFixture ( ) : eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition Returns a FieldDefinition fixture.
getFieldValueConverterMock ( ) : PHPUnit_Framework_MockObject_MockObject | eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter Returns a FieldValue converter mock.
getMockedAction ( $methods = [] ) : PHPUnit_Framework_MockObject_MockObject | AddField

Method Details

getContentFixture() protected method

Returns a Content fixture.
protected getContentFixture ( integer $versionNo, array $languageCodes ) : eZ\Publish\SPI\Persistence\Content
$versionNo integer
$languageCodes array
return eZ\Publish\SPI\Persistence\Content

getContentGatewayMock() protected method

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

getContentMapperMock() protected method

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

getContentStorageHandlerMock() protected method

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

getFieldDefinitionFixture() protected method

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

getFieldReference() public method

Returns a reference Field.
public getFieldReference ( integer $id, integer $versionNo, string $languageCode ) : eZ\Publish\SPI\Persistence\Content\Field
$id integer
$versionNo integer
$languageCode string
return eZ\Publish\SPI\Persistence\Content\Field

getFieldValueConverterMock() protected method

Returns a FieldValue converter mock.
protected getFieldValueConverterMock ( ) : PHPUnit_Framework_MockObject_MockObject | eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter
return PHPUnit_Framework_MockObject_MockObject | eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter

getMockedAction() protected method

protected getMockedAction ( $methods = [] ) : PHPUnit_Framework_MockObject_MockObject | AddField
$methods
return PHPUnit_Framework_MockObject_MockObject | eZ\Publish\Core\Persistence\Legacy\Content\Type\ContentUpdater\Action\AddField

testApplyMultipleVersionsMultipleTranslations() public method

testApplyMultipleVersionsSingleTranslation() public method

testApplySingleVersionMultipleTranslations() public method

testApplySingleVersionSingleTranslation() public method

testCtor() public method

public testCtor ( )

testInsertExistingField() public method

testInsertExistingFieldUpdating() public method

testInsertNewField() public method

public testInsertNewField ( )

testInsertNewFieldUpdating() public method

Property Details

$addFieldAction protected property

AddField action to test.
protected AddField,eZ\Publish\Core\Persistence\Legacy\Content\Type\ContentUpdater\Action $addFieldAction
return eZ\Publish\Core\Persistence\Legacy\Content\Type\ContentUpdater\Action\AddField

$contentGatewayMock protected property

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

$contentMapperMock protected property

protected Mapper,eZ\Publish\Core\Persistence\Legacy\Content $contentMapperMock
return eZ\Publish\Core\Persistence\Legacy\Content\Mapper

$contentStorageHandlerMock protected property

Content gateway mock.
protected StorageHandler,eZ\Publish\Core\Persistence\Legacy\Content $contentStorageHandlerMock
return eZ\Publish\Core\Persistence\Legacy\Content\StorageHandler

$fieldValueConverterMock protected property

FieldValue converter mock.
protected Converter,eZ\Publish\Core\Persistence\Legacy\Content\FieldValue $fieldValueConverterMock
return eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter