PHP Class eZ\Publish\Core\Persistence\Legacy\Tests\Content\Gateway\DoctrineDatabaseTest

Show file Open project: ezsystems/ezpublish-kernel

Protected Properties

Property Type Description
$databaseGateway eZ\Publish\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase Database gateway to test.

Public Methods

Method Description
testCreateFixtureForMapperExtractContentFromRows ( )
testCreateFixtureForMapperExtractContentFromRowsMultipleVersions ( )
testCtor ( )
testDeleteContent ( )
testDeleteField ( )
testDeleteFields ( )
testDeleteFieldsWithSecondArgument ( )
testDeleteNames ( )
testDeleteNamesWithSecondArgument ( )
testDeleteRelation ( )
testDeleteRelationWithCompositeBitmask ( )
testDeleteRelationsFrom ( )
testDeleteRelationsTo ( )
testDeleteRelationsWithSecondArgument ( )
testDeleteVersions ( )
testDeleteVersionsWithSecondArgument ( )
testGetAllLocationIds ( )
testGetFieldIdsByType ( )
testGetFieldIdsByTypeWithSecondArgument ( )
testGetLastVersionNumber ( ) *
testInsertContentObject ( )
testInsertNewAlwaysAvailableField ( )
testInsertNewField ( )
testInsertRelation ( )
testInsertVersion ( )
testListVersionNumbers ( )
testListVersions ( )
testListVersionsForUser ( )
testLoadNonExistentTranslation ( )
testLoadRelations ( )
testLoadRelationsByType ( )
testLoadRelationsByVersion ( )
testLoadRelationsNoResult ( )
testLoadReverseRelations ( )
testLoadReverseRelationsWithType ( )
testLoadVersionInfo ( )
testLoadWithAllTranslations ( )
testLoadWithSingleTranslation ( )
testSetName ( )
testSetStatus ( )
testSetStatusPublished ( )
testSetStatusUnknownVersion ( )
testUpdateAlwaysAvailableFlagAdd ( ) Test for the updateAlwaysAvailableFlag() method.
testUpdateAlwaysAvailableFlagRemove ( ) Test for the updateAlwaysAvailableFlag() method.
testUpdateContent ( )
testUpdateContentAddAlwaysAvailableFlagMultilingual ( ) Test for the updateAlwaysAvailableFlag() method.
testUpdateContentRemoveAlwaysAvailableFlagMultilingual ( ) Test for the updateAlwaysAvailableFlag() method.
testUpdateField ( )
testUpdateNonTranslatableField ( )
testUpdateVersion ( )

Protected Methods

Method Description
assertValuesInRows ( string $columnKey, array $expectedValues, array $actualRows ) Asserts that $columnKey in $actualRows exactly contains $expectedValues.
countContent ( integer $contentId = null ) : integer Counts the number of content objects.
countContentFields ( integer $contentId = null ) : integer Counts the number of fields.
countContentNames ( integer $contentId = null ) : integer Counts the number of content names.
countContentRelations ( integer $fromId = null, integer $toId = null ) : integer Counts the number of relations in the database.
countContentVersions ( integer $contentId = null ) : integer Counts the number of versions.
getContentFixture ( ) : eZ\Publish\SPI\Persistence\Content Returns a Content fixture.
getCreateStructFixture ( ) : eZ\Publish\SPI\Persistence\Content\CreateStruct Returns a Content fixture.
getDatabaseGateway ( ) : DoctrineDatabase Returns a ready to test DoctrineDatabase gateway.
getFieldFixture ( ) : eZ\Publish\SPI\Persistence\Content\Field Returns a Field fixture.
getMetadataUpdateStructFixture ( ) : eZ\Publish\SPI\Persistence\Content\MetadataUpdateStruct Returns a MetadataUpdateStruct fixture.
getOtherLanguageFieldFixture ( ) : eZ\Publish\SPI\Persistence\Content\Field Returns a Field fixture in a different language.
getRelationCreateStructFixture ( ) : eZ\Publish\SPI\Persistence\Content\Relation\CreateStruct DoctrineDatabaseTest::getRelationCreateStructFixture().
getStorageValueFixture ( ) : StorageFieldValue Returns a StorageFieldValue fixture.
getUpdateStructFixture ( ) : eZ\Publish\SPI\Persistence\Content\UpdateStruct Returns an UpdateStruct fixture.
getVersionFixture ( ) : eZ\Publish\SPI\Persistence\Content\VersionInfo Returns a Version fixture.
insertRelationFixture ( ) Inserts the relation database fixture from relation_data.php.
storeFixture ( string $file, mixed $fixture ) Stores $fixture in $file to be required as a fixture.

Method Details

assertValuesInRows() protected method

Asserts that $columnKey in $actualRows exactly contains $expectedValues.
protected assertValuesInRows ( string $columnKey, array $expectedValues, array $actualRows )
$columnKey string
$expectedValues array
$actualRows array

countContent() protected method

Counts the number of content objects.
protected countContent ( integer $contentId = null ) : integer
$contentId integer
return integer

countContentFields() protected method

Counts the number of fields.
protected countContentFields ( integer $contentId = null ) : integer
$contentId integer
return integer

