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

Commit3746f07

Browse files
committed
Fixed return value
Replaced `array()` with `new ConstraintViolationList()`.
1 parent8251e79 commit3746f07

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎cookbook/form/unit_testing.rst‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ on other extensions. You need add those extensions to the factory object::
177177
use Symfony\Component\Form\Forms;
178178
use Symfony\Component\Form\FormBuilder;
179179
use Symfony\Component\Form\Extension\Validator\Type\FormTypeValidatorExtension;
180+
use Symfony\Component\Validator\ConstraintViolationList;
180181

181182
class TestedTypeTest extends TypeTestCase
182183
{
@@ -185,7 +186,7 @@ on other extensions. You need add those extensions to the factory object::
185186
parent::setUp();
186187
187188
$validator = $this->getMock('\Symfony\Component\Validator\ValidatorInterface');
188-
$validator->method('validate')->will($this->returnValue(array()));
189+
$validator->method('validate')->will($this->returnValue(new ConstraintViolationList()));
189190

190191
$this->factory = Forms::createFormFactoryBuilder()
191192
->addExtensions($this->getExtensions())

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp