StorageTest.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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_Service_WindowsAzure
  17. * @subpackage UnitTests
  18. * @version $Id$
  19. * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  20. * @license http://framework.zend.com/license/new-bsd New BSD License
  21. */
  22. /**
  23. * Test helpers
  24. */
  25. require_once dirname(__FILE__) . '/../../../TestHelper.php';
  26. /** Zend_Service_WindowsAzure_Storage */
  27. require_once 'Zend/Service/WindowsAzure/Storage.php';
  28. /**
  29. * @category Zend
  30. * @package Zend_Service_WindowsAzure
  31. * @subpackage UnitTests
  32. * @version $Id$
  33. * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  34. * @license http://framework.zend.com/license/new-bsd New BSD License
  35. */
  36. class Zend_Service_WindowsAzure_StorageTest extends PHPUnit_Framework_TestCase
  37. {
  38. /**
  39. * Test constructor for devstore
  40. */
  41. public function testConstructorForDevstore()
  42. {
  43. $storage = new Zend_Service_WindowsAzure_Storage();
  44. $this->assertEquals('http://127.0.0.1:10000/devstoreaccount1', $storage->getBaseUrl());
  45. }
  46. /**
  47. * Test constructor for production
  48. */
  49. public function testConstructorForProduction()
  50. {
  51. $storage = new Zend_Service_WindowsAzure_Storage(Zend_Service_WindowsAzure_Storage::URL_CLOUD_BLOB, 'testing', '');
  52. $this->assertEquals('http://testing.blob.core.windows.net', $storage->getBaseUrl());
  53. }
  54. }