countContentNames() protected method

Counts the number of content names.
protected countContentNames ( integer $contentId = null ) : integer
$contentId integer
return integer

countContentRelations() protected method

Counts the number of relations in the database.
protected countContentRelations ( integer $fromId = null, integer $toId = null ) : integer
$fromId integer
$toId integer
return integer

countContentVersions() protected method

Counts the number of versions.
protected countContentVersions ( integer $contentId = null ) : integer
$contentId integer
return integer

getContentFixture() protected method

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

getCreateStructFixture() protected method

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

getDatabaseGateway() protected method

Returns a ready to test DoctrineDatabase gateway.
protected getDatabaseGateway ( ) : DoctrineDatabase
return eZ\Publish\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase

getFieldFixture() protected method

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

getMetadataUpdateStructFixture() protected method

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

getOtherLanguageFieldFixture() protected method

Returns a Field fixture in a different language.
protected getOtherLanguageFieldFixture ( ) : eZ\Publish\SPI\Persistence\Content\Field
return eZ\Publish\SPI\Persistence\Content\Field

getRelationCreateStructFixture() protected method

DoctrineDatabaseTest::getRelationCreateStructFixture().
protected getRelationCreateStructFixture ( ) : eZ\Publish\SPI\Persistence\Content\Relation\CreateStruct
return eZ\Publish\SPI\Persistence\Content\Relation\CreateStruct

getStorageValueFixture() protected method

Returns a StorageFieldValue fixture.
protected getStorageValueFixture ( ) : StorageFieldValue
return eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldValue

getUpdateStructFixture() protected method

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

getVersionFixture() protected method

Returns a Version fixture.
protected getVersionFixture ( ) : eZ\Publish\SPI\Persistence\Content\VersionInfo
return eZ\Publish\SPI\Persistence\Content\VersionInfo

insertRelationFixture() protected method

Inserts the relation database fixture from relation_data.php.
protected insertRelationFixture ( )

storeFixture() protected method

Stores $fixture in $file to be required as a fixture.
protected storeFixture ( string $file, mixed $fixture )
$file string
$fixture mixed

testCreateFixtureForMapperExtractContentFromRows() public method

testCreateFixtureForMapperExtractContentFromRowsMultipleVersions() public method

testCtor() public method

public testCtor ( )

testDeleteContent() public method

public testDeleteContent ( )

testDeleteField() public method

public testDeleteField ( )

testDeleteFields() public method

public testDeleteFields ( )

testDeleteFieldsWithSecondArgument() public method

testDeleteNames() public method

public testDeleteNames ( )

testDeleteNamesWithSecondArgument() public method

testDeleteRelation() public method

public testDeleteRelation ( )

testDeleteRelationWithCompositeBitmask() public method

testDeleteRelationsFrom() public method

testDeleteRelationsTo() public method

testDeleteRelationsWithSecondArgument() public method

testDeleteVersions() public method

public testDeleteVersions ( )

testDeleteVersionsWithSecondArgument() public method

testGetAllLocationIds() public method

testGetFieldIdsByType() public method

testGetFieldIdsByTypeWithSecondArgument() public method

testGetLastVersionNumber() public method

*

testInsertContentObject() public method

testInsertNewAlwaysAvailableField() public method

testInsertNewField() public method

public testInsertNewField ( )

testInsertRelation() public method

public testInsertRelation ( )

testInsertVersion() public method

public testInsertVersion ( )

testListVersionNumbers() public method

testListVersions() public method

public testListVersions ( )

testListVersionsForUser() public method

testLoadNonExistentTranslation() public method

testLoadRelations() public method

public testLoadRelations ( )

testLoadRelationsByType() public method

testLoadRelationsByVersion() public method

testLoadRelationsNoResult() public method

testLoadReverseRelations() public method

testLoadReverseRelationsWithType() public method

testLoadVersionInfo() public method

public testLoadVersionInfo ( )

testLoadWithAllTranslations() public method

testLoadWithSingleTranslation() public method

testSetName() public method

public testSetName ( )

testSetStatus() public method

public testSetStatus ( )

testSetStatusPublished() public method

testSetStatusUnknownVersion() public method

testUpdateAlwaysAvailableFlagAdd() public method

Test for the updateAlwaysAvailableFlag() method.

testUpdateAlwaysAvailableFlagRemove() public method

Test for the updateAlwaysAvailableFlag() method.

testUpdateContent() public method

public testUpdateContent ( )

testUpdateContentAddAlwaysAvailableFlagMultilingual() public method

Test for the updateAlwaysAvailableFlag() method.

testUpdateContentRemoveAlwaysAvailableFlagMultilingual() public method

Test for the updateAlwaysAvailableFlag() method.

testUpdateField() public method

public testUpdateField ( )

testUpdateNonTranslatableField() public method

testUpdateVersion() public method

public testUpdateVersion ( )

Property Details

$databaseGateway protected property

Database gateway to test.
protected DoctrineDatabase,eZ\Publish\Core\Persistence\Legacy\Content\Gateway $databaseGateway
return eZ\Publish\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase