X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fsymfony%2Fvalidator%2FTests%2FConstraints%2FAllTest.php;fp=vendor%2Fsymfony%2Fvalidator%2FTests%2FConstraints%2FAllTest.php;h=25e71a1b44dc4a5ca5fc9a873eb2824f059ccf2c;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/vendor/symfony/validator/Tests/Constraints/AllTest.php b/vendor/symfony/validator/Tests/Constraints/AllTest.php new file mode 100644 index 000000000..25e71a1b4 --- /dev/null +++ b/vendor/symfony/validator/Tests/Constraints/AllTest.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Tests\Constraints; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Validator\Constraints\All; +use Symfony\Component\Validator\Constraints\Valid; + +/** + * @author Bernhard Schussek + */ +class AllTest extends TestCase +{ + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testRejectNonConstraints() + { + new All(array( + 'foo', + )); + } + + /** + * @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException + */ + public function testRejectValidConstraint() + { + new All(array( + new Valid(), + )); + } +}