Codeception / Codeception/module-doctrine

haveFakeRepository from Doctrine module doesn't work

Aperta
#20 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
PHP
Stelle
4
Fork
2
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

#### What are you trying to achieve?
Mock repository with haveFakeRepository method from Doctrine module.

#### What do you get instead?

> Provide console output if related. Use `-vvv` mode for more details.

```bash
[Warning] Repository can't be mocked, the EventManager's repositoryFactory doesn't have "repositoryList" property

```
> Provide test source code if related

```php
$I->haveFakeRepository('App\Entity\User', array('findOneBy' => function ($args) use ($user) {
return $user;
}));
```
### Details

* Codeception version: 2.4.1
* PHP Version: 7.2.4
* Operating System: 16.04.1-Ubuntu
* Installation type: Composer
* List of installed packages (`composer show`)
```bash
doctrine/orm v2.5.13 Object-Relational-Mapper for PHP
symfony/framework-bundle v4.0.8 Symfony FrameworkBundle
```
* Suite configuration:

```yml
actor: ApiTester
modules:
enabled:
- Symfony:
app_path: src
environment: test
params: .env
- REST:
url: /api
depends: Symfony
- Doctrine2:
depends: Symfony
- \Helper\Api```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.