Codeception / Codeception/module-doctrine

haveFakeRepository from Doctrine module doesn't work

Abierto
#20 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
PHP
Estrellas
4
Forks
2
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

#### 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```

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Start at the Doctrine module's haveFakeRepository method and trace the EventManager repositoryFactory handling that produces the missing "repositoryList" warning. Reproduce the issue with the shown Codeception, Doctrine ORM, Symfony, PHP, and suite configuration; done means the App\Entity\User repository can be mocked as shown without the warning.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
php
Área
databases
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.