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

Commitbe4151b

Browse files
committed
expand test to ensure sequences stop after failing validation group
1 parent803e1de commitbe4151b

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

‎src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorFunctionalTest.php‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespaceSymfony\Component\Form\Tests\Extension\Validator\Constraints;
413

514
usePHPUnit\Framework\TestCase;
@@ -142,10 +151,15 @@ public function testCascadeValidationToChildFormsUsingPropertyPathsValidatedInSe
142151
'constraints' => [newNotBlank(['groups' =>'group1'])],
143152
'property_path' =>'[foo]',
144153
])
154+
->add('field2',null, [
155+
'constraints' => [newNotBlank(['groups' =>'group2'])],
156+
'property_path' =>'[bar]',
157+
])
145158
;
146159

147160
$form->submit([
148161
'field1' =>'',
162+
'field2' =>'',
149163
]);
150164

151165
$violations =$this->validator->validate($form);

‎src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
useSymfony\Component\Form\FormInterface;
2626
useSymfony\Component\Form\SubmitButtonBuilder;
2727
useSymfony\Component\Translation\IdentityTranslator;
28-
useSymfony\Component\Validator\Constraints\Collection;
2928
useSymfony\Component\Validator\Constraints\GroupSequence;
3029
useSymfony\Component\Validator\Constraints\NotBlank;
3130
useSymfony\Component\Validator\Constraints\NotNull;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp