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

Show file Open project: ezsystems/ezpublish-kernel

Protected Properties

Property Type Description
$contentHandler eZ\Publish\Core\Persistence\Legacy\Content\Handler Content handler to test.
$contentTypeHandlerMock eZ\Publish\Core\Persistence\Legacy\Content\Type\Handler ContentType handler mock.
$fieldHandlerMock eZ\Publish\Core\Persistence\Legacy\Content\FieldHandler Field handler mock.
$gatewayMock eZ\Publish\Core\Persistence\Legacy\Content\Gateway Gateway mock.
$locationGatewayMock eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway Location gateway mock.
$mapperMock eZ\Publish\Core\Persistence\Legacy\Content\Mapper Mapper mock.
$slugConverterMock eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\SlugConverter Slug converter mock.
$treeHandlerMock eZ\Publish\Core\Persistence\Legacy\Content\TreeHandler Location handler mock.
$typeGatewayMock eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway Type gateway mock.
$urlAliasGatewayMock eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway Location handler mock.

Public Methods

Method Description
getCreateStructFixture ( ) : eZ\Publish\SPI\Persistence\Content\CreateStruct Returns a CreateStruct fixture.
testAddRelation ( )
testCopyAllVersions ( )
testCopySingleVersion ( )
testCopyThrowsNotFoundExceptionContentNotFound ( )
testCopyThrowsNotFoundExceptionVersionNotFound ( )
testCreate ( )
testCreateDraftFromVersion ( )
testCtor ( )
testDeleteContentWithLocations ( ) Test for the deleteContent() method.
testDeleteContentWithoutLocations ( ) Test for the deleteContent() method.
testDeleteVersion ( )
testListVersions ( )
testLoad ( )
testLoadContentInfoByRemoteId ( )
testLoadDraftsForUser ( )
testLoadErrorNotFound ( )
testLoadRelations ( )
testLoadReverseRelations ( )
testPublish ( )
testPublishFirstVersion ( )
testRemoveRawContent ( )
testRemoveRelation ( )
testSetStatus ( )
testUpdateContent ( )
testUpdateMetadata ( )
testUpdateMetadataUpdatesPathIdentificationString ( )

Protected Methods

Method Description
getContentFixtureForDraft ( ) : eZ\Publish\SPI\Persistence\Content Returns a Content for {@link testCreateDraftFromVersion()}.
getContentHandler ( ) : Handler Returns the handler to test.
getContentTypeHandlerMock ( ) : PHPUnit_Framework_MockObject_MockObject | Handler Returns a ContentTypeHandler mock.
getFieldHandlerMock ( ) : FieldHandler Returns a FieldHandler mock.
getGatewayMock ( ) : Gateway Returns a mock object for the Content Gateway.
getLocationGatewayMock ( ) : Gateway Returns a Location Gateway mock.
getMapperMock ( ) : Mapper Returns a Mapper mock.
getPartlyMockedHandler ( array $methods ) : Handler Returns the handler to test with $methods mocked.
getRelationFixture ( )
getSlugConverterMock ( ) : SlugConverter Returns a mock object for the UrlAlias Handler.
getTreeHandlerMock ( ) : PHPUnit_Framework_MockObject_MockObject | TreeHandler Returns a TreeHandler mock.
getTypeGatewayMock ( ) : Gateway Returns a Content Type gateway mock.
getUrlAliasGatewayMock ( ) : Gateway Returns a mock object for the UrlAlias Gateway.

Method Details

getContentFixtureForDraft() protected method

Returns a Content for {@link testCreateDraftFromVersion()}.
protected getContentFixtureForDraft ( ) : eZ\Publish\SPI\Persistence\Content
return eZ\Publish\SPI\Persistence\Content

getContentHandler() protected method

Returns the handler to test.
protected getContentHandler ( ) : Handler
return eZ\Publish\Core\Persistence\Legacy\Content\Handler

getContentTypeHandlerMock() protected method

