markTestSkipped('Db setup required'); } $options = json_decode(TESTS_ZEND_QUEUE_DB, true); $config = array('name' => 'queue1', 'driverOptions' => array('host' => $options['host'], 'username' => $options['username'], 'password' => $options['password'], 'dbname' => $options['dbname'], 'type' => $options['type'], 'port' => $options['port'])); // optional parameter $adapter = new Zend_Queue('Db', $config); $this->assertTrue($adapter instanceof Zend_Queue); } public function testMemcacheq() { if ( TESTS_ZEND_QUEUE_MEMCACHEQ_HOST === false || TESTS_ZEND_QUEUE_MEMCACHEQ_PORT === false ) { $this->markTestSkipped('MemcacheQ setup required'); } $config = array('name' => 'queue1', 'driverOptions' => array('host' => TESTS_ZEND_QUEUE_MEMCACHEQ_HOST, 'port' => TESTS_ZEND_QUEUE_MEMCACHEQ_PORT)); $adapter = new Zend_Queue('Memcacheq', $config); $this->assertTrue($adapter instanceof Zend_Queue); } public function testActivemq() { if ( TESTS_ZEND_QUEUE_ACTIVEMQ_SCHEME === false || TESTS_ZEND_QUEUE_ACTIVEMQ_HOST === false || TESTS_ZEND_QUEUE_ACTIVEMQ_PORT === false ) { $this->markTestSkipped('ActiveMQ setup required'); } $config = array('name' => 'queue1', 'driverOptions' => array('host' => TESTS_ZEND_QUEUE_ACTIVEMQ_HOST, 'port' => TESTS_ZEND_QUEUE_ACTIVEMQ_PORT, 'scheme' => TESTS_ZEND_QUEUE_ACTIVEMQ_SCHEME, 'username' => '', 'password' => '')); $adapter = new Zend_Queue('Activemq', $config); $this->assertTrue($adapter instanceof Zend_Queue); } public function testArray() { $config = array('name' => 'queue1', 'driverOptions' => array()); $adapter = new Zend_Queue('Array', $config); $this->assertTrue($adapter instanceof Zend_Queue); } }