8000 Fixed return value · symfony/symfony-docs@0b2c979 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0b2c979

Browse files
sarcherweaverryan
authored andcommitted
Fixed return value
Replaced `array()` with `new ConstraintViolationList()`.
1 parent 7b7f9ee commit 0b2c979

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)
0