/** * The server constructor */ public function __construct() { Zend_Amf_Parse_TypeLoader::setResourceLoader(new Zend_Loader_PluginLoader(array("Zend_Amf_Parse_Resource" => "Zend/Amf/Parse/Resource"))); }
/** * Defining new unknown resource type, handler has no parse() * */ public function testCtxNoParse() { Zend_Amf_Parse_TypeLoader::setResourceLoader(new Zend_Amf_TestResourceLoader("3")); try { $resp = $this->_callService("returnCtx"); } catch (Zend_Amf_Server_Exception $e) { $this->assertContains("Could not call parse()", $e->getMessage()); return; } $this->fail("Failed to throw exception on unknown resource"); }