composer update
This commit is contained in:
parent
f6abc3dce2
commit
71dfaca858
1753 changed files with 45274 additions and 14619 deletions
|
@ -53,4 +53,59 @@ EOF;
|
|||
|
||||
$this->assertSame($expected, (string) $violation);
|
||||
}
|
||||
|
||||
public function testToStringHandlesCodes()
|
||||
{
|
||||
$violation = new ConstraintViolation(
|
||||
'42 cannot be used here',
|
||||
'this is the message template',
|
||||
array(),
|
||||
array('some_value' => 42),
|
||||
'some_value',
|
||||
null,
|
||||
null,
|
||||
0
|
||||
);
|
||||
|
||||
$expected = <<<'EOF'
|
||||
Array.some_value:
|
||||
42 cannot be used here (code 0)
|
||||
EOF;
|
||||
|
||||
$this->assertSame($expected, (string) $violation);
|
||||
}
|
||||
|
||||
public function testToStringOmitsEmptyCodes()
|
||||
{
|
||||
$expected = <<<'EOF'
|
||||
Array.some_value:
|
||||
42 cannot be used here
|
||||
EOF;
|
||||
|
||||
$violation = new ConstraintViolation(
|
||||
'42 cannot be used here',
|
||||
'this is the message template',
|
||||
array(),
|
||||
array('some_value' => 42),
|
||||
'some_value',
|
||||
null,
|
||||
null,
|
||||
null
|
||||
);
|
||||
|
||||
$this->assertSame($expected, (string) $violation);
|
||||
|
||||
$violation = new ConstraintViolation(
|
||||
'42 cannot be used here',
|
||||
'this is the message template',
|
||||
array(),
|
||||
array('some_value' => 42),
|
||||
'some_value',
|
||||
null,
|
||||
null,
|
||||
''
|
||||
);
|
||||
|
||||
$this->assertSame($expected, (string) $violation);
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue