public function testGoodInput() { $input = array('Username' => 'gerard', 'Password' => 'password'); $form = new Form($this->_validators, $input); try { $form->getAlpha('Username'); $this->fail("An expected exception was not raised."); } catch (Exception $e) { $this->assertEquals("Form::isValid() must be called first", $e->getMessage()); } $this->assertTrue($form->isValid()); $this->assertEquals($form->getAlpha('Username'), 'gerard'); }