Skip to content

unit testing form #18

@annemiekebuijs

Description

@annemiekebuijs

Hello,

I'm trying to unit test a form:

use Eckinox\TinymceBundle\Form\Type\TinymceType;


...
->add('description', TinymceType::class, [
    'label' => 'label.description',
    'required' => false,
]);

In my test i do:

$crawler = $this->client->request('GET', '/ ...');
$buttonCrawlerNode = $crawler->selectButton('Save');
$form = $buttonCrawlerNode->form();

In $form variable i have all the fields of the form except for 'description'.
If I change it into a 'TextAreaType' it works fine, it's present in $form.

How do i get this field into my php unit test?

Thank you very much in advance.

With kind regards,
Annemieke

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions