You are here

public function ImageValidatorTest::testValidSize in Plug 7

File

lib/Symfony/validator/Symfony/Component/Validator/Tests/Constraints/ImageValidatorTest.php, line 89

Class

ImageValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function testValidSize() {
  $constraint = new Image(array(
    'minWidth' => 1,
    'maxWidth' => 2,
    'minHeight' => 1,
    'maxHeight' => 2,
  ));
  $this->validator
    ->validate($this->image, $constraint);
  $this
    ->assertNoViolation();
}