Download the PHP package hlogeon/codeception-doctrine-mongo without Composer
On this page you can find all versions of the php package hlogeon/codeception-doctrine-mongo. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hlogeon/codeception-doctrine-mongo
More information about hlogeon/codeception-doctrine-mongo
Files in hlogeon/codeception-doctrine-mongo
Package codeception-doctrine-mongo
Short Description Module provides Codeception integration with Doctrine MongoDB ODM
License
Informations about the package codeception-doctrine-mongo
DoctrineMongoOdm
Allows integration and testing for projects with Doctrine MongoDB ODM. DoctrineMongoOdm uses DocumentManager to perform all database operations.
You should specify a callback function to receive entity manager:
This will use static method of MyDb::createDocumentManager()
to establish DocumentManager.
Status
- Maintainer: hlogeon
- Stability: unstable
- Contact: [email protected]
Config
-
connection_callback: - callable that will return an instance of DocumentManager. This is a must.
Example (
functional.suite.yml
)modules: enabled: [DoctrineMongoOdm] config: DoctrineMongoOdm: cleanup: false
Public Properties
dm
- Document Manager
Actions
dontSeeInRepository
Flushes changes to database and performs ->findOneBy() call for current repository.
param
$entityparam array
$params
flushToDatabase
Performs $dm->flush();
grabFromRepository
Selects field value from repository. It builds query based on array of parameters. You can use entity associations to build complex queries.
Example:
param
$entityparam
$fieldparam array
$paramsreturn
array
haveInRepository
Persists record into repository.
This method crates an entity, and sets its properties directly (via reflection).
Setters of entity won't be executed, but you can create almost any entity and save it to database.
Returns id using getId
of newly created entity.
persistEntity
Adds entity to repository and flushes. You can redefine it's properties with the second parameter.
Example:
param
$objparam array
$values
seeInRepository
Flushes changes to database executes a query defined by array. It builds query based on array of parameters. You can use entity associations to build complex queries.
Example:
Fails if record for given criteria can\'t be found,
param
$entityparam array
$params