"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "public_html/lists/base/vendor/symfony/symfony/src/Symfony/Component/Validator/Tests/Constraints/CollectionTest.php" between
phplist-3.4.5.tgz and phplist-3.4.6.tgz

About: phpList is a one-way email announcement delivery system for newsletters, publicity lists, notifications, and many other uses (requires PHP and MySQL).

CollectionTest.php  (phplist-3.4.5.tgz):CollectionTest.php  (phplist-3.4.6.tgz)
skipping to change at line 26 skipping to change at line 26
use Symfony\Component\Validator\Constraints\Email; use Symfony\Component\Validator\Constraints\Email;
use Symfony\Component\Validator\Constraints\Optional; use Symfony\Component\Validator\Constraints\Optional;
use Symfony\Component\Validator\Constraints\Required; use Symfony\Component\Validator\Constraints\Required;
use Symfony\Component\Validator\Constraints\Valid; use Symfony\Component\Validator\Constraints\Valid;
/** /**
* @author Bernhard Schussek <bschussek@gmail.com> * @author Bernhard Schussek <bschussek@gmail.com>
*/ */
class CollectionTest extends TestCase class CollectionTest extends TestCase
{ {
/**
* @expectedException \Symfony\Component\Validator\Exception\ConstraintDefin
itionException
*/
public function testRejectInvalidFieldsOption() public function testRejectInvalidFieldsOption()
{ {
$this->expectException('Symfony\Component\Validator\Exception\Constraint DefinitionException');
new Collection([ new Collection([
'fields' => 'foo', 'fields' => 'foo',
]); ]);
} }
/**
* @expectedException \Symfony\Component\Validator\Exception\ConstraintDefin
itionException
*/
public function testRejectNonConstraints() public function testRejectNonConstraints()
{ {
$this->expectException('Symfony\Component\Validator\Exception\Constraint DefinitionException');
new Collection([ new Collection([
'foo' => 'bar', 'foo' => 'bar',
]); ]);
} }
/**
* @expectedException \Symfony\Component\Validator\Exception\ConstraintDefin
itionException
*/
public function testRejectValidConstraint() public function testRejectValidConstraint()
{ {
$this->expectException('Symfony\Component\Validator\Exception\Constraint DefinitionException');
new Collection([ new Collection([
'foo' => new Valid(), 'foo' => new Valid(),
]); ]);
} }
/**
* @expectedException \Symfony\Component\Validator\Exception\ConstraintDefin
itionException
*/
public function testRejectValidConstraintWithinOptional() public function testRejectValidConstraintWithinOptional()
{ {
$this->expectException('Symfony\Component\Validator\Exception\Constraint DefinitionException');
new Collection([ new Collection([
'foo' => new Optional(new Valid()), 'foo' => new Optional(new Valid()),
]); ]);
} }
/**
* @expectedException \Symfony\Component\Validator\Exception\ConstraintDefin
itionException
*/
public function testRejectValidConstraintWithinRequired() public function testRejectValidConstraintWithinRequired()
{ {
$this->expectException('Symfony\Component\Validator\Exception\Constraint DefinitionException');
new Collection([ new Collection([
'foo' => new Required(new Valid()), 'foo' => new Required(new Valid()),
]); ]);
} }
public function testAcceptOptionalConstraintAsOneElementArray() public function testAcceptOptionalConstraintAsOneElementArray()
{ {
$collection1 = new Collection([ $collection1 = new Collection([
'fields' => [ 'fields' => [
'alternate_email' => [ 'alternate_email' => [
 End of changes. 10 change blocks. 
20 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)