PHP Class eZ\Publish\Core\SignalSlot\Tests\ServiceTest

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

Public Methods

Method Description
testService ( $method, $parameters, $return, $emitNr, $signalClass = '', array $signalAttr = null )

Protected Methods

Method Description
getContent ( VersionInfo $versionInfo ) : eZ\Publish\API\Repository\Values\Content\Content Creates a content object from $versionInfo.
getContentInfo ( mixed $contentId, mixed $remoteId ) : eZ\Publish\API\Repository\Values\Content\ContentInfo Creates a content info from $contentId and $remoteId.
getServiceMock ( ) Returns a mock of the aggregated service.
getSignalSlotService ( mixed $innerService, SignalDispatcher $dispatcher ) : object Returns an instance of the SignalSlot service to test.
getUser ( mixed $userId, mixed $userRemoteId, integer $userVersionNo ) : User Creates a User object from $userId, $userRemoteId and $userVersionNo.
getUserGroup ( mixed $groupId, mixed $groupRemoteId, integer $groupVersioNo ) : UserGroup Returns a new UserGroup.
getVersionInfo ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, integer $versionNo ) : eZ\Publish\API\Repository\Values\Content\VersionInfo Creates a version info object from $contentInfo and $versionNo.

Method Details

getContent() protected method

Creates a content object from $versionInfo.
protected getContent ( VersionInfo $versionInfo ) : eZ\Publish\API\Repository\Values\Content\Content
$versionInfo eZ\Publish\Core\Repository\Values\Content\VersionInfo
return eZ\Publish\API\Repository\Values\Content\Content

getContentInfo() protected method

Creates a content info from $contentId and $remoteId.
protected getContentInfo ( mixed $contentId, mixed $remoteId ) : eZ\Publish\API\Repository\Values\Content\ContentInfo
$contentId mixed
$remoteId mixed
return eZ\Publish\API\Repository\Values\Content\ContentInfo

getServiceMock() abstract protected method

Returns a mock of the aggregated service.
abstract protected getServiceMock ( )

getSignalSlotService() abstract protected method

Returns an instance of the SignalSlot service to test.
abstract protected getSignalSlotService ( mixed $innerService, SignalDispatcher $dispatcher ) : object
$innerService mixed mock of the inner service used by the signal slot one used to test whether the original method is called is correctly called.
$dispatcher eZ\Publish\Core\SignalSlot\SignalDispatcher mock of the dispatcher used to test whether the emit method is correctly called
return object An instance of the SignalSlot service

getUser() protected method

Creates a User object from $userId, $userRemoteId and $userVersionNo.
protected getUser ( mixed $userId, mixed $userRemoteId, integer $userVersionNo ) : User
$userId mixed
$userRemoteId mixed
$userVersionNo integer
return eZ\Publish\Core\Repository\Values\User\User

getUserGroup() protected method

Returns a new UserGroup.
protected getUserGroup ( mixed $groupId, mixed $groupRemoteId, integer $groupVersioNo ) : UserGroup
$groupId mixed
$groupRemoteId mixed
$groupVersioNo integer
return eZ\Publish\Core\Repository\Values\User\UserGroup

getVersionInfo() protected method

Creates a version info object from $contentInfo and $versionNo.
protected getVersionInfo ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo, integer $versionNo ) : eZ\Publish\API\Repository\Values\Content\VersionInfo
$contentInfo eZ\Publish\API\Repository\Values\Content\ContentInfo
$versionNo integer
return eZ\Publish\API\Repository\Values\Content\VersionInfo

testService() public method

public testService ( $method, $parameters, $return, $emitNr, $signalClass = '', array $signalAttr = null )
$signalAttr array