Returns a ContentTypeHandler mock.
protected getContentTypeHandlerMock ( ) : PHPUnit_Framework_MockObject_MockObject | Handler
return PHPUnit_Framework_MockObject_MockObject | eZ\Publish\Core\Persistence\Legacy\Content\Type\Handler

getCreateStructFixture() public method

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

getFieldHandlerMock() protected method

Returns a FieldHandler mock.
protected getFieldHandlerMock ( ) : FieldHandler
return eZ\Publish\Core\Persistence\Legacy\Content\FieldHandler

getGatewayMock() protected method

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

getLocationGatewayMock() protected method

Returns a Location Gateway mock.
protected getLocationGatewayMock ( ) : Gateway
return eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway

getMapperMock() protected method

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

getPartlyMockedHandler() protected method

Returns the handler to test with $methods mocked.
protected getPartlyMockedHandler ( array $methods ) : Handler
$methods array
return eZ\Publish\Core\Persistence\Legacy\Content\Handler

getRelationFixture() protected method

protected getRelationFixture ( )

getSlugConverterMock() protected method

Returns a mock object for the UrlAlias Handler.
protected getSlugConverterMock ( ) : SlugConverter
return eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\SlugConverter

getTreeHandlerMock() protected method

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

getTypeGatewayMock() protected method

Returns a Content Type gateway mock.
protected getTypeGatewayMock ( ) : Gateway
return eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway

getUrlAliasGatewayMock() protected method

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

testAddRelation() public method

public testAddRelation ( )

testCopyAllVersions() public method

public testCopyAllVersions ( )

testCopySingleVersion() public method

testCopyThrowsNotFoundExceptionContentNotFound() public method

testCopyThrowsNotFoundExceptionVersionNotFound() public method

testCreate() public method

public testCreate ( )

testCreateDraftFromVersion() public method

testCtor() public method

public testCtor ( )

testDeleteContentWithLocations() public method

Test for the deleteContent() method.

testDeleteContentWithoutLocations() public method

Test for the deleteContent() method.

testDeleteVersion() public method

public testDeleteVersion ( )

testListVersions() public method

public testListVersions ( )

testLoad() public method

public testLoad ( )

testLoadContentInfoByRemoteId() public method

testLoadDraftsForUser() public method

testLoadErrorNotFound() public method

testLoadRelations() public method

public testLoadRelations ( )

testLoadReverseRelations() public method

testPublish() public method

public testPublish ( )

testPublishFirstVersion() public method

testRemoveRawContent() public method

testRemoveRelation() public method

public testRemoveRelation ( )

testSetStatus() public method

public testSetStatus ( )

testUpdateContent() public method

public testUpdateContent ( )

testUpdateMetadata() public method

public testUpdateMetadata ( )

testUpdateMetadataUpdatesPathIdentificationString() public method

Property Details

$contentHandler protected property

Content handler to test.
protected Handler,eZ\Publish\Core\Persistence\Legacy\Content $contentHandler
return eZ\Publish\Core\Persistence\Legacy\Content\Handler

$contentTypeHandlerMock protected property

ContentType handler mock.
protected Handler,eZ\Publish\Core\Persistence\Legacy\Content\Type $contentTypeHandlerMock
return eZ\Publish\Core\Persistence\Legacy\Content\Type\Handler

$fieldHandlerMock protected property

Field handler mock.
protected FieldHandler,eZ\Publish\Core\Persistence\Legacy\Content $fieldHandlerMock
return eZ\Publish\Core\Persistence\Legacy\Content\FieldHandler

$gatewayMock protected property

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

$locationGatewayMock protected property

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

$mapperMock protected property

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

$slugConverterMock protected property

Slug converter mock.
protected SlugConverter,eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias $slugConverterMock
return eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\SlugConverter

$treeHandlerMock protected property

Location handler mock.
protected TreeHandler,eZ\Publish\Core\Persistence\Legacy\Content $treeHandlerMock
return eZ\Publish\Core\Persistence\Legacy\Content\TreeHandler

$typeGatewayMock protected property

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

$urlAliasGatewayMock protected property

Location handler mock.
protected Gateway,eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias $urlAliasGatewayMock
return eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway