Преглед на файлове

[REVIEW] Added PlatformJobQueue Zend_Queue adapter; fixed copyright notices throughout Zend_Queue code and testbed

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@17188 44c647ce-9c0f-0410-b52a-842ac1e357ba
matthew преди 16 години
родител
ревизия
3889a35e52
променени са 32 файла, в които са добавени 936 реда и са изтрити 52 реда
  1. 2 2
      library/Zend/Queue/Adapter/Db/Queue.php
  2. 343 0
      library/Zend/Queue/Adapter/PlatformJobQueue.php
  3. 2 2
      library/Zend/Queue/Message/Iterator.php
  4. 194 0
      library/Zend/Queue/Message/PlatformJob.php
  5. 2 2
      library/Zend/Queue/Stomp/Client.php
  6. 10 0
      tests/TestConfiguration.php.dist
  7. 2 2
      tests/Zend/Queue/Adapter/AdapterTest.php
  8. 1 1
      tests/Zend/Queue/Adapter/ApachemqTest.php
  9. 2 2
      tests/Zend/Queue/Adapter/ArrayTest.php
  10. 2 2
      tests/Zend/Queue/Adapter/DbTest.php
  11. 2 2
      tests/Zend/Queue/Adapter/Iterator2.php
  12. 2 2
      tests/Zend/Queue/Adapter/MemcacheqTest.php
  13. 2 2
      tests/Zend/Queue/Adapter/MessageTestClass.php
  14. 2 2
      tests/Zend/Queue/Adapter/NullTest.php
  15. 336 0
      tests/Zend/Queue/Adapter/PlatformJobQueueTest.php
  16. 1 1
      tests/Zend/Queue/Adapter/StompIOTest.php
  17. 1 1
      tests/Zend/Queue/Adapter/StompTest.php
  18. 4 3
      tests/Zend/Queue/AllTests.php
  19. 2 2
      tests/Zend/Queue/Custom/DbForUpdate.php
  20. 2 2
      tests/Zend/Queue/Custom/Message.php
  21. 2 2
      tests/Zend/Queue/Custom/Messages.php
  22. 2 2
      tests/Zend/Queue/Custom/Queue.php
  23. 2 2
      tests/Zend/Queue/CustomTest.php
  24. 2 2
      tests/Zend/Queue/FactoryTest.php
  25. 2 2
      tests/Zend/Queue/Message/IteratorTest.php
  26. 2 2
      tests/Zend/Queue/MessageTest.php
  27. 2 2
      tests/Zend/Queue/Queue1Test.php
  28. 2 2
      tests/Zend/Queue/Queue2Test.php
  29. 2 2
      tests/Zend/Queue/QueueBaseTest.php
  30. 2 2
      tests/Zend/Queue/QueueTest.php
  31. 1 1
      tests/Zend/Queue/Stomp/ClientTest.php
  32. 1 1
      tests/Zend/Queue/Stomp/FrameTest.php

+ 2 - 2
library/Zend/Queue/Adapter/Db/Queue.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage Adapter
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id$
  */
@@ -29,7 +29,7 @@ require_once 'Zend/Db/Table/Abstract.php';
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage Adapter
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 class Zend_Queue_Adapter_Db_Queue extends Zend_Db_Table_Abstract

+ 343 - 0
library/Zend/Queue/Adapter/PlatformJobQueue.php

@@ -0,0 +1,343 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Queue
+ * @subpackage Adapter
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/**
+ * @see Zend_Queue_Adapter_AdapterAbstract
+ */
+require_once 'Zend/Queue/Adapter/AdapterAbstract.php';
+
+/**
+ * Zend Platform JobQueue adapter
+ *
+ * @category   Zend
+ * @package    Zend_Queue
+ * @subpackage Adapter
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class Zend_Queue_Adapter_PlatformJobQueue extends Zend_Queue_Adapter_AdapterAbstract
+{
+    /**
+     * @var ZendApi_JobQueue
+     */
+    protected $_zendQueue;
+
+    /**
+     * Constructor
+     *
+     * @param  array|Zend_Config $options
+     * @param  Zend_Queue|null $queue
+     * @return void
+     */
+    public function __construct($options, Zend_Queue $queue = null)
+    {
+        parent::__construct($options, $queue);
+        
+        if (!extension_loaded("jobqueue_client")) {
+            require_once 'Zend/Queue/Exception.php';
+            throw new Zend_Queue_Exception('Platform Job Queue extension does not appear to be loaded');
+        }
+        
+        if (! isset($this->_options['daemonOptions'])) {
+            require_once 'Zend/Queue/Exception.php';
+            throw new Zend_Queue_Exception('Job Queue host and password should be provided');    
+        }
+        
+        $options = $this->_options['daemonOptions'];
+
+        if (!array_key_exists('host', $options)) {
+            require_once 'Zend/Queue/Exception.php';
+            throw new Zend_Queue_Exception('Platform Job Queue host should be provided');
+        }
+        if (!array_key_exists('password', $options)) {
+            require_once 'Zend/Queue/Exception.php';
+            throw new Zend_Queue_Exception('Platform Job Queue password should be provided');
+        }
+        
+        $this->_zendQueue = new ZendApi_Queue($options['host']);
+
+        if (!$this->_zendQueue) {
+            require_once 'Zend/Queue/Exception.php';
+            throw new Zend_Queue_Exception('Platform Job Queue connection failed');
+        }
+        if (!$this->_zendQueue->login($options['password'])) {
+            require_once 'Zend/Queue/Exception.php';
+            throw new Zend_Queue_Exception('Job Queue login failed');
+        }
+        
+        if ($this->_queue) {
+            $this->_queue->setMessageClass('Zend_Queue_Message_PlatformJob');
+        }
+    }
+  
+    /********************************************************************
+     * Queue management functions
+     ********************************************************************/
+
+    /**
+     * Does a queue already exist?
+     *
+     * @param  string $name
+     * @return boolean
+     * @throws Zend_Queue_Exception (not supported)
+     */
+    public function isExists($name)
+    {
+        require_once 'Zend/Queue/Exception.php';
+        throw new Zend_Queue_Exception('isExists() is not supported in this adapter');
+    }
+
+    /**
+     * Create a new queue
+     *
+     * @param  string  $name    queue name
+     * @param  integer $timeout default visibility timeout
+     * @return void
+     * @throws Zend_Queue_Exception
+     */
+    public function create($name, $timeout=null)
+    {
+        require_once 'Zend/Queue/Exception.php';
+        throw new Zend_Queue_Exception('create() is not supported in ' . get_class($this));
+    }
+
+    /**
+     * Delete a queue and all of its messages
+     *
+     * @param  string $name queue name
+     * @return void
+     * @throws Zend_Queue_Exception
+     */
+    public function delete($name)
+    {
+        require_once 'Zend/Queue/Exception.php';
+        throw new Zend_Queue_Exception('delete() is not supported in ' . get_class($this));
+    }
+
+    /**
+     * Get an array of all available queues
+     *
+     * @return void
+     * @throws Zend_Queue_Exception
+     */
+    public function getQueues()
+    {
+        require_once 'Zend/Queue/Exception.php';
+        throw new Zend_Queue_Exception('getQueues() is not supported in this adapter');
+    }
+
+    /**
+     * Return the approximate number of messages in the queue
+     *
+     * @param  Zend_Queue|null $queue
+     * @return integer
+     */
+    public function count(Zend_Queue $queue = null)
+    {
+        if ($queue !== null) {
+            require_once 'Zend/Queue/Exception.php';
+            throw new Zend_Queue_Exception('Queue parameter is not supported');
+        }
+
+        return $this->_zendQueue->getNumOfJobsInQueue();
+    }
+
+    /********************************************************************
+     * Messsage management functions
+     ********************************************************************/
+
+    /**
+     * Send a message to the queue
+     *
+     * @param  array | ZendAPI_job $message Message to send to the active queue
+     * @param  Zend_Queue $queue     Not supported
+     * @return Zend_Queue_Message
+     * @throws Zend_Queue_Exception
+     */
+    public function send($message, Zend_Queue $queue = null)
+    {
+        if ($queue !== null) {
+            require_once 'Zend/Queue/Exception.php';
+            throw new Zend_Queue_Exception('Queue parameter is not supported');
+        }
+
+        // This adapter can work only for this message type
+        $classname = $this->_queue->getMessageClass();
+        if (!class_exists($classname)) {
+            require_once 'Zend/Loader.php';
+            Zend_Loader::loadClass($classname);
+        }
+        
+        if ($message instanceof ZendAPI_Job) {
+            $message = array('data' => $message);
+        }
+        
+        $zendApiJob = new $classname($message);
+
+        // Unfortunately, the Platform JQ API is PHP4-style...
+        $platformJob = $zendApiJob->getJob();
+        
+        $jobId = $this->_zendQueue->addJob($platformJob);
+        
+        if (!$jobId) {
+            require_once 'Zend/Queue/Exception.php';
+            throw new Zend_Queue_Exception('Failed to add a job to queue: ' 
+                . $this->_zendQueue->getLastError());
+        }
+
+        $zendApiJob->setJobId($jobId);
+        return $zendApiJob;
+    }
+
+    /**
+     * Get messages in the queue
+     *
+     * @param  integer    $maxMessages  Maximum number of messages to return
+     * @param  integer    $timeout      Ignored
+     * @param  Zend_Queue $queue        Not supported
+     * @throws Zend_Queue_Exception
+     * @return ArrayIterator
+     */
+    public function receive($maxMessages = null, $timeout = null, Zend_Queue $queue = null)
+    {
+        if ($maxMessages === null) {
+            $maxMessages = 1;
+        }
+        
+        if ($queue !== null) {
+            require_once 'Zend/Queue/Exception.php';
+            throw new Zend_Queue_Exception('Queue shouldn\'t be set');  
+        }
+
+        $jobs = $this->_zendQueue->getJobsInQueue(null, $maxMessages, true);
+           
+        $classname = $this->_queue->getMessageClass();
+        if (!class_exists($classname)) {
+            require_once 'Zend/Loader.php';
+            Zend_Loader::loadClass($classname);
+        }
+        
+        $options = array(
+            'queue'        => $this->_queue,
+            'data'         => $jobs,
+            'messageClass' => $this->_queue->getMessageClass(),
+        );
+
+        $classname = $this->_queue->getMessageSetClass();
+
+        if (!class_exists($classname)) {
+            require_once 'Zend/Loader.php';
+            Zend_Loader::loadClass($classname);
+        }
+        return new $classname($options);
+    }
+
+    /**
+     * Delete a message from the queue
+     *
+     * Returns true if the message is deleted, false if the deletion is
+     * unsuccessful.
+     *
+     * @param  Zend_Queue_Message $message
+     * @return boolean
+     * @throws Zend_Queue_Exception
+     */
+    public function deleteMessage(Zend_Queue_Message $message)
+    {
+        if (get_class($message) != $this->_queue->getMessageClass()) {
+            require_once 'Zend/Queue/Exception.php';
+            throw new Zend_Queue_Exception(
+                'Failed to remove job from the queue; only messages of type '
+                . 'Zend_Queue_Message_PlatformJob may be used'
+            );
+        }
+        
+        return $this->_zendQueue->removeJob($message->getJobId());
+    }
+    
+    public function isJobIdExist($id)
+    {
+         return (($this->_zendQueue->getJob($id))? true : false);
+    }
+
+    /********************************************************************
+     * Supporting functions
+     ********************************************************************/
+
+    /**
+     * Return a list of queue capabilities functions
+     *
+     * $array['function name'] = true or false
+     * true is supported, false is not supported.
+     *
+     * @param  string $name
+     * @return array
+     */
+    public function getCapabilities()
+    {
+         return array(
+            'create'                => false,
+            'delete'                => false,
+            'getQueues'             => false,
+            'isExists'              => false,
+            'count'                 => true,
+            'send'                  => true,
+            'receive'               => true,
+            'deleteMessage'         => true,
+        );
+    }
+
+    /********************************************************************
+     * Functions that are not part of the Zend_Queue_Adapter_AdapterAbstract
+     ********************************************************************/
+
+    /**
+     * Serialize
+     *
+     * @return array
+     */
+    public function __sleep()
+    {
+        return array('_options');
+    }
+    
+    /**
+     * Unserialize
+     *
+     * @return void
+     */
+    public function __wakeup()
+    {
+        $options = $this->_options['daemonOptions'];
+
+        $this->_zendQueue = new ZendApi_Queue($options['host']);
+
+        if (!$this->_zendQueue) {
+            require_once 'Zend/Queue/Exception.php';
+            throw new Zend_Queue_Exception('Platform Job Queue connection failed');
+        }
+        if (!$this->_zendQueue->login($options['password'])) {
+            require_once 'Zend/Queue/Exception.php';
+            throw new Zend_Queue_Exception('Job Queue login failed');
+        }
+    }
+}

+ 2 - 2
library/Zend/Queue/Message/Iterator.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage Message
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id$
  */
@@ -24,7 +24,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage Message
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 class Zend_Queue_Message_Iterator implements Iterator, Countable

+ 194 - 0
library/Zend/Queue/Message/PlatformJob.php

@@ -0,0 +1,194 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Queue
+ * @subpackage Message
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/**
+ * @see Zend_Queue_Message
+ */
+require_once 'Zend/Queue/Message.php';
+
+/**
+ * Class for managing Zend Platform JobQueue jobs via Zend_Queue
+ *
+ * @category   Zend
+ * @package    Zend_Queue
+ * @subpackage Message
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class Zend_Queue_Message_PlatformJob extends Zend_Queue_Message 
+{
+    /**
+     * @var ZendApi_Job
+     */
+    protected $_job;
+
+    /**
+     * Job identifier
+     * @var string
+     */
+    protected $_id = null;
+    
+    /**
+     * Constructor
+     *
+     * The constructor should be an array of options.
+     *
+     * If the option 'data' is provided, and is an instance of ZendApi_Job, 
+     * that object will be used as the internal job; if that option is not a
+     * ZendApi_Job instance, an exception will be thrown.
+     *
+     * Alternately, you may specify the 'script' parameter, which should be a 
+     * JobQueue script the job will request. A new ZendApi_Job object will then
+     * be created using that script and any options you provide.
+     *
+     * @param  array $options
+     * @return void
+     * @throws Zend_Queue_Exception
+     */
+    public function __construct(array $options = array())
+    {
+        if (isset($options['data'])) {
+            if (!($options['data'] instanceof ZendApi_Job)) {
+                require_once 'Zend/Queue/Exception.php';
+                throw new Zend_Queue_Exception('Data must be an instance of ZendApi_Job');
+            }
+            $this->_job = $options['data'];
+            parent::__construct($this->_job->getProperties());
+        } else {
+            parent::__construct($options);
+            
+            if (!isset($options['script'])) {
+                require_once 'Zend/Queue/Exception.php';
+                throw new Zend_Queue_Exception('The script is mandatory data');
+            }
+            
+            $this->_job = new ZendApi_Job($options['script']);
+            $this->_setJobProperties();
+        }
+    }
+    
+    /**
+     * Set the job identifier
+     *
+     * Used within Zend_Queue only.
+     * 
+     * @param  string $id 
+     * @return Zend_Queue_Message_PlatformJob
+     */
+    public function setJobId($id) 
+    {
+        $this->_id = $id;    
+        return $this;
+    }
+    
+    /**
+     * Retrieve the job identifier
+     * 
+     * @return string
+     */
+    public function getJobId() 
+    {
+        return (($this->_id) ?  $this->_id : $this->_job->getID());
+    }
+    
+    /**
+     * Retrieve the internal ZendApi_Job instance
+     * 
+     * @return ZendApi_Job
+     */
+    public function getJob() 
+    {
+        return $this->_job;
+    }
+ 
+    /**
+     * Store queue and data in serialized object
+     *
+     * @return array
+     */
+    public function __sleep()
+    {
+        return serialize('_job', '_id', '_data');
+    }
+
+    /**
+     * Query the class name of the Queue object for which this
+     * Message was created.
+     *
+     * @return string
+     */
+    public function getQueueClass()
+    {
+        return 'Zend_Queue_Adapter_Platform_JQ';
+    }
+
+    /**
+     * Sets properties on the ZendApi_Job instance
+     *
+     * Any options in the {@link $_data} array will be checked. Those matching
+     * options in ZendApi_Job will be used to set those options in that 
+     * instance.
+     * 
+     * @return void
+     */
+    protected function _setJobProperties() {
+    
+        if (isset($this->_data['script'])) {
+            $this->_job->setScript($this->_data['script']);
+        } 
+        
+        if (isset($this->_data['priority'])) {
+            $this->_job->setJobPriority($this->_data['priority']);
+        }
+        
+        if (isset($this->_data['name'])) {
+            $this->_job->setJobName($this->_data['name']);
+        }
+        
+        if (isset($this->_data['predecessor'])) {
+            $this->_job->setJobDependency($this->_data['predecessor']);
+        }
+        
+        if (isset($this->_data['preserved'])) {
+            $this->_job->setPreserved($this->_data['preserved']);
+        }
+        
+        if (isset($this->_data['user_variables'])) {
+            $this->_job->setUserVariables($this->_data['user_variables']);
+        }
+        
+        if (!empty($this->_data['interval'])) {
+            $endTime = isset($this->_data['end_time']) ? $this->_data['end_time'] : null;
+            $this->_job->setRecurrenceData($this->_data['interval'], $endTime);
+        } elseif (isset($this->_data['interval']) && ($this->_data['interval'] === '')) {
+            $this->_job->setRecurrenceData(0,0);
+        }
+        
+        if (isset($this->_data['scheduled_time'])) {
+            $this->_job->setScheduledTime($this->_data['scheduled_time']);
+        }
+        
+        if (isset($this->_data['application_id'])) {
+            $this->_job->setApplicationID($this->_data['application_id']);
+        }
+    }
+}

+ 2 - 2
library/Zend/Queue/Stomp/Client.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage Stomp
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id$
  */
@@ -26,7 +26,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage Stomp
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 class Zend_Queue_Stomp_Client

+ 10 - 0
tests/TestConfiguration.php.dist

@@ -488,6 +488,14 @@ define('TESTS_ZEND_MAIL_SMTP_AUTH', false);
  *     dbname: "queue"
  * }
  *
+ * The PlatformJobQueue adapter expects two parameters, the host and password. 
+ * The HOST string should include both the host and port (typically 10003):
+ *     127.0.0.1:10003
+ * When running tests against PlatformJobQueue, it's best to do so where 
+ * Platform is installed on localhost and has maximum workers set to 20 
+ * (default is 5); do so with this zend.ini setting:
+ *     zend_jq.max_num_of_request_workers=20
+ *
  * Selectively define the below in order to run tests for them.
  */
 define('TESTS_ZEND_QUEUE_APACHEMQ_HOST', false);
@@ -496,6 +504,8 @@ define('TESTS_ZEND_QUEUE_DB', false);
 define('TESTS_ZEND_QUEUE_MEMCACHEQ_SCHEME', false);
 define('TESTS_ZEND_QUEUE_MEMCACHEQ_HOST', false);
 define('TESTS_ZEND_QUEUE_MEMCACHEQ_PORT', false);
+define('TESTS_ZEND_QUEUE_PLATFORMJQ_HOST', false);
+define('TESTS_ZEND_QUEUE_PLATFORMJQ_PASS', false);
 
 /**
  * Zend_Service_Amazon online tests

+ 2 - 2
tests/Zend/Queue/Adapter/AdapterTest.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */
@@ -55,7 +55,7 @@ require_once 'Zend/Config.php';
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */

+ 1 - 1
tests/Zend/Queue/Adapter/ApachemqTest.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */

+ 2 - 2
tests/Zend/Queue/Adapter/ArrayTest.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */
@@ -50,7 +50,7 @@ require_once dirname(__FILE__) . '/AdapterTest.php';
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */

+ 2 - 2
tests/Zend/Queue/Adapter/DbTest.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */
@@ -52,7 +52,7 @@ require_once 'Zend/Db/Select.php';
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */

+ 2 - 2
tests/Zend/Queue/Adapter/Iterator2.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage Message
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: Message.php 14646 2009-04-04 21:17:27Z jplock $
  */
@@ -26,7 +26,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage Message
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 

+ 2 - 2
tests/Zend/Queue/Adapter/MemcacheqTest.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */
@@ -50,7 +50,7 @@ require_once dirname(__FILE__) . '/AdapterTest.php';
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */

+ 2 - 2
tests/Zend/Queue/Adapter/MessageTestClass.php

@@ -15,11 +15,11 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */
 
 class Zend_Queue_Message_Test extends Zend_Queue_Message
 {
-}
+}

+ 2 - 2
tests/Zend/Queue/Adapter/NullTest.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */
@@ -52,7 +52,7 @@ require_once dirname(__FILE__) . '/AdapterTest.php';
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */

+ 336 - 0
tests/Zend/Queue/Adapter/PlatformJobQueueTest.php

@@ -0,0 +1,336 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Queue
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id: $
+ */
+
+
+/** PHPUnit Test Case */
+require_once 'PHPUnit/Framework/TestCase.php';
+
+/** TestHelp.php */
+require_once dirname(__FILE__) . '/../../../TestHelper.php';
+
+/** Zend_Queue */
+require_once 'Zend/Queue.php';
+
+/** Zend_Queue */
+require_once 'Zend/Queue/Message.php';
+
+/** Zend_Queue_Message_Test */
+require_once 'MessageTestClass.php';
+
+/** Base Adapter test class */
+require_once dirname(__FILE__) . '/AdapterTest.php';
+
+/**
+ * @category   Zend
+ * @package    Zend_Queue
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id: $
+ */
+class Zend_Queue_Adapter_PlatformJobQueueTest extends Zend_Queue_Adapter_AdapterTest
+{
+    public function setUp()
+    {
+        if (!defined('TESTS_ZEND_QUEUE_PLATFORMJQ_HOST') 
+            || !constant('TESTS_ZEND_QUEUE_PLATFORMJQ_HOST')
+        ) {
+            $this->markTestSkipped();
+        }
+    }
+
+    /**
+     * getAdapterName() is a method to help make AdapterTest work with any
+     * new adapters
+     *
+     * You must overload this method
+     *
+     * @return string
+     */
+    public function getAdapterName()
+    {
+        return 'PlatformJobQueue';
+    }
+
+    public function getTestConfig()
+    {
+        return array('daemonOptions' => array(
+            'host'     => constant('TESTS_ZEND_QUEUE_PLATFORMJQ_HOST'),
+            'password' => constant('TESTS_ZEND_QUEUE_PLATFORMJQ_PASS'),
+        ));
+    }
+    
+    /**
+     * getAdapterFullName() is a method to help make AdapterTest work with any
+     * new adapters
+     *
+     * You may overload this method.  The default return is
+     * 'Zend_Queue_Adapter_' . $this->getAdapterName()
+     *
+     * @return string
+     */
+    public function getAdapterFullName()
+    {
+        return 'Zend_Queue_Adapter_' . $this->getAdapterName();
+    }
+
+    public function testFailedConstructor()
+    {
+      try {
+            $queue = $this->createQueue(__FUNCTION__, array());
+            $this->fail('The test should fail if no host and password are passed');
+        } catch (Exception $e) {
+            $this->assertTrue( true, 'Job Queue host and password should be provided');
+        }
+        
+        try {
+            $queue = $this->createQueue(__FUNCTION__, array('daemonOptions' => array()));
+            $this->fail('The test should fail if no host is passed');
+        } catch (Exception $e) {
+            $this->assertTrue(true, 'Platform Job Queue host should be provided');
+        }
+
+        try {
+            $queue = $this->createQueue(__FUNCTION__, array('daemonOptions' => array('host' => 'localhost')));
+            $this->fail('The test should fail if no password is passed');
+        } catch (Exception $e) {
+            $this->assertTrue(true, 'Platform Job Queue password should be provided');
+        }
+    }
+    
+    // this tests the configuration option $config['messageClass']
+    public function testZendQueueMessageTest()
+    {
+        $config = $this->getTestConfig();
+
+        if (!$queue = $this->createQueue(__FUNCTION__, $config)) {
+            return;
+        }
+
+        $message = $queue->send(array('script' => 'info.php'));
+
+        $this->assertTrue($message instanceof Zend_Queue_Message);
+
+        $list = $queue->receive();
+        $this->assertTrue($list instanceof Zend_Queue_Message_Iterator);
+        foreach ( $list as $message ) {
+            $this->assertTrue($message instanceof Zend_Queue_Message_PlatformJob);
+            $queue->deleteMessage($message);
+        }
+
+        // delete the queue we created
+        $queue->deleteQueue();
+    }
+    
+    public function testSend()
+    {
+        if (!$queue = $this->createQueue(__FUNCTION__)) {
+            return;
+        }
+        $adapter = $queue->getAdapter();
+
+        $message = $adapter->send(array('script' => 'info.php'));
+        $this->assertTrue($message instanceof Zend_Queue_Message);
+
+        $list = $queue->receive();
+        $this->assertTrue($list instanceof Zend_Queue_Message_Iterator);
+        
+        foreach ($list as $message) {
+            $this->assertTrue($message instanceof Zend_Queue_Message_PlatformJob);
+            $queue->deleteMessage($message);
+        }
+
+        // delete the queue we created
+        $queue->deleteQueue();
+        
+    }
+    
+    public function testReceive()
+    {
+        if (!$queue = $this->createQueue(__FUNCTION__)) {
+            return;
+        }
+        $adapter = $queue->getAdapter();
+
+        // check to see if this function is supported
+        $func = 'receive';
+        if (!$adapter->isSupported($func)) {
+            $this->markTestSkipped($func . '() is not supported');
+            return;
+        }
+
+        $scriptName = 'info.php';
+        
+        // send the message
+        $message = $adapter->send((array('script' => $scriptName)));
+        $this->assertTrue($message instanceof Zend_Queue_Message);
+
+        // get it back
+        $list = $adapter->receive(1);
+        $this->assertEquals(1, count($list));
+        $this->assertTrue($list instanceof Zend_Queue_Message_Iterator);
+        $this->assertTrue($list->valid());
+
+        $message = $list->current();
+        if ($adapter->isSupported('deleteMessage')) {
+            $adapter->deleteMessage($list->current());
+        }
+
+        $this->assertTrue($message instanceof Zend_Queue_Message);
+        $this->assertEquals($message->getJob()->getScript(), $scriptName);
+
+        // delete the queue we created
+        $queue->deleteQueue();
+    }
+    
+    public function testDeleteMessage()
+    {
+        if (!$queue = $this->createQueue(__FUNCTION__)) {
+            return;
+        }
+        $adapter = $queue->getAdapter();
+
+        // check to see if this function is supported
+        $func = 'receive';
+        if (!$adapter->isSupported($func)) {
+            $this->markTestSkipped($func . '() is not supported');
+            return;
+        }
+
+        $scriptName = 'info.php';
+        
+        // send the message
+        $message = $adapter->send((array('script' => $scriptName)));
+        $this->assertTrue($message instanceof Zend_Queue_Message);
+
+        // get it back
+        $list = $adapter->receive(1);
+        $this->assertEquals(1, count($list));
+        $this->assertTrue($list instanceof Zend_Queue_Message_Iterator);
+        $this->assertTrue($list->valid());
+
+        $message = $list->current();
+        if ($adapter->isSupported('deleteMessage')) {
+            $adapter->deleteMessage($list->current());
+        }
+
+        $this->assertTrue($message instanceof Zend_Queue_Message);
+        $this->assertEquals($message->getJob()->getScript(), $scriptName);
+        
+        $id = $message->getJob()->getID();
+        $this->assertFalse($adapter->isJobIdExist($id));
+
+        // delete the queue we created
+        $queue->deleteQueue();
+        
+    }
+    
+     public function testCount()
+    {
+        if (!$queue = $this->createQueue(__FUNCTION__)) {
+            return;
+        }
+        $adapter = $queue->getAdapter();
+
+        // check to see if this function is supported
+        $func = 'count';
+        if (!$adapter->isSupported($func)) {
+            $this->markTestSkipped($func . '() is not supported');
+            return;
+        }
+
+        $initCount = $adapter->count();
+      
+        // send a message
+        $message = $adapter->send(array('script' => 'info.php'));
+
+        // test queue count for being 1
+        $this->assertEquals($adapter->count(), ($initCount + 1));
+
+        // receive the message
+        $message = $adapter->receive();
+
+        /* we need to delete the messages we put in the queue before
+         * counting.
+         *
+         * not all adapters support deleteMessage, but we should remove
+         * the messages that we created if we can.
+         */
+        if ($adapter->isSupported('deleteMessage')) {
+            foreach ($message as $msg) {
+                $adapter->deleteMessage($msg);
+            }
+        }
+
+        // test the count for being 0
+        $this->assertEquals($adapter->count(), $initCount);
+
+        // delete the queue we created
+        $queue->deleteQueue();
+    }
+    
+    public function testSampleBehavior()
+    {
+        if (!$queue = $this->createQueue(__FUNCTION__)) {
+            return;
+        }
+        $this->assertTrue($queue instanceof Zend_Queue);
+
+        $initCount = $queue->count();
+         
+        $scriptName = 'info.php';
+        
+        for ($i = 0; $i < 10; $i++) {
+            $queue->send(array('script' => $scriptName));
+        }
+
+        $messages = $queue->receive(5);
+
+        foreach($messages as $i => $message) {
+            $this->assertEquals($message->getJob()->getScript(), $scriptName);
+            $queue->deleteMessage($message);
+        }
+
+        for ($i = 0; $i < 5; $i++) {
+            $messages = $queue->receive();
+            $message  = $messages->current();
+            $queue->deleteMessage($message);
+        }
+
+        $this->assertEquals($initCount, count($queue));
+        $this->assertTrue($queue->deleteQueue());
+
+        // delete the queue we created
+        $queue->deleteQueue();
+    }
+    
+    public function testVisibility() 
+    {
+        $this->markTestSkipped('testVisibility unsupported');
+    }
+    
+    // test the constants
+    public function testConst()
+    {
+        $this->markTestSkipped('no constants to test');
+    }
+}

+ 1 - 1
tests/Zend/Queue/Adapter/StompIOTest.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */

+ 1 - 1
tests/Zend/Queue/Adapter/StompTest.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */

+ 4 - 3
tests/Zend/Queue/AllTests.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */
@@ -41,6 +41,7 @@ require_once 'Zend/Queue/Adapter/ArrayTest.php';
 require_once 'Zend/Queue/Adapter/MemcacheqTest.php';
 require_once 'Zend/Queue/Adapter/NullTest.php';
 require_once 'Zend/Queue/Adapter/DbTest.php';
+require_once 'Zend/Queue/Adapter/PlatformJobQueueTest.php';
 
 // Stomp protocol testing
 require_once 'Zend/Queue/Stomp/FrameTest.php';
@@ -53,7 +54,7 @@ require_once 'Zend/Queue/Adapter/ApachemqTest.php';
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */
@@ -85,6 +86,7 @@ class Zend_Queue_AllTests
         }
         $suite->addTestSuite('Zend_Queue_Adapter_DbTest');
         $suite->addTestSuite('Zend_Queue_Adapter_NullTest');
+        $suite->addTestSuite('Zend_Queue_Adapter_PlatformJobQueueTest');
 
         // Stomp protocol testing
         $suite->addTestSuite('Zend_Queue_Stomp_FrameTest');
@@ -93,7 +95,6 @@ class Zend_Queue_AllTests
         // Message Queues dependent on Stomp
         $suite->addTestSuite('Zend_Queue_Adapter_ApachemqTest');
 
-
         return $suite;
     }
 }

+ 2 - 2
tests/Zend/Queue/Custom/DbForUpdate.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage Custom
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: Db.php 14846 2009-04-11 15:56:47Z danlo $
  */
@@ -31,7 +31,7 @@ require_once 'Zend/Queue/Adapter/Db.php';
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage Custom
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 

+ 2 - 2
tests/Zend/Queue/Custom/Message.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage Custom
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: Message.php 14777 2009-04-09 04:40:39Z danlo $
  */
@@ -26,7 +26,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage Custom
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 

+ 2 - 2
tests/Zend/Queue/Custom/Messages.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage Custom
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: Iterator.php 14781 2009-04-09 07:07:24Z danlo $
  */
@@ -24,7 +24,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage Custom
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 

+ 2 - 2
tests/Zend/Queue/Custom/Queue.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage Custom
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */
@@ -38,7 +38,7 @@ require_once 'Zend/Queue/Message.php';
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage Custom
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */

+ 2 - 2
tests/Zend/Queue/CustomTest.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */
@@ -44,7 +44,7 @@ require_once 'Custom/Messages.php';
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */

+ 2 - 2
tests/Zend/Queue/FactoryTest.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */
@@ -39,7 +39,7 @@ require_once 'Zend/Queue/Adapter/Apachemq.php';
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */

+ 2 - 2
tests/Zend/Queue/Message/IteratorTest.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */
@@ -46,7 +46,7 @@ require_once 'Zend/Queue/Adapter/Null.php';
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */

+ 2 - 2
tests/Zend/Queue/MessageTest.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */
@@ -49,7 +49,7 @@ require_once 'Zend/Queue/Adapter/Null.php';
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */

+ 2 - 2
tests/Zend/Queue/Queue1Test.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */
@@ -41,7 +41,7 @@ require_once 'Zend/Queue/QueueBaseTest.php';
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */

+ 2 - 2
tests/Zend/Queue/Queue2Test.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */
@@ -41,7 +41,7 @@ require_once 'Zend/Queue/QueueBaseTest.php';
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */

+ 2 - 2
tests/Zend/Queue/QueueBaseTest.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */
@@ -47,7 +47,7 @@ require_once 'Zend/Queue/Adapter/Array.php';
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */

+ 2 - 2
tests/Zend/Queue/QueueTest.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */
@@ -47,7 +47,7 @@ require_once 'Zend/Queue/Adapter/Array.php';
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */

+ 1 - 1
tests/Zend/Queue/Stomp/ClientTest.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */

+ 1 - 1
tests/Zend/Queue/Stomp/FrameTest.php

@@ -15,7 +15,7 @@
  * @category   Zend
  * @package    Zend_Queue
  * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  * @version    $Id: AllTests.php 13626 2009-01-14 18:24:57Z matthew $
  */