8000 Functional Testing Collection Form Fields · Issue #4124 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
Functional Testing Collection Form Fields #4124
Closed
@gzankevich

Description

@gzankevich

With form collections, we use Javascript to add the new fields and Symfony handles the rest.

In the following example, Office has a many-to-many with Contact.

When attempting the same approach in functional tests, e.g. by doing:

    $form = $buttonCrawlerNode->form(array(
            'company_whateverbundle_officetype[office_contacts][0][contact]' => '1'
    ));

The actual result is:

InvalidArgumentException: The form field "company_whateverbundle_officetype[office_contacts][0][contact]" does not exist.

The expected result is that a new contact is added.

Steps to reproduce:

  1. Create a couple of entities with a many-to-many association between them.
  2. Create a form with a collection field to edit the associations.
  3. Create a functional test and try to create a new association with it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0