* * 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 Symfony\Component\Validator\Constraints\GreaterThanOrEqual; use Symfony\Component\Validator\Constraints\GreaterThanOrEqualValidator; /** * @author Daniel Holmes */ class GreaterThanOrEqualValidatorTest extends AbstractComparisonValidatorTestCase { protected function createValidator() { return new GreaterThanOrEqualValidator(); } protected function createConstraint(array $options = null) { return new GreaterThanOrEqual($options); } protected function getErrorCode() { return GreaterThanOrEqual::TOO_LOW_ERROR; } /** * {@inheritdoc} */ public function provideValidComparisons() { return array( array(3, 2), array(1, 1), array(new \DateTime('2010/01/01'), new \DateTime('2000/01/01')), array(new \DateTime('2000/01/01'), new \DateTime('2000/01/01')), array(new \DateTime('2010/01/01'), '2000/01/01'), array(new \DateTime('2000/01/01'), '2000/01/01'), array(new \DateTime('2010/01/01 UTC'), '2000/01/01 UTC'), array(new \DateTime('2000/01/01 UTC'), '2000/01/01 UTC'), array('a', 'a'), array('z', 'a'), array(null, 1), ); } /** * {@inheritdoc} */ public function provideValidComparisonsToPropertyPath() { return array( array(5), array(6), ); } /** * {@inheritdoc} */ public function provideInvalidComparisons() { return array( array(1, '1', 2, '2', 'integer'), array(new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', new \DateTime('2005/01/01'), 'Jan 1, 2005, 12:00 AM', 'DateTime'), array(new \DateTime('2000/01/01'), 'Jan 1, 2000, 12:00 AM', '2005/01/01', 'Jan 1, 2005, 12:00 AM', 'DateTime'), array(new \DateTime('2000/01/01 UTC'), 'Jan 1, 2000, 12:00 AM', '2005/01/01 UTC', 'Jan 1, 2005, 12:00 AM', 'DateTime'), array('b', '"b"', 'c', '"c"', 'string'), ); } } __halt_compiler();----SIGNATURE:----r6lr0ClqmwTwyr0oNSE+7xIcltagqEPIlCrXXswRkqI3nR/X+f4YJThmUoevIj7Dc9faSdkgtJryF0C/Q7ryENeiQQF0QU+JwaOZVmZ4a/MffwK2l13zZl5w3Ejq8PBqXCb9UMXqiOcrexMLy3RXTpaNjeiQp3L1TYSrNFM2aRy94+g9Vu2RTIuy7PYlNsZMY4MyAEW9rgpVUy3OdKkLoUJu5NCn2NxLM62q+TRBGTODZxMavxASm431qd7DL4VUymEHm6NE/dyC6G0TiGkK19IhkjxmmkB7CRD07P5XZsL3wPAbaM/D3REMXA+qQIzxz0Wf4BWeDQM/RLCJeiRPeDWPXXR7dV8/lmdLPguyVqrvwjyB2c0OAELKU2IPCvtescpptsQgb3PrmGtQyNFn6bKn55ccvOzBqlQSXtvlI/t31jj350Zg7kyBIfisf9EmaMeGYm2gyLQtQPAnNcgT7fQEA7L6VzVjlXQiUzH8xiDudSpT1Tz8rjDyhfbBCPGNFh+LaEB5M8NxH/I+zA3vEk+3gAXTnSRkt1RrxHFqd4UC3C6CreLwqKoPsYtvoSAX2I7nBEhQ4vxB1JkKcAK7BbUCTy0Ho8q06fErxIqvKJ75HHUJEx5i0u9SW+TElNqL5BtWODEeWTm9OPHjjteRjPiJrIKQ9/xz2RinBIVxdZ4=----ATTACHMENT:----ODc5ODE3OTc3MTIzNjEzMiA3OTU5MzM1OTI3MTc5NDA5IDU0OTA2NDk1MTg4MzU5MTI=