/** * Ensures that setImageHeight() returns expected value * * @return void */ public function testSetImageHeight() { $validator = new Zend_Validate_File_ImageSize(array('minwidth' => 100, 'minheight' => 1000, 'maxwidth' => 10000, 'maxheight' => 100000)); $validator->setImageHeight(array('minheight' => 2000, 'maxheight' => 2200)); $this->assertEquals(array('minheight' => 2000, 'maxheight' => 2200), $validator->getImageHeight()); try { $validator->setImageHeight(array('minheight' => 20000, 'maxheight' => 200)); $this->fail("Missing exception"); } catch (Zend_Validate_Exception $e) { $this->assertContains("less than or equal", $e->getMessage()); } }