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

Inheritance: extends LanguageAwareTestCase
Show file Open project: ezsystems/ezpublish-kernel

Protected Properties

Property Type Description
$valueConverterRegistryMock eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry Value converter registry mock.

Public Methods

Method Description
extractContentInfoFromRowProvider ( ) : array Returns test data for {@link testExtractContentInfoFromRow()}.
extractVersionInfoFromRowProvider ( ) : array Returns test data for {@link testExtractVersionInfoFromRow()}.
testConvertToStorageValue ( )
testCreateCreateStructFromContent ( )
testCreateCreateStructFromContentBasicProperties ( $data )
testCreateCreateStructFromContentFieldCount ( $data )
testCreateCreateStructFromContentFieldsNoId ( $data )
testCreateCreateStructFromContentParentLocationsEmpty ( $data )
testCreateRelationFromCreateStruct ( )
testCreateVersionInfoForContent ( )
testCtor ( )
testExtractContentFromRows ( )
testExtractContentFromRowsMultipleVersions ( )
testExtractContentInfoFromRow ( array $fixtures, string $prefix )
testExtractRelationsFromRows ( )

Protected Methods

Method Description
getContentExtractFixture ( ) : array Returns a fixture of database rows for content extraction.
getContentExtractReference ( ) : eZ\Publish\SPI\Persistence\Content Returns a reference result for content extraction.
getCreateStructFixture ( ) : eZ\Publish\SPI\Persistence\Content\CreateStruct Returns a eZ\Publish\SPI\Persistence\Content\CreateStruct fixture.
getFullContentFixture ( ) : eZ\Publish\SPI\Persistence\Content Returns a Content fixture.
getLanguageHandler ( ) : Handler Returns a language handler mock.
getMapper ( $valueConverter = null ) : Mapper Returns a Mapper.
getMultipleVersionsExtractFixture ( ) : string[][] Returns a fixture for mapping multiple versions of a content object.
getMultipleVersionsNamesExtractFixture ( ) : array Returns a fixture of database rows for content names extraction across multiple versions.
getNamesExtractFixture ( ) : array Returns a fixture of database rows for content names extraction.
getRelationCreateStructFixture ( ) : eZ\Publish\SPI\Persistence\Content\Relation\CreateStruct Returns a eZ\Publish\SPI\Persistence\Content\CreateStruct fixture.
getRelationExtractFixture ( ) : array Returns a fixture of database rows for relations extraction.
getRelationExtractReference ( ) : eZ\Publish\SPI\Persistence\Content Returns a reference result for content extraction.
getValueConverterRegistryMock ( ) : ConverterRegistry Returns a FieldValue converter registry mock.

Method Details

extractContentInfoFromRowProvider() public method

Returns test data for {@link testExtractContentInfoFromRow()}.

extractVersionInfoFromRowProvider() public method

Returns test data for {@link testExtractVersionInfoFromRow()}.

getContentExtractFixture() protected method

Fixture is stored in _fixtures/extract_content_from_rows.php
protected getContentExtractFixture ( ) : array
return array

getContentExtractReference() protected method

Fixture is stored in _fixtures/extract_content_from_rows_result.php
protected getContentExtractReference ( ) : eZ\Publish\SPI\Persistence\Content
return eZ\Publish\SPI\Persistence\Content

getCreateStructFixture() protected method

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

getFullContentFixture() protected method

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

getLanguageHandler() protected method

Returns a language handler mock.
protected getLanguageHandler ( ) : Handler
return eZ\Publish\Core\Persistence\Legacy\Content\Language\Handler

getMapper() protected method

Returns a Mapper.
protected getMapper ( $valueConverter = null ) : Mapper
return eZ\Publish\Core\Persistence\Legacy\Content\Mapper

getMultipleVersionsExtractFixture() protected method

Returns a fixture for mapping multiple versions of a content object.
protected getMultipleVersionsExtractFixture ( ) : string[][]
return string[][]

getMultipleVersionsNamesExtractFixture() protected method

Fixture is stored in _fixtures/extract_names_from_rows_multiple_versions.php

getNamesExtractFixture() protected method

Fixture is stored in _fixtures/extract_names_from_rows.php
protected getNamesExtractFixture ( ) : array
return array

getRelationCreateStructFixture() protected method

Returns a eZ\Publish\SPI\Persistence\Content\CreateStruct fixture.
protected getRelationCreateStructFixture ( ) : eZ\Publish\SPI\Persistence\Content\Relation\CreateStruct
return eZ\Publish\SPI\Persistence\Content\Relation\CreateStruct

getRelationExtractFixture() protected method

Fixture is stored in _fixtures/relations.php
protected getRelationExtractFixture ( ) : array
return array

getRelationExtractReference() protected method

Fixture is stored in _fixtures/relations_results.php
protected getRelationExtractReference ( ) : eZ\Publish\SPI\Persistence\Content
return eZ\Publish\SPI\Persistence\Content

getValueConverterRegistryMock() protected method

Returns a FieldValue converter registry mock.
protected getValueConverterRegistryMock ( ) : ConverterRegistry
return eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry

testConvertToStorageValue() public method

testCreateCreateStructFromContent() public method

testCreateCreateStructFromContentBasicProperties() public method

testCreateCreateStructFromContentFieldCount() public method

testCreateCreateStructFromContentFieldsNoId() public method

testCreateCreateStructFromContentParentLocationsEmpty() public method

testCreateRelationFromCreateStruct() public method

testCreateVersionInfoForContent() public method

testCtor() public method

public testCtor ( )

testExtractContentFromRows() public method

testExtractContentFromRowsMultipleVersions() public method

testExtractContentInfoFromRow() public method

public testExtractContentInfoFromRow ( array $fixtures, string $prefix )
$fixtures array
$prefix string

testExtractRelationsFromRows() public method

Property Details

$valueConverterRegistryMock protected property

Value converter registry mock.
protected ConverterRegistry,eZ\Publish\Core\Persistence\Legacy\Content\FieldValue $valueConverterRegistryMock
return eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry