liip / liip/LiipFunctionalTestBundle

ODM support? WebTestCase::cleanDatabase requires ORM\EntityManager

Open
#274 2 comments 0 reactions 0 assignees View on GitHub
verified
Dominant language
PHP
Stars
648
Forks
179
PR merge metrics
No merged PRs in 30d

Description

Official documentation says it is possible to use mongodb as connection
`$this->loadFixtures($fixtures, null, 'doctrine_mongodb');`
but when tried we see:
`Liip\FunctionalTestBundle\Test\WebTestCase::cleanDatabase() must be an instance of Doctrine\ORM\EntityManager, instance of Doctrine\ODM\MongoDB\DocumentManager given`

`Liip\FunctionalTestBundle\Test\WebTestCase::cleanDatabase` requires
Doctrine\ORM\EntityManager (Hardcoded dependency to ORM) not
Doctrine\Common\Persistence\ObjectManager interface

https://github.com/liip/LiipFunctionalTestBundle/blob/master/Test/WebTestCase.php#L476

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at Test/WebTestCase.php around line 476 and trace cleanDatabase() from loadFixtures(..., 'doctrine_mongodb'); inspect how the EntityManager type requirement is applied. Done means the documented MongoDB fixture path no longer fails because it receives a Doctrine ODM DocumentManager instead of an ORM EntityManager.

Written by the indexing model from the issue text.

Assessment

Tech stack
mongodb, php, symfony
Domain
databases, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.