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

Commitab67584

Browse files
committed
minor#7941 added missing ClassMetadata (OskarStark)
This PR was merged into the 2.7 branch.Discussion----------added missing ClassMetadataThis needs to be merged into the following branches tooCloses#7270Refssymfony/symfony#20952Commits-------c193035 added missing ClassMetadata
2 parents984dce8 +c193035 commitab67584

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎form/unit_testing.rst‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ allows you to return a list of extensions to register::
178178
use Symfony\Component\Form\FormBuilder;
179179
use Symfony\Component\Form\Test\TypeTestCase;
180180
use Symfony\Component\Validator\ConstraintViolationList;
181+
use Symfony\Component\Validator\Mapping\ClassMetadata;
181182
use Symfony\Component\Validator\Validator\ValidatorInterface;
182183

183184
class TestedTypeTest extends TypeTestCase
@@ -190,6 +191,9 @@ allows you to return a list of extensions to register::
190191
$validator
191192
->method('validate')
192193
->will($this->returnValue(new ConstraintViolationList()));
194+
$validator
195+
->method('getMetadataFor')
196+
->will($this->returnValue(new ClassMetadata('Symfony\Component\Form\Form')));
193197

194198
return array(
195199
new ValidatorExtension($validator),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp