You are here

public function ImageValidatorTest::testValidSize in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/validator/Tests/Constraints/ImageValidatorTest.php \Symfony\Component\Validator\Tests\Constraints\ImageValidatorTest::testValidSize()

File

vendor/symfony/validator/Tests/Constraints/ImageValidatorTest.php, line 92

Class

ImageValidatorTest
@requires extension fileinfo

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();
}