public function testGetPluginLoader() { $input = new Zend_Filter_Input(null, null); $loader = $input->getPluginLoader(Zend_Filter_Input::VALIDATE); $this->assertType('Zend_Loader_PluginLoader', $loader, 'Expected object of type Zend_Loader_PluginLoader, got ', get_class($loader)); try { $loader = $input->getPluginLoader('foo'); $this->fail('Expected to catch Zend_Filter_Exception'); } catch (Zend_Exception $e) { $this->assertType('Zend_Filter_Exception', $e, 'Expected object of type Zend_Filter_Exception, got ' . get_class($e)); $this->assertEquals('Invalid type "foo" provided to getPluginLoader()', $e->getMessage()); } }