ZendQueueTest.php 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Cloud_Queue
  17. * @subpackage UnitTests
  18. * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. */
  21. // Call Zend_Cloud_QueueService_Adapter_ZendQueueTest::main() if this source file is executed directly.
  22. if (!defined("PHPUnit_MAIN_METHOD")) {
  23. define("PHPUnit_MAIN_METHOD", "Zend_Cloud_QueueService_Adapter_ZendQueueTest::main");
  24. }
  25. require_once dirname(__FILE__) . '/../../../../TestHelper.php';
  26. /**
  27. * @see Zend_Cloud_QueueServiceTestCase
  28. */
  29. require_once 'Zend/Cloud/QueueService/TestCase.php';
  30. /**
  31. * @see Zend_Cloud_QueueeService_Adapter_ZendQueue
  32. */
  33. require_once 'Zend/Cloud/QueueService/Adapter/ZendQueue.php';
  34. /**
  35. * @category Zend
  36. * @package Zend_Cloud
  37. * @subpackage UnitTests
  38. * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  39. * @license http://framework.zend.com/license/new-bsd New BSD License
  40. */
  41. class Zend_Cloud_QueueService_Adapter_ZendQueueTest
  42. extends Zend_Cloud_QueueService_TestCase
  43. {
  44. /**
  45. * Period to wait for propagation in seconds
  46. * Should be set by adapter
  47. *
  48. * @var int
  49. */
  50. protected $_waitPeriod = 0;
  51. protected $_clientType = 'Zend_Queue';
  52. /**
  53. * Runs the test methods of this class.
  54. *
  55. * @access public
  56. * @static
  57. */
  58. public static function main()
  59. {
  60. $suite = new PHPUnit_Framework_TestSuite(__CLASS__);
  61. $result = PHPUnit_TextUI_TestRunner::run($suite);
  62. }
  63. public function testPeekMessages()
  64. {
  65. $this->markTestSkipped('ZendQueue does not currently support peeking messages');
  66. }
  67. protected function _getConfig()
  68. {
  69. $config = new Zend_Config(array(
  70. Zend_Cloud_QueueService_Factory::QUEUE_ADAPTER_KEY => 'Zend_Cloud_QueueService_Adapter_ZendQueue',
  71. Zend_Cloud_QueueService_Adapter_ZendQueue::ADAPTER => 'Array'
  72. ));
  73. return $config;
  74. }
  75. }
  76. if (PHPUnit_MAIN_METHOD == 'Zend_Cloud_QueueService_Adapter_ZendQueueTest::main') {
  77. Zend_Cloud_QueueService_Adapter_ZendQueueTest::main();
  78. }