Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to update form integration tests in 2.8 #17088

Closed
@pschultz

Description

@pschultz

During our update to 2.8 we noticed that thecookbook article on form tests is outdated.

It still says

$type =newTestedType();$form =$this->factory->create($type);

however, passing type instances toFormFactoryInterface::create is deprecated in favor of FQCNs.

The simple example in the article is trivial to update, but we can't figure out how to do it for form types that have dependencies. Following the article back in the days, we have written tests that look something like this:

// setup collaborators$type =newMyFormType($mock1,$mock2,$moreMocksHere);$form =$this->factory->create($type);// submit, assert, etc.

Is there any documentation available on how to update these tests for Symfony 2.8?

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


      [8]ページ先頭

      ©2009-2025 Movatter.jp