PHP Class Mongolid\ActiveRecordTest

Inheritance: extends TestCas\TestCase
Show file Open project: leroy-merlin-br/mongolid

Protected Properties

Property Type Description
$entity ActiveRecord

Public Methods

Method Description
setUp ( )
tearDown ( )
testDeleteShouldReturnFalseIfCollectionIsNull ( )
testInsertShouldReturnFalseIfCollectionIsNull ( )
testSaveShouldReturnFalseIfCollectionIsNull ( )
testShouldAttachToAttribute ( )
testShouldDelete ( )
testShouldEmbedToAttribute ( )
testShouldGetAll ( )
testShouldGetCollectionName ( )
testShouldGetDataMapper ( )
testShouldGetFirstOrFail ( )
testShouldGetFirstOrNewAndReturnExistingModel ( )
testShouldGetFirstOrNewAndReturnNewModel ( )
testShouldGetFirstWithQuery ( )
testShouldGetSchemaIfFieldsDescribesSchemaFields ( )
testShouldGetSchemaIfFieldsIsTheClassName ( )
testShouldGetSetWriteConcernInActiveRecordClass ( )
testShouldGetWithWhereQuery ( )
testShouldHaveCorrectPropertiesByDefault ( )
testShouldImplementModelTraits ( )
testShouldInsert ( )
testShouldRaiseExceptionWhenHasNoCollectionAndTryToCallAllFunction ( )
testShouldRaiseExceptionWhenHasNoCollectionAndTryToCallFirstFunction ( )
testShouldRaiseExceptionWhenHasNoCollectionAndTryToCallWhereFunction ( )
testShouldSave ( )
testShouldThrowBadMethodCallExceptionWhenCallingInvalidMethod ( )
testShouldUpdate ( )
testUpdateShouldReturnFalseIfCollectionIsNull ( )

Method Details

setUp() public method

public setUp ( )

tearDown() public method

public tearDown ( )

testDeleteShouldReturnFalseIfCollectionIsNull() public method

testInsertShouldReturnFalseIfCollectionIsNull() public method

testSaveShouldReturnFalseIfCollectionIsNull() public method

testShouldAttachToAttribute() public method

testShouldDelete() public method

public testShouldDelete ( )

testShouldEmbedToAttribute() public method

testShouldGetAll() public method

public testShouldGetAll ( )

testShouldGetCollectionName() public method

testShouldGetDataMapper() public method

testShouldGetFirstOrFail() public method

testShouldGetFirstOrNewAndReturnExistingModel() public method

testShouldGetFirstOrNewAndReturnNewModel() public method

testShouldGetFirstWithQuery() public method

testShouldGetSchemaIfFieldsDescribesSchemaFields() public method

testShouldGetSchemaIfFieldsIsTheClassName() public method

testShouldGetSetWriteConcernInActiveRecordClass() public method

testShouldGetWithWhereQuery() public method

testShouldHaveCorrectPropertiesByDefault() public method

testShouldImplementModelTraits() public method

testShouldInsert() public method

public testShouldInsert ( )

testShouldRaiseExceptionWhenHasNoCollectionAndTryToCallAllFunction() public method

testShouldRaiseExceptionWhenHasNoCollectionAndTryToCallFirstFunction() public method

testShouldRaiseExceptionWhenHasNoCollectionAndTryToCallWhereFunction() public method

testShouldSave() public method

public testShouldSave ( )

testShouldThrowBadMethodCallExceptionWhenCallingInvalidMethod() public method

testShouldUpdate() public method

public testShouldUpdate ( )

testUpdateShouldReturnFalseIfCollectionIsNull() public method

Property Details

$entity protected property

protected ActiveRecord,mongolid $entity
return ActiveRecord