Can't reference Alice tool in EntityContext after step (KnpLabs / FriendlyContexts) - Behat

I am using the really cool knplabs / friendlycontexts package to test VictoireDCMS, Symantec2 open source DCMS .

In fact, it works very well despite my project (not the basic architecture of Symfony-project, but a set of packages with a functional test application).

But ... I am now blocked to use the alice reference in the EntityContext. The documentation provides the following examples:

user.yml

App\Entity\User:
    user-john:
        firstname: John
        lastname: Doe
    user-admin:
        firstname: Admin
        lastname: Admin

      

my.feature

@alice(User)
Feature: My feature
    The feature description

    Background:
        Given the following products
            | name  | user  |
            | Ball  | John  |
            | Shoes | Admin |

    ...

      

It really looks good and is exactly what I want to do and here is my code:

template.yml (complete file)

Victoire\Bundle\TemplateBundle\Entity\Template:
    template_base:
        name: Base
        ...

      

my.feature (complete file)

Given the following page:
    | name      | slug     | locale | template |
    | tatooine  | tatooine | fr     | base     |

      

Unfortunately it doesn't work as expected and I have this error when running my function:

The expected value of type "Victoire \ Bundle \ TemplateBundle \ Entity \ Template" for the association field "Victoire \ Bundle \ PageBundle \ Entity \ BasePage # $ template" got "string" instead. (Doctrine \ ORM \ ORMInvalidArgumentException)

I cannot figure this out and see no difference between the example and my code ... Any help would be appreciated.

+3
symfony behat nelmio-alice victoire


source to share


No one has answered this question yet

Check out similar questions:

8
Reusable property or feature groups in the Alice luminaire generator
7
Can I override the auto-increment ID with Alice Fixtures?
7
Behat and Symfony
3
Symfony 4 firms with Nelmio Alice are not saved
3
Creating Doctrine Binding Data for a Nested Set Object with Alice Fixtures
1
Bilateral relationship with Alice Bundle
0
How do I get Alice to insert lights?
0
Alice Data Fixtures Errors on Windows
0
Alice Fixture: reference to an object that is already saved and hidden
0
Search for doctrine doctrine in 2 fields



All Articles
Loading...
X
Show
Funny
Dev
Pics