Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

haveFakeRepository from Doctrine module doesn't work #20

Open
doctorby opened this issue May 4, 2018 · 0 comments
Open

haveFakeRepository from Doctrine module doesn't work #20

doctorby opened this issue May 4, 2018 · 0 comments

Comments

@doctorby
Copy link

doctorby commented May 4, 2018

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.

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

Provide test source code if related

        $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)
doctrine/orm                        v2.5.13            Object-Relational-Mapper for PHP
symfony/framework-bundle            v4.0.8             Symfony FrameworkBundle
  • Suite configuration:
actor: ApiTester
modules:
    enabled:
        - Symfony:
            app_path: src
            environment: test
            params: .env
        - REST:
            url: /api
            depends: Symfony
        - Doctrine2:
            depends: Symfony
        - \Helper\Api```
@Naktibalda Naktibalda transferred this issue from Codeception/Codeception Jan 6, 2021
@TavoNiievez TavoNiievez transferred this issue from Codeception/module-doctrine2 Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant