/** * Constructor * * @param string|Zend_Queue_Adapter_Abstract $adapter * @param array $config */ public function testConstruct() { // Test Zend_Config $config = array('name' => 'queue1', 'params' => array(), 'adapter' => 'array'); $zend_config = new Zend_Config($config); $obj = new Zend_Queue($config); $this->assertTrue($obj instanceof Zend_Queue); // test logger $this->assertTrue($obj->getLogger() instanceof Zend_Log); $obj = new Zend_Queue($zend_config); $this->assertTrue($obj instanceof Zend_Queue); try { $obj = new Zend_Queue('ops'); $this->fail('Zend_Queue cannot accept a string'); } catch (Exception $e) { $this->assertTrue(true); } }