PHP Class eZ\Publish\Core\Repository\Tests\Service\Mock\RelationProcessorTest

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

Public Methods

Method Description
providerForTestAppendRelations ( )
testAppendFieldRelations ( array $fieldRelations, array $expected ) Test for the appendFieldRelations() method.
testAppendFieldRelationsLocationMappingWorks ( ) Test for the appendFieldRelations() method.
testConstructor ( ) Test for the __construct() method.
testProcessFieldRelationsAddsRelations ( ) Test for the processFieldRelations() method.
testProcessFieldRelationsNoChanges ( ) Test for the processFieldRelations() method.
testProcessFieldRelationsRemovesRelations ( ) Test for the processFieldRelations() method.

Protected Methods

Method Description
assertLocationHandlerExpectation ( $locationHandlerMock, $fieldRelations, $type, &$callCounter ) Assert loading Locations to find Content id in {@link RelationProcessor::appendFieldRelations()} method.
getFieldTypeServiceMock ( ) : PHPUnit_Framework_MockObject_MockObject
getPartlyMockedRelationProcessor ( array $methods = null ) : RelationProcessor | PHPUnit_Framework_MockObject_MockObject Returns the content service to test with $methods mocked.
getStubbedRelation ( $id, $type, $fieldDefinitionId, $contentId )

Method Details

assertLocationHandlerExpectation() protected method

Assert loading Locations to find Content id in {@link RelationProcessor::appendFieldRelations()} method.
protected assertLocationHandlerExpectation ( $locationHandlerMock, $fieldRelations, $type, &$callCounter )

getFieldTypeServiceMock() protected method

protected getFieldTypeServiceMock ( ) : PHPUnit_Framework_MockObject_MockObject
return PHPUnit_Framework_MockObject_MockObject

getPartlyMockedRelationProcessor() protected method

Injected Repository comes from {@see \getRepositoryMock()}
protected getPartlyMockedRelationProcessor ( array $methods = null ) : RelationProcessor | PHPUnit_Framework_MockObject_MockObject
$methods array
return eZ\Publish\Core\Repository\Helper\RelationProcessor | PHPUnit_Framework_MockObject_MockObject

getStubbedRelation() protected method

protected getStubbedRelation ( $id, $type, $fieldDefinitionId, $contentId )

providerForTestAppendRelations() public method

testAppendFieldRelations() public method

Test for the appendFieldRelations() method.
public testAppendFieldRelations ( array $fieldRelations, array $expected )
$fieldRelations array
$expected array

testAppendFieldRelationsLocationMappingWorks() public method

Test for the appendFieldRelations() method.

testConstructor() public method

Test for the __construct() method.
public testConstructor ( )

testProcessFieldRelationsAddsRelations() public method

Test for the processFieldRelations() method.

testProcessFieldRelationsNoChanges() public method

Test for the processFieldRelations() method.

testProcessFieldRelationsRemovesRelations() public method

Test for the processFieldRelations() method.