Пример #1
0
 /**
  * Test that dimensions() validates image dimensions.
  */
 public function testDimensions()
 {
     $this->assertTrue(Validate::dimensions($this->image, 'width', 200));
     $this->assertTrue(Validate::dimensions($this->image, 'height', 267));
     $this->assertFalse(Validate::dimensions($this->image, 'foobar', 267));
     $this->assertTrue(Validate::dimensions(array('tmp_name' => $this->image, 'error' => 0), 'width', 200));
     $this->assertFalse(Validate::dimensions(array('tmp_name' => 'fake.jpg', 'error' => 0), 'height', 267));
 }