PHP Class Phalcon\Test\Unit\Mvc\CollectionTest

Author: Andres Gutierrez ([email protected])
Author: Serghei Iakovlev ([email protected])
Inheritance: extends Phalcon\Test\Module\UnitTest, use trait Helper\CollectionTrait
Show file Open project: phalcon/cphalcon

Public Methods

Method Description
testCollectionsEvents ( )
testCollectionsSerialize ( )
testShouldCatchExceptionOnUpdateNonExistentDocument ( ) Tests triggering exception on update non existent document
testShouldCountDocumentsInCollection ( ) Tests Collection::count
testShouldCreateDocument ( ) Tests Collection::create
testShouldCreateIfNotExistDocument ( ) Tests Collection::createIfNotExist
testShouldGetArrayOfCollectionsByUsingFind ( ) Tests Collection::find
testShouldGetCollectionByUsingFindFirst ( ) Tests Collection::findFirst
testShouldGetTrueWhenSaveDocument ( ) Tests Collection::save
testShouldUpdateDocument ( )
testShouldUseCorrectMongoId ( ) Tests Collection::findById

Protected Methods

Method Description
_before ( ) executed before each test
clearCollection ( )
createDocument ( array $fields )

Method Details

_before() protected method

executed before each test
protected _before ( )

clearCollection() protected method

protected clearCollection ( )

createDocument() protected method

protected createDocument ( array $fields )
$fields array

testCollectionsEvents() public method

testCollectionsSerialize() public method

testShouldCatchExceptionOnUpdateNonExistentDocument() public method

Tests triggering exception on update non existent document
Since: 2016-03-03
Author: Serghei Iakovlev ([email protected])

testShouldCountDocumentsInCollection() public method

Tests Collection::count
Since: 2016-03-13
Author: Serghei Iakovlev ([email protected])

testShouldCreateDocument() public method

Tests Collection::create
Since: 2016-03-13
Author: Serghei Iakovlev ([email protected])

testShouldCreateIfNotExistDocument() public method

Tests Collection::createIfNotExist
Since: 2016-03-13
Author: Serghei Iakovlev ([email protected])

testShouldGetArrayOfCollectionsByUsingFind() public method

Tests Collection::find
Since: 2016-03-03
Author: Serghei Iakovlev ([email protected])

testShouldGetCollectionByUsingFindFirst() public method

Tests Collection::findFirst
Since: 2016-03-13
Author: Serghei Iakovlev ([email protected])

testShouldGetTrueWhenSaveDocument() public method

Tests Collection::save
Since: 2016-03-13
Author: Serghei Iakovlev ([email protected])

testShouldUpdateDocument() public method

testShouldUseCorrectMongoId() public method

Tests Collection::findById
Since: 2016-07-24
Author: Serghei Iakovlev ([email protected])