/** * Ensures that if we specify a validator class basename that doesn't * exist in the namespace, is() throws an exception. * * Refactored to conform with ZF-2724. * * @group ZF-2724 * @return void * @expectedException Zend_Validate_Exception */ public function testStaticFactoryClassNotFound() { $this->markTestSkipped('is() method should not try to implement its own plugin loader - refactor this'); Validator\ValidatorChain::execute('1234', 'UnknownValidator'); }
/** * Ensures that a validator with constructor arguments can be called * with the static method is(). */ public function testStaticFactoryWithConstructorArguments() { $this->markTestSkipped('is() method should not try to implement its own plugin loader - refactor this'); $this->assertTrue(Validator\ValidatorChain::execute('12', 'Between', array('min' => 1, 'max' => 12))); $this->assertFalse(Validator\ValidatorChain::execute('24', 'Between', array('min' => 1, 'max' => 12))); }
/** * Ensures that if we specify a validator class basename that doesn't * exist in the namespace, is() throws an exception. * * Refactored to conform with ZF-2724. * * @group ZF-2724 * @return void */ public function testStaticFactoryClassNotFound() { $this->setExpectedException('Zend\\Validate\\Exception\\RuntimeException', 'foo'); Validator\ValidatorChain::execute('1234', 'UnknownValidator'); }