PHP Class Mongolid\DataMapper\DataMapperTest

Inheritance: extends TestCas\TestCase
Afficher le fichier Open project: leroy-merlin-br/mongolid

Protected Properties

Свойство Type Description
$eventService Mockery\MockInterface | Mongolid\Event\EventTriggerService

Méthodes publiques

Méthode Description
eventsToBailOperations ( )
getProjections ( ) Retrieves projections that should be replaced by mapper.
getWriteConcernVariations ( )
queryValueScenarios ( )
tearDown ( )
testDatabaseOperationsShouldBailOutIfTheEventHandlerReturnsFalse ( $operation, $dbOperation, $eventName )
testPrepareProjectionShouldConvertArray ( $data, $expectation )
testPrepareProjectionShouldThrownAnException ( )
testShouldBeAbleToConstructWithSchema ( )
testShouldDelete ( $entity, $writeConcern, $shouldFireEventAfter, $expected )
testShouldGetAll ( )
testShouldGetFirstProjectingFields ( )
testShouldGetFirstTroughACacheableCursor ( )
testShouldGetFirstTroughACacheableCursorProjectingFields ( )
testShouldGetFirstWithQuery ( )
testShouldGetNullIfFirstCantFindAnything ( )
testShouldGetRawCollection ( )
testShouldGetSchemaMapper ( )
testShouldGetWithWhereQuery ( )
testShouldInsert ( $entity, $writeConcern, $shouldFireEventAfter, $expected )
testShouldInsertWithoutFiringEvents ( $entity, $writeConcern, $shouldFireEventAfter, $expected )
testShouldParseObjectToDocumentAndPutResultingIdIntoTheGivenObject ( )
testShouldPrepareQueryValue ( $value, $expectation )
testShouldSave ( $entity, $writeConcern, $shouldFireEventAfter, $expected )
testShouldUpdate ( $entity, $writeConcern, $shouldFireEventAfter, $expected )
testUpdateShouldCallInsertWhenObjectHasNoId ( $entity, $writeConcern, $shouldFireEventAfter, $expected )

Méthodes protégées

Méthode Description
expectEventNotToBeFired ( $event, $entity )
expectEventToBeFired ( $event, $entity, boolean $halt, $return = true )
getEventService ( )

Method Details

eventsToBailOperations() public méthode

expectEventNotToBeFired() protected méthode

protected expectEventNotToBeFired ( $event, $entity )

expectEventToBeFired() protected méthode

protected expectEventToBeFired ( $event, $entity, boolean $halt, $return = true )
$halt boolean

getEventService() protected méthode

protected getEventService ( )

getProjections() public méthode

Retrieves projections that should be replaced by mapper.
public getProjections ( )

getWriteConcernVariations() public méthode

queryValueScenarios() public méthode

public queryValueScenarios ( )

tearDown() public méthode

public tearDown ( )

testDatabaseOperationsShouldBailOutIfTheEventHandlerReturnsFalse() public méthode

public testDatabaseOperationsShouldBailOutIfTheEventHandlerReturnsFalse ( $operation, $dbOperation, $eventName )

testPrepareProjectionShouldConvertArray() public méthode

public testPrepareProjectionShouldConvertArray ( $data, $expectation )

testPrepareProjectionShouldThrownAnException() public méthode

testShouldBeAbleToConstructWithSchema() public méthode

testShouldDelete() public méthode

public testShouldDelete ( $entity, $writeConcern, $shouldFireEventAfter, $expected )

testShouldGetAll() public méthode

public testShouldGetAll ( )

testShouldGetFirstProjectingFields() public méthode

testShouldGetFirstTroughACacheableCursor() public méthode

testShouldGetFirstTroughACacheableCursorProjectingFields() public méthode

testShouldGetFirstWithQuery() public méthode

testShouldGetNullIfFirstCantFindAnything() public méthode

testShouldGetRawCollection() public méthode

testShouldGetSchemaMapper() public méthode

testShouldGetWithWhereQuery() public méthode

testShouldInsert() public méthode

public testShouldInsert ( $entity, $writeConcern, $shouldFireEventAfter, $expected )

testShouldInsertWithoutFiringEvents() public méthode

public testShouldInsertWithoutFiringEvents ( $entity, $writeConcern, $shouldFireEventAfter, $expected )

testShouldParseObjectToDocumentAndPutResultingIdIntoTheGivenObject() public méthode

testShouldPrepareQueryValue() public méthode

public testShouldPrepareQueryValue ( $value, $expectation )

testShouldSave() public méthode

public testShouldSave ( $entity, $writeConcern, $shouldFireEventAfter, $expected )

testShouldUpdate() public méthode

public testShouldUpdate ( $entity, $writeConcern, $shouldFireEventAfter, $expected )

testUpdateShouldCallInsertWhenObjectHasNoId() public méthode

public testUpdateShouldCallInsertWhenObjectHasNoId ( $entity, $writeConcern, $shouldFireEventAfter, $expected )

Property Details

$eventService protected_oe property

protected MockInterface,Mockery|EventTriggerService,Mongolid\Event $eventService
Résultat Mockery\MockInterface | Mongolid\Event\EventTriggerService