Kaynağa Gözat

Various fixes to Zend_Service_WindowsAzure

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@19828 44c647ce-9c0f-0410-b52a-842ac1e357ba
maartenba 16 yıl önce
ebeveyn
işleme
b261c3e158
32 değiştirilmiş dosya ile 463 ekleme ve 1026 silme
  1. 4 8
      documentation/manual/en/module_specs/Zend_Service_WindowsAzure.xml
  2. 57 57
      documentation/manual/en/module_specs/Zend_Service_WindowsAzure_Blob.xml
  3. 18 18
      documentation/manual/en/module_specs/Zend_Service_WindowsAzure_Queue.xml
  4. 48 48
      documentation/manual/en/module_specs/Zend_Service_WindowsAzure_Table.xml
  5. 28 15
      library/Zend/Service/WindowsAzure/Credentials/CredentialsAbstract.php
  6. 41 42
      library/Zend/Service/WindowsAzure/Credentials/SharedAccessSignature.php
  7. 16 16
      library/Zend/Service/WindowsAzure/Credentials/SharedKey.php
  8. 20 12
      library/Zend/Service/WindowsAzure/Credentials/SharedKeyLite.php
  9. 36 36
      library/Zend/Service/WindowsAzure/Storage.php
  10. 1 1
      library/Zend/Service/WindowsAzure/Storage/BatchStorageAbstract.php
  11. 4 4
      library/Zend/Service/WindowsAzure/Storage/Blob.php
  12. 4 4
      library/Zend/Service/WindowsAzure/Storage/Queue.php
  13. 11 1
      library/Zend/Service/WindowsAzure/Storage/Table.php
  14. 1 1
      library/Zend/Service/WindowsAzure/Storage/TableEntityQuery.php
  15. 3 645
      tests/TestConfiguration.php.dist
  16. 25 32
      tests/TestHelper.php
  17. 8 7
      tests/Zend/Service/WindowsAzure/AllTests.php
  18. 10 4
      tests/Zend/Service/WindowsAzure/BlobStorageSharedAccessTest.php
  19. 8 4
      tests/Zend/Service/WindowsAzure/BlobStorageTest.php
  20. 8 4
      tests/Zend/Service/WindowsAzure/BlobStreamTest.php
  21. 8 7
      tests/Zend/Service/WindowsAzure/Credentials/AllTests.php
  22. 12 8
      tests/Zend/Service/WindowsAzure/Credentials/SharedAccessSignatureTest.php
  23. 15 12
      tests/Zend/Service/WindowsAzure/Credentials/SharedKeyLiteTest.php
  24. 12 8
      tests/Zend/Service/WindowsAzure/Credentials/SharedKeyTest.php
  25. 7 4
      tests/Zend/Service/WindowsAzure/DynamicTableEntityTest.php
  26. 8 4
      tests/Zend/Service/WindowsAzure/QueueStorageTest.php
  27. 8 4
      tests/Zend/Service/WindowsAzure/RetryPolicyTest.php
  28. 10 4
      tests/Zend/Service/WindowsAzure/SessionHandlerTest.php
  29. 8 4
      tests/Zend/Service/WindowsAzure/StorageTest.php
  30. 8 4
      tests/Zend/Service/WindowsAzure/TableEntityQueryTest.php
  31. 8 4
      tests/Zend/Service/WindowsAzure/TableEntityTest.php
  32. 8 4
      tests/Zend/Service/WindowsAzure/TableStorageTest.php

+ 4 - 8
documentation/manual/en/module_specs/Zend_Service_WindowsAzure.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Reviewed: no -->
-<sect1 id="zend.service.windowsazure" xmlns:xi="http://www.w3.org/2001/XInclude">
+<sect1 id="zend.service.windowsazure">
     <title>Zend_Service_WindowsAzure</title>
 
     <sect2 id="zend.service.windowsazure.introduction">
@@ -65,7 +65,7 @@
                 documentation</ulink> for detailed description of the service. You will need to be
             familiar with basic concepts in order to use this service.
         </para>
-
+    
     </sect2>
 
     <sect2 id="zend.service.windowsazure.features">
@@ -111,9 +111,5 @@
             Windows Azure's features, no matter if it is hosted on the Windows Azure platform or on
             an in-premise web server.
         </para>
-    </sect2>
-
-    <xi:include href="Zend_Service_WindowsAzure_Blob.xml" />
-    <xi:include href="Zend_Service_WindowsAzure_Table.xml" />
-    <xi:include href="Zend_Service_WindowsAzure_Queue.xml" />
-</sect1>
+  </sect2>
+</sect1>

+ 57 - 57
documentation/manual/en/module_specs/Zend_Service_WindowsAzure_Blob.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Reviewed: no -->
-<sect2 id="zend.service.windowsazure.storage.blob">
+<sect1 id="zend.service.windowsazure.storage.blob">
     <title>Zend_Service_WindowsAzure_Storage_Blob</title>
 
     <para>
@@ -15,7 +15,7 @@
         order to provide a native PHP interface to the storage account.
     </para>
 
-    <sect3 id="zend.service.windowsazure.storage.blob.api">
+    <sect2 id="zend.service.windowsazure.storage.blob.api">
         <title>API Examples</title>
 
         <para>
@@ -25,7 +25,7 @@
             features.
         </para>
 
-        <sect4 id="zend.service.windowsazure.storage.blob.api.create-container">
+        <sect3 id="zend.service.windowsazure.storage.blob.api.create-container">
             <title>Creating a storage container</title>
 
             <para>
@@ -33,7 +33,7 @@
                 storage.
             </para>
 
-            <example id="zend.service.windowsazure.storage.blob.api.create-container.example">
+            <example id="zend.service.windowsazure.storage.blob.api.create-container">
                 <title>Creating a storage container</title>
 
                 <programlisting language="php"><![CDATA[
@@ -43,9 +43,9 @@ $result = $storageClient->createContainer('testcontainer');
 echo 'Container name is: ' . $result->Name;
 ]]></programlisting>
             </example>
-        </sect4>
+        </sect3>
 
-        <sect4 id="zend.service.windowsazure.storage.blob.api.delete-container">
+        <sect3 id="zend.service.windowsazure.storage.blob.api.delete-container">
             <title>Deleting a storage container</title>
 
             <para>
@@ -53,7 +53,7 @@ echo 'Container name is: ' . $result->Name;
                 storage.
             </para>
 
-            <example id="zend.service.windowsazure.storage.blob.api.delete-container.example">
+            <example id="zend.service.windowsazure.storage.blob.api.delete-container">
                 <title>Deleting a storage container</title>
 
                 <programlisting role="php"><![CDATA[
@@ -61,9 +61,9 @@ $storageClient = new Zend_Service_WindowsAzure_Storage_Blob();
 $storageClient->deleteContainer('testcontainer');
 ]]></programlisting>
             </example>
-        </sect4>
+        </sect3>
 
-        <sect4 id="zend.service.windowsazure.storage.blob.api.storing-blob">
+        <sect3 id="zend.service.windowsazure.storage.blob.api.storing-blob">
             <title>Storing a blob</title>
 
             <para>
@@ -71,7 +71,7 @@ $storageClient->deleteContainer('testcontainer');
                 development storage. Note that the container has already been created before.
             </para>
 
-            <example id="zend.service.windowsazure.storage.blob.api.storing-blob.example">
+            <example id="zend.service.windowsazure.storage.blob.api.storing-blob">
                 <title>Storing a blob</title>
 
                 <programlisting language="php"><![CDATA[
@@ -85,9 +85,9 @@ $result = $storageClient->putBlob(
 echo 'Blob name is: ' . $result->Name;
 ]]></programlisting>
             </example>
-        </sect4>
+        </sect3>
 
-        <sect4 id="zend.service.windowsazure.storage.blob.api.copy-blob">
+        <sect3 id="zend.service.windowsazure.storage.blob.api.copy-blob">
             <title>Copying a blob</title>
 
             <para>
@@ -97,7 +97,7 @@ echo 'Blob name is: ' . $result->Name;
                 created before.
             </para>
 
-            <example id="zend.service.windowsazure.storage.blob.api.copy-blob.example">
+            <example id="zend.service.windowsazure.storage.blob.api.copy-blob">
                 <title>Copying a blob</title>
 
                 <programlisting language="php"><![CDATA[
@@ -111,9 +111,9 @@ $result = $storageClient->copyBlob(
 echo 'Copied blob name is: ' . $result->Name;
 ]]></programlisting>
             </example>
-        </sect4>
+        </sect3>
 
-        <sect4 id="zend.service.windowsazure.storage.blob.api.download-blob">
+        <sect3 id="zend.service.windowsazure.storage.blob.api.download-blob">
             <title>Downloading a blob</title>
 
             <para>
@@ -122,7 +122,7 @@ echo 'Copied blob name is: ' . $result->Name;
                 blob has been uploaded.
             </para>
 
-            <example id="zend.service.windowsazure.storage.blob.api.download-blob.example">
+            <example id="zend.service.windowsazure.storage.blob.api.download-blob">
                 <title>Downloading a blob</title>
 
                 <programlisting language="php"><![CDATA[
@@ -134,9 +134,9 @@ $storageClient->getBlob(
 );
 ]]></programlisting>
             </example>
-        </sect4>
+        </sect3>
 
-        <sect4 id="zend.service.windowsazure.storage.blob.api.public-blob">
+        <sect3 id="zend.service.windowsazure.storage.blob.api.public-blob">
             <title>Making a blob publicly available</title>
 
             <para>
@@ -151,7 +151,7 @@ $storageClient->getBlob(
                 storage. Note that the container has already been created before.
             </para>
 
-            <example id="zend.service.windowsazure.storage.blob.api.public-blob.example">
+            <example id="zend.service.windowsazure.storage.blob.api.public-blob">
                 <title>Making a blob publicly available</title>
 
                 <programlisting language="php"><![CDATA[
@@ -161,27 +161,27 @@ $storageClient = new Zend_Service_WindowsAzure_Storage_Blob();
 $storageClient->setContainerAcl('testcontainer', Zend_Service_WindowsAzure_Storage_Blob::ACL_PUBLIC);
 ]]></programlisting>
             </example>
-        </sect4>
-    </sect3>
-
-    <sect3 id="zend.service.windowsazure.storage.blob.root">
+        </sect3>
+    </sect2>
+  
+    <sect2 id="zend.service.windowsazure.storage.blob.root">
         <title>Root container</title>
 
         <para>
-            Windows Azure Blob Storage provides support to work with a "root container".
-            This means that a blob can be stored in the root of your storage account,
+            Windows Azure Blob Storage provides support to work with a "root container". 
+            This means that a blob can be stored in the root of your storage account, 
             i.e. <code>http://myaccount.blob.core.windows.net/somefile.txt</code>.
         </para>
-
+        
         <para>
             In order to work with the root container, it should first be created using the
             <methodname>createContainer()</methodname> method, naming the container
             <varname>$root</varname>.  All other operations on the root container should be issued
             with the container name set to <varname>$root</varname>.
         </para>
-    </sect3>
-
-    <sect3 id="zend.service.windowsazure.storage.blob.wrapper">
+    </sect2>
+  
+    <sect2 id="zend.service.windowsazure.storage.blob.wrapper">
         <title>Blob storage stream wrapper</title>
 
         <para>
@@ -189,7 +189,7 @@ $storageClient->setContainerAcl('testcontainer', Zend_Service_WindowsAzure_Stora
             client as a PHP file stream wrapper. The blob storage stream wrapper provides
             support for using regular file operations on Windows Azure Blob Storage.
             For example, one can open a file from Windows Azure Blob Storage with
-            the <methodname>fopen()</methodname> function:
+            the <functionname>fopen()</functionname> function:
         </para>
 
         <example id="zend.service.windowsazure.storage.blob.wrapper.sample">
@@ -203,7 +203,7 @@ $fileHandle = fopen('azure://mycontainer/myfile.txt', 'r');
 fclose($fileHandle);
 ]]></programlisting>
         </example>
-
+    
         <para>
             In order to do this, the Windows Azure SDK for PHP blob storage client
             must be registered as a stream wrapper. This can be done by calling the
@@ -222,14 +222,14 @@ $storageClient->registerStreamWrapper(); // registers azure:// on this storage c
 $storageClient->registerStreamWrapper('blob://'); // regiters blob:// on this storage client
 ]]></programlisting>
         </example>
-
+    
         <para>
             To unregister the stream wrapper, the <methodname>unregisterStreamWrapper()</methodname>
             method can be used.
         </para>
-    </sect3>
+    </sect2>
 
-    <sect3 id="zend.service.windowsazure.storage.blob.sharedaccesssig">
+    <sect2 id="zend.service.windowsazure.storage.blob.sharedaccesssig">
         <title>Shared Access Signature</title>
 
         <para>
@@ -240,21 +240,21 @@ $storageClient->registerStreamWrapper('blob://'); // regiters blob:// on this st
             assigned on a container or a blob and given to a specific client using an URL-based
             model.
         </para>
-
+        
         <para>
             An example would be the following signature:
         </para>
-
+        
         <literallayout>
 http://phpstorage.blob.core.windows.net/phpazuretestshared1?st=2009-08-17T09%3A06%3A17Z&amp;se=2009-08-17T09%3A56%3A17Z&amp;sr=c&amp;sp=w&amp;sig=hscQ7Su1nqd91OfMTwTkxabhJSaspx%2BD%2Fz8UqZAgn9s%3D
         </literallayout>
-
+        
         <para>
             The above signature gives write access to the "phpazuretestshared1"
             container of the "phpstorage" account.
         </para>
-
-        <sect4 id="zend.service.windowsazure.storage.blob.sharedaccesssig.generate">
+    
+        <sect3 id="zend.service.windowsazure.storage.blob.sharedaccesssig.generate">
             <title>Generating a Shared Access Signature</title>
 
             <para>
@@ -264,7 +264,7 @@ http://phpstorage.blob.core.windows.net/phpazuretestshared1?st=2009-08-17T09%3A0
                 <classname>Zend_Service_WindowsAzure_Storage_Blob</classname> storage client can be
                 used.
             </para>
-
+            
             <para>
                 The following example code will generate a Shared Access Signature for write access
                 in a container named "container1", within a timeframe of 3000 seconds.
@@ -278,14 +278,14 @@ $storageClient   = new Zend_Service_WindowsAzure_Storage_Blob();
 $sharedAccessUrl = storageClient->generateSharedAccessUrl(
     'container1',
     '',
-    'c',
+    'c', 
     'w',
     $storageClient ->isoDate(time() - 500),
     $storageClient ->isoDate(time() + 3000)
 );
 ]]></programlisting>
             </example>
-
+            
             <para>
                 The following example code will generate a Shared Access Signature for read access
                 in a blob named <filename>test.txt</filename> in a container named "container1"
@@ -300,16 +300,16 @@ $storageClient   = new Zend_Service_WindowsAzure_Storage_Blob();
 $sharedAccessUrl = storageClient->generateSharedAccessUrl(
     'container1',
     'test.txt',
-    'b',
+    'b', 
     'r',
     $storageClient ->isoDate(time() - 500),
     $storageClient ->isoDate(time() + 3000)
 );
 ]]></programlisting>
             </example>
-        </sect4>
-
-        <sect4 id="zend.service.windowsazure.storage.blob.sharedaccesssig.consume">
+        </sect3>
+        
+        <sect3 id="zend.service.windowsazure.storage.blob.sharedaccesssig.consume">
             <title>Working with Shared Access Signatures from others</title>
 
             <para>
@@ -317,11 +317,11 @@ $sharedAccessUrl = storageClient->generateSharedAccessUrl(
                 Windows Azure SDK for PHP to work with the addressed resource.  For example, the
                 following signature can be retrieved from the owner of a storage account:
             </para>
-
+            
             <literallayout>
 http://phpstorage.blob.core.windows.net/phpazuretestshared1?st=2009-08-17T09%3A06%3A17Z&amp;se=2009-08-17T09%3A56%3A17Z&amp;sr=c&amp;sp=w&amp;sig=hscQ7Su1nqd91OfMTwTkxabhJSaspx%2BD%2Fz8UqZAgn9s%3D
             </literallayout>
-
+            
             <para>
                 The above signature gives write access to the "phpazuretestshared1" "container" of
                 the phpstorage account. Since the shared key for the account is not known, the
@@ -334,19 +334,19 @@ http://phpstorage.blob.core.windows.net/phpazuretestshared1?st=2009-08-17T09%3A0
                 <programlisting language="php"><![CDATA[
 $storageClient = new Zend_Service_WindowsAzure_Storage_Blob(
     'blob.core.windows.net', 'phpstorage', ''
+); 
+$storageClient->setCredentials( 
+    new Zend_Service_WindowsAzure_Credentials_SharedAccessSignature() 
 );
-$storageClient->setCredentials(
-    new Zend_Service_WindowsAzure_Credentials_SharedAccessSignature()
-);
-$storageClient->getCredentials()->setPermissionSet(array(
-    'http://phpstorage.blob.core.windows.net/phpazuretestshared1?st=2009-08-17T09%3A06%3A17Z&se=2009-08-17T09%3A56%3A17Z&sr=c&sp=w&sig=hscQ7Su1nqd91OfMTwTkxabhJSaspx%2BD%2Fz8UqZAgn9s%3D'
+$storageClient->getCredentials()->setPermissionSet(array( 
+    'http://phpstorage.blob.core.windows.net/phpazuretestshared1?st=2009-08-17T09%3A06%3A17Z&se=2009-08-17T09%3A56%3A17Z&sr=c&sp=w&sig=hscQ7Su1nqd91OfMTwTkxabhJSaspx%2BD%2Fz8UqZAgn9s%3D' 
 ));
 $storageClient->putBlob(
     'phpazuretestshared1', 'NewBlob.txt', 'C:\Files\dataforazure.txt'
 );
 ]]></programlisting>
             </example>
-
+            
             <para>
                 Note that there was no explicit permission to write to a specific blob. Instead, the
                 Windows Azure SDK for PHP determined that a permission was required to either write
@@ -354,6 +354,6 @@ $storageClient->putBlob(
                 available for the latter, the Windows Azure SDK for PHP chose those credentials to
                 perform the request on Windows Azure blob storage.
             </para>
-        </sect4>
-    </sect3>
-</sect2>
+        </sect3>
+    </sect2>
+</sect1>

+ 18 - 18
documentation/manual/en/module_specs/Zend_Service_WindowsAzure_Queue.xml

@@ -1,13 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Reviewed: no -->
-<sect2 id="zend.service.windowsazure.storage.queue">
+<sect1 id="zend.service.windowsazure.storage.queue">
     <title>Zend_Service_WindowsAzure_Storage_Queue</title>
 
     <para>
         The Queue service stores messages that may be read by any client who has access to the
         storage account.
     </para>
-
+    
     <para>
         A queue can contain an unlimited number of messages, each of which can be up to 8 KB in
         size. Messages are generally added to the end of the queue and retrieved from the front of
@@ -22,7 +22,7 @@
         provide a native PHP interface to the storage account.
     </para>
 
-    <sect3 id="zend.service.windowsazure.storage.queue.api">
+    <sect2 id="zend.service.windowsazure.storage.queue.api">
         <title>API Examples</title>
 
         <para>
@@ -32,7 +32,7 @@
             features.
         </para>
 
-        <sect4 id="zend.service.windowsazure.storage.queue.api.create-queue">
+        <sect3 id="zend.service.windowsazure.storage.queue.api.create-queue">
             <title>Creating a queue</title>
 
             <para>
@@ -49,9 +49,9 @@ $result = $storageClient->createQueue('testqueue');
 echo 'Queue name is: ' . $result->Name;
 ]]></programlisting>
             </example>
-        </sect4>
+        </sect3>
 
-        <sect4 id="zend.service.windowsazure.storage.queue.api.delete-queue">
+        <sect3 id="zend.service.windowsazure.storage.queue.api.delete-queue">
             <title>Deleting a queue</title>
 
             <para>
@@ -66,9 +66,9 @@ $storageClient = new Zend_Service_WindowsAzure_Storage_Queue();
 $storageClient->deleteQueue('testqueue');
 ]]></programlisting>
             </example>
-        </sect4>
+        </sect3>
 
-        <sect4 id="zend.service.windowsazure.storage.queue.api.storing-queue">
+        <sect3 id="zend.service.windowsazure.storage.queue.api.storing-queue">
             <title>Adding a message to a queue</title>
 
             <para>
@@ -83,12 +83,12 @@ $storageClient->deleteQueue('testqueue');
 $storageClient = new Zend_Service_WindowsAzure_Storage_Queue();
 
 // 3600 = time-to-live of the message, if omitted defaults to 7 days
-$storageClient->putMessage('testqueue', 'This is a test message', 3600);
+$storageClient->putMessage('testqueue', 'This is a test message', 3600); 
 ]]></programlisting>
             </example>
-        </sect4>
+        </sect3>
 
-        <sect4 id="zend.service.windowsazure.storage.queue.api.read-queue">
+        <sect3 id="zend.service.windowsazure.storage.queue.api.read-queue">
             <title>Reading a message from a queue</title>
 
             <para>
@@ -110,7 +110,7 @@ foreach ($messages as $message) {
 }
 ]]></programlisting>
             </example>
-
+            
             <para>
                 The messages that are read using <methodname>getMessages()</methodname> will be
                 invisible in the queue for 30 seconds, after which the messages will re-appear in
@@ -135,9 +135,9 @@ foreach ($messages as $message) {
 }
 ]]></programlisting>
             </example>
-        </sect4>
+        </sect3>
 
-        <sect4 id="zend.service.windowsazure.storage.queue.api.peek-queue">
+        <sect3 id="zend.service.windowsazure.storage.queue.api.peek-queue">
             <title>Check if there are messages in a queue</title>
 
             <para>
@@ -159,13 +159,13 @@ foreach ($messages as $message) {
 }
 ]]></programlisting>
             </example>
-
+            
             <para>
                 Note that messages that are read using <methodname>peekMessages()</methodname> will
                 not become invisible in the queue, nor can they be marked as processed using the
                 <methodname>deleteMessage()</methodname> method.  To do this, use
                 <methodname>getMessages()</methodname> instead.
             </para>
-        </sect4>
-    </sect3>
-</sect2>
+        </sect3>
+    </sect2>
+</sect1>

+ 48 - 48
documentation/manual/en/module_specs/Zend_Service_WindowsAzure_Table.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Reviewed: no -->
-<sect2 id="zend.service.windowsazure.storage.table">
+<sect1 id="zend.service.windowsazure.storage.table">
     <title>Zend_Service_WindowsAzure_Storage_Table</title>
 
     <para>
@@ -26,14 +26,14 @@
         Azure production table storage.
     </para>
 
-    <sect3 id="zend.service.windowsazure.storage.table.api">
+    <sect2 id="zend.service.windowsazure.storage.table.api">
         <title>Operations on tables</title>
 
         <para>
             This topic lists some samples of operations that can be executed on tables.
         </para>
 
-        <sect4 id="zend.service.windowsazure.storage.table.api.create">
+        <sect3 id="zend.service.windowsazure.storage.table.api.create">
             <title>Creating a table</title>
 
             <para>
@@ -53,9 +53,9 @@ $result = $storageClient->createTable('testtable');
 echo 'New table name is: ' . $result->Name;
 ]]></programlisting>
             </example>
-        </sect4>
+        </sect3>
 
-        <sect4 id="zend.service.windowsazure.storage.table.api.list">
+        <sect3 id="zend.service.windowsazure.storage.table.api.list">
             <title>Listing all tables</title>
 
             <para>
@@ -76,10 +76,10 @@ foreach ($result as $table) {
 }
 ]]></programlisting>
             </example>
-        </sect4>
-    </sect3>
+        </sect3>
+    </sect2>
 
-    <sect3 id="zend.service.windowsazure.storage.table.entities">
+    <sect2 id="zend.service.windowsazure.storage.table.entities">
         <title>Operations on entities</title>
 
         <para>
@@ -87,13 +87,13 @@ foreach ($result as $table) {
             has a primary key and a set of properties. A property is a named, typed-value pair,
             similar to a column.
         </para>
-
+        
         <para>
             The Table service does not enforce any schema for tables, so two entities in the same
             table may have different sets of properties. Developers may choose to enforce a schema
             on the client side. A table may contain any number of entities.
         </para>
-
+        
         <para>
             <classname>Zend_Service_WindowsAzure_Storage_Table</classname> provides 2 ways of
             working with entities:
@@ -127,12 +127,12 @@ class SampleEntity extends Zend_Service_WindowsAzure_Storage_TableEntity
     * @azure Name
     */
     public $Name;
-
+    
     /**
     * @azure Age Edm.Int64
     */
     public $Age;
-
+    
     /**
     * @azure Visible Edm.Boolean
     */
@@ -147,7 +147,7 @@ class SampleEntity extends Zend_Service_WindowsAzure_Storage_TableEntity
             <classname>Zend_Service_WindowsAzure_Storage_DynamicTableEntity</classname>.
         </para>
 
-        <sect4 id="zend.service.windowsazure.storage.table.entities.enforced">
+        <sect3 id="zend.service.windowsazure.storage.table.entities.enforced">
             <title>Enforced schema entities</title>
 
             <para>
@@ -210,12 +210,12 @@ class SampleEntity extends Zend_Service_WindowsAzure_Storage_TableEntity
      * @azure Name
      */
     public $Name;
-
+    
     /**
      * @azure Age Edm.Int64
      */
     public $Age;
-
+    
     /**
      * @azure Visible Edm.Boolean
      */
@@ -323,16 +323,16 @@ public $Age;
                     </para>
                 </listitem>
             </itemizedlist>
-        </sect4>
+        </sect3>
 
-        <sect4 id="zend.service.windowsazure.storage.table.entities.dynamic">
+        <sect3 id="zend.service.windowsazure.storage.table.entities.dynamic">
             <title>No enforced schema entities (a.k.a. DynamicEntity)</title>
 
             <para>
                 To use the <classname>Zend_Service_WindowsAzure_Storage_Table</classname> class
                 without defining a schema, you can make use of the
                 <classname>Zend_Service_WindowsAzure_Storage_DynamicTableEntity</classname> class.
-                This class inherits <classname>Zend_Service_WindowsAzure_Storage_TableEntity</classname>
+                This class inherits <classname>Zend_Service_WindowsAzure_Storage_TableEntity</code>
                 like an enforced schema class does, but contains additional logic to make it dynamic
                 and not bound to a schema.
             </para>
@@ -404,7 +404,7 @@ $target->Name = 'Name'; // Will add property "Name" of type "Edm.String"
 $target->Age  = 25;     // Will add property "Age" of type "Edm.Int32"
 
 // Change type of property "Age" to "Edm.Int32":
-$target->setAzurePropertyType('Age', 'Edm.Int64');
+$target->setAzurePropertyType('Age', 'Edm.Int64'); 
 ]]></programlisting>
             </example>
 
@@ -414,12 +414,12 @@ $target->setAzurePropertyType('Age', 'Edm.Int64');
                 <classname>Zend_Service_WindowsAzure_Storage_TableEntity</classname> if no specific
                 class is passed into Table Storage methods.
             </para>
-        </sect4>
+        </sect3>
 
-        <sect4 id="zend.service.windowsazure.storage.table.entities.api">
+        <sect3 id="zend.service.windowsazure.storage.table.entities.api">
             <title>Entities API examples</title>
 
-            <sect5 id="zend.service.windowsazure.storage.table.entities.api.insert">
+            <sect4 id="zend.service.windowsazure.storage.table.entities.api.insert">
                 <title>Inserting an entity</title>
 
                 <para>
@@ -446,9 +446,9 @@ echo 'Timestamp: ' . $result->getTimestamp() . "\n";
 echo 'Etag: ' . $result->getEtag() . "\n";
 ]]></programlisting>
                 </example>
-            </sect5>
+            </sect4>
 
-            <sect5 id="zend.service.windowsazure.storage.table.entities.api.retrieve-by-id">
+            <sect4 id="zend.service.windowsazure.storage.table.entities.api.retrieve-by-id">
                 <title>Retrieving an entity by partition key and row key</title>
 
                 <para>
@@ -468,9 +468,9 @@ $entity= $storageClient->retrieveEntityById(
 );
 ]]></programlisting>
                 </example>
-            </sect5>
+            </sect4>
 
-            <sect5 id="zend.service.windowsazure.storage.table.entities.api.updating">
+            <sect4 id="zend.service.windowsazure.storage.table.entities.api.updating">
                 <title>Updating an entity</title>
 
                 <para>
@@ -515,12 +515,12 @@ $entity = $storageClient->retrieveEntityById(
 $entity->Name = 'New name';
 
 // last parameter instructs the Etag check:
-$result = $storageClient->updateEntity('testtable', $entity, true);
+$result = $storageClient->updateEntity('testtable', $entity, true); 
 ]]></programlisting>
                 </example>
-            </sect5>
+            </sect4>
 
-            <sect5 id="zend.service.windowsazure.storage.table.entities.api.delete">
+            <sect4 id="zend.service.windowsazure.storage.table.entities.api.delete">
                 <title>Deleting an entity</title>
 
                 <para>
@@ -541,10 +541,10 @@ $entity = $storageClient->retrieveEntityById(
 $result = $storageClient->deleteEntity('testtable', $entity);
 ]]></programlisting>
                 </example>
-            </sect5>
-        </sect4>
+            </sect4>
+        </sect3>
 
-        <sect4 id="zend.service.windowsazure.storage.table.entities.querying">
+        <sect3 id="zend.service.windowsazure.storage.table.entities.querying">
             <title>Performing queries</title>
 
             <para>
@@ -618,9 +618,9 @@ foreach ($entities as $entity) {
 }
 ]]></programlisting>
             </example>
-        </sect4>
+        </sect3>
 
-        <sect4 id="zend.service.windowsazure.storage.table.entities.batch">
+        <sect3 id="zend.service.windowsazure.storage.table.entities.batch">
             <title>Batch operations</title>
 
             <para>
@@ -646,21 +646,21 @@ $storageClient = new Zend_Service_WindowsAzure_Storage_Table(
 
 // Start batch
 $batch = $storageClient->startBatch();
-
+            
 // Insert entities in batch
 $entities = generateEntities();
 foreach ($entities as $entity) {
     $storageClient->insertEntity($tableName, $entity);
 }
-
+            
 // Commit
 $batch->commit();
 ]]></programlisting>
             </example>
-        </sect4>
-    </sect3>
-
-    <sect3 id="zend.service.windowsazure.storage.table.sessionhandler">
+        </sect3>
+    </sect2>
+  
+    <sect2 id="zend.service.windowsazure.storage.table.sessionhandler">
         <title>Table storage session handler</title>
 
         <para>
@@ -670,7 +670,7 @@ $batch->commit();
             <classname>Zend_Service_WindowsAzure_SessionHandler</classname> class, which uses
             Windows Azure Table Storage as a session handler for PHP applications.
         </para>
-
+        
         <para>
             To use the <classname>Zend_Service_WindowsAzure_SessionHandler</classname> session
             handler, it should be registered as the default session handler for your PHP
@@ -691,19 +691,19 @@ $sessionHandler = new Zend_Service_WindowsAzure_SessionHandler(
 $sessionHandler->register();
 ]]></programlisting>
         </example>
-
+    
         <para>
             The above classname registers the
             <classname>Zend_Service_WindowsAzure_SessionHandler</classname> session handler and will
             store sessions in a table called "sessionstable".
         </para>
-
+        
         <para>
             After registration of the
             <classname>Zend_Service_WindowsAzure_SessionHandler</classname> session handler,
             sessions can be started and used in the same way as a normal PHP session:
         </para>
-
+        
         <example id="zend.service.windowsazure.storage.table.api.sessionhandler-usage">
             <title>Using table storage session handler</title>
 
@@ -726,13 +726,13 @@ if (!isset($_SESSION['firstVisit'])) {
 // ...
 ]]></programlisting>
         </example>
-
+    
         <warning>
             <para>
                 The <classname>Zend_Service_WindowsAzure_SessionHandler</classname> session handler
-                should be registered before a call to <methodname>session_start()</methodname>
+                should be registered before a call to <functionname>session_start()</functionname>
                 is made!
             </para>
         </warning>
-    </sect3>
-</sect2>
+    </sect2>
+</sect1>

+ 28 - 15
library/Zend/Service/WindowsAzure/Credentials/CredentialsAbstract.php

@@ -81,13 +81,13 @@ abstract class Zend_Service_WindowsAzure_Credentials_CredentialsAbstract
 	 * @param string $accountKey Account key for Windows Azure
 	 * @param boolean $usePathStyleUri Use path-style URI's
 	 */
-    public function __construct(
-        $accountName = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_ACCOUNT, 
-        $accountKey = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_KEY, 
-        $usePathStyleUri = false
-    ) {
-		$this->_accountName     = $accountName;
-		$this->_accountKey      = base64_decode($accountKey);
+	public function __construct(
+		$accountName = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_ACCOUNT,
+		$accountKey  = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_KEY,
+		$usePathStyleUri = false
+	) {
+		$this->_accountName = $accountName;
+		$this->_accountKey = base64_decode($accountKey);
 		$this->_usePathStyleUri = $usePathStyleUri;
 	}
 	
@@ -95,36 +95,36 @@ abstract class Zend_Service_WindowsAzure_Credentials_CredentialsAbstract
 	 * Set account name for Windows Azure
 	 *
 	 * @param  string $value
-     * @return Zend_Service_WindowsAzure_Credentials_CredentialsAbstract
+	 * @return Zend_Service_WindowsAzure_Credentials_CredentialsAbstract
 	 */
 	public function setAccountName($value = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_ACCOUNT)
 	{
 		$this->_accountName = $value;
-        return $this;
+		return $this;
 	}
 	
 	/**
 	 * Set account key for Windows Azure
 	 *
 	 * @param  string $value
-     * @return Zend_Service_WindowsAzure_Credentials_CredentialsAbstract
+	 * @return Zend_Service_WindowsAzure_Credentials_CredentialsAbstract
 	 */
 	public function setAccountkey($value = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_KEY)
 	{
 		$this->_accountKey = base64_decode($value);
-        return $this;
+		return $this;
 	}
 	
 	/**
 	 * Set use path-style URI's
 	 *
 	 * @param  boolean $value
-     * @return Zend_Service_WindowsAzure_Credentials_CredentialsAbstract
+	 * @return Zend_Service_WindowsAzure_Credentials_CredentialsAbstract
 	 */
 	public function setUsePathStyleUri($value = false)
 	{
 		$this->_usePathStyleUri = $value;
-        return $this;
+		return $this;
 	}
 	
 	/**
@@ -135,7 +135,11 @@ abstract class Zend_Service_WindowsAzure_Credentials_CredentialsAbstract
 	 * @param string $requiredPermission Required permission
 	 * @return string Signed request URL
 	 */
-	abstract public function signRequestUrl($requestUrl = '');
+	abstract public function signRequestUrl(
+		$requestUrl = '',
+		$resourceType = Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN,
+		$requiredPermission = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ
+	);
 	
 	/**
 	 * Sign request headers with credentials
@@ -149,7 +153,16 @@ abstract class Zend_Service_WindowsAzure_Credentials_CredentialsAbstract
 	 * @param string $requiredPermission Required permission
 	 * @return array Array of headers
 	 */
-	abstract public function signRequestHeaders($httpVerb = Zend_Http_Client::GET, $path = '/', $queryString = '', $headers = null, $forTableStorage = false, $resourceType = Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN, $requiredPermission = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ);
+	abstract public function signRequestHeaders(
+		$httpVerb = Zend_Http_Client::GET,
+		$path = '/',
+		$queryString = '',
+		$headers = null,
+		$forTableStorage = false,
+		$resourceType = Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN,
+		$requiredPermission = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ
+	);
+	
 	
 	/**
 	 * Prepare query string for signing

+ 41 - 42
library/Zend/Service/WindowsAzure/Credentials/SharedAccessSignature.php

@@ -51,19 +51,18 @@ class Zend_Service_WindowsAzure_Credentials_SharedAccessSignature
     protected $_permissionSet = array();
     
 	/**
-	 * Constructor
+	 * Creates a new Zend_Service_WindowsAzure_Credentials_SharedAccessSignature instance
 	 *
 	 * @param string $accountName Account name for Windows Azure
 	 * @param string $accountKey Account key for Windows Azure
 	 * @param boolean $usePathStyleUri Use path-style URI's
 	 * @param array $permissionSet Permission set
 	 */
-    public function __construct(
-        $accountName = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_ACCOUNT, 
-        $accountKey = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_KEY, 
-        $usePathStyleUri = false, 
-        $permissionSet = array()
-    ) {
+	public function __construct(
+		$accountName = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_ACCOUNT,
+		$accountKey  = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_KEY,
+		$usePathStyleUri = false, $permissionSet = array()
+	) {
 	    parent::__construct($accountName, $accountKey, $usePathStyleUri);
 	    $this->_permissionSet = $permissionSet;
 	}
@@ -85,16 +84,16 @@ class Zend_Service_WindowsAzure_Credentials_SharedAccessSignature
 	 * For example: first add blob permissions, end with container-wide permissions.
 	 * 
 	 * Warning: the signed access signature URL must match the account name of the
-	 * Zend_Service_WindowsAzure_Credentials_SharedAccessSignature instance
+	 * Zend_Service_WindowsAzure_Credentials_Zend_Service_WindowsAzure_Credentials_SharedAccessSignature instance
 	 * 
-	 * @param array $value Permission set
-     * @return void
+	 * @param  array $value Permission set
+	 * @return void
 	 */
     public function setPermissionSet($value = array())
 	{
 		foreach ($value as $url) {
 			if (strpos($url, $this->_accountName) === false) {
-				throw new Zend_Service_WindowsAzure_Exception('The permission set can only contain URLs for the account name specified in the Zend_Service_WindowsAzure_SharedAccessSignatureCredentials instance.');
+				throw new Zend_Service_WindowsAzure_Exception('The permission set can only contain URLs for the account name specified in the Zend_Service_WindowsAzure_Credentials_SharedAccessSignature instance.');
 			}
 		}
 	    $this->_permissionSet = $value;
@@ -112,12 +111,12 @@ class Zend_Service_WindowsAzure_Credentials_SharedAccessSignature
      * @return string 
      */
     public function createSignature(
-        $path = '/', 
-        $resource = 'b', 
-        $permissions = 'r', 
-        $start = '', 
-        $expiry = '', 
-        $identifier = ''
+    	$path = '/',
+    	$resource = 'b',
+    	$permissions = 'r',
+    	$start = '',
+    	$expiry = '',
+    	$identifier = ''
     ) {
 		// Determine path
 		if ($this->_usePathStyleUri) {
@@ -163,13 +162,13 @@ class Zend_Service_WindowsAzure_Credentials_SharedAccessSignature
      * @return string 
      */
     public function createSignedQueryString(
-        $path = '/', 
-        $queryString = '', 
-        $resource = 'b', 
-        $permissions = 'r', 
-        $start = '', 
-        $expiry = '', 
-        $identifier = ''
+    	$path = '/',
+    	$queryString = '',
+    	$resource = 'b',
+    	$permissions = 'r',
+    	$start = '',
+    	$expiry = '',
+    	$identifier = ''
     ) {
         // Parts
         $parts = array();
@@ -203,10 +202,10 @@ class Zend_Service_WindowsAzure_Credentials_SharedAccessSignature
 	 * @return string Signed request URL
 	 */
     public function permissionMatchesRequest(
-        $permissionUrl = '', 
-        $requestUrl = '', 
-        $resourceType = Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN, 
-        $requiredPermission = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ
+    	$permissionUrl = '',
+    	$requestUrl = '',
+    	$resourceType = Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN,
+    	$requiredPermission = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ
     ) {
         // Build requirements
         $requiredResourceType = $resourceType;
@@ -252,11 +251,11 @@ class Zend_Service_WindowsAzure_Credentials_SharedAccessSignature
 	 * @param string $requiredPermission Required permission
 	 * @return string Signed request URL
 	 */
-    public function signRequestUrl(
-        $requestUrl = '', 
-        $resourceType = Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN, 
-        $requiredPermission = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ
-    ) {
+	public function signRequestUrl(
+		$requestUrl = '',
+		$resourceType = Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN,
+		$requiredPermission = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ
+	) {
 	    // Look for a matching permission
 	    foreach ($this->getPermissionSet() as $permittedUrl) {
 	        if ($this->permissionMatchesRequest($permittedUrl, $requestUrl, $resourceType, $requiredPermission)) {
@@ -292,15 +291,15 @@ class Zend_Service_WindowsAzure_Credentials_SharedAccessSignature
 	 * @param string $requiredPermission Required permission
 	 * @return array Array of headers
 	 */
-    public function signRequestHeaders(
-        $httpVerb = Zend_Http_Client::GET, 
-        $path = '/', 
-        $queryString = '', 
-        $headers = null, 
-        $forTableStorage = false, 
-        $resourceType = Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN, 
-        $requiredPermission = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ
-    ) {
+	public function signRequestHeaders(
+		$httpVerb = Zend_Http_Client::GET,
+		$path = '/',
+		$queryString = '',
+		$headers = null,
+		$forTableStorage = false,
+		$resourceType = Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN,
+		$requiredPermission = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ
+	) {
 	    return $headers;
 	}
 }

+ 16 - 16
library/Zend/Service/WindowsAzure/Credentials/SharedKey.php

@@ -16,7 +16,7 @@
  * @package    Zend_Service_WindowsAzure
  * @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: SharedKeyCredentials.php 35835 2009-12-17 09:40:36Z unknown $
+ * @version    $Id: SharedKey.php 35999 2009-12-21 07:56:42Z unknown $
  */
 
 /**
@@ -40,7 +40,7 @@ require_once 'Zend/Http/Client.php';
  * @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_Service_WindowsAzure_Credentials_SharedKey 
+class Zend_Service_WindowsAzure_Credentials_SharedKey
     extends Zend_Service_WindowsAzure_Credentials_CredentialsAbstract
 {
     /**
@@ -51,11 +51,11 @@ class Zend_Service_WindowsAzure_Credentials_SharedKey
 	 * @param string $requiredPermission Required permission
 	 * @return string Signed request URL
 	 */
-    public function signRequestUrl(
-        $requestUrl = '', 
-        $resourceType = Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN, 
-        $requiredPermission = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ
-    ) {
+	public function signRequestUrl(
+		$requestUrl = '',
+		$resourceType = Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN,
+		$requiredPermission = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ
+	) {
 	    return $requestUrl;
 	}
 	
@@ -71,15 +71,15 @@ class Zend_Service_WindowsAzure_Credentials_SharedKey
 	 * @param string $requiredPermission Required permission
 	 * @return array Array of headers
 	 */
-    public function signRequestHeaders(
-        $httpVerb = Zend_Http_Client::GET, 
-        $path = '/', 
-        $queryString = '', 
-        $headers = null, 
-        $forTableStorage = false, 
-        $resourceType = Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN, 
-        $requiredPermission = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ
-    ) {
+	public function signRequestHeaders(
+		$httpVerb = Zend_Http_Client::GET,
+		$path = '/',
+		$queryString = '',
+		$headers = null,
+		$forTableStorage = false,
+		$resourceType = Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN,
+		$requiredPermission = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ
+	) {
 		// http://github.com/sriramk/winazurestorage/blob/214010a2f8931bac9c96dfeb337d56fe084ca63b/winazurestorage.py
 
 		// Determine path

+ 20 - 12
library/Zend/Service/WindowsAzure/Credentials/SharedKeyLite.php

@@ -30,12 +30,17 @@ require_once 'Zend/Service/WindowsAzure/Credentials/CredentialsAbstract.php';
 require_once 'Zend/Service/WindowsAzure/Storage.php';
 
 /**
+ * @see Zend_Service_WindowsAzure_Credentials_SharedKey
+ */
+require_once 'Zend/Service/WindowsAzure/Credentials/SharedKey.php';
+
+/**
  * @category   Zend
  * @package    Zend_Service_WindowsAzure
  * @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_Service_WindowsAzure_Credentials_SharedKeyLite 
+class Zend_Service_WindowsAzure_Credentials_SharedKeyLite
     extends Zend_Service_WindowsAzure_Credentials_CredentialsAbstract
 {
     /**
@@ -46,8 +51,11 @@ class Zend_Service_WindowsAzure_Credentials_SharedKeyLite
 	 * @param string $requiredPermission Required permission
 	 * @return string Signed request URL
 	 */
-	public function signRequestUrl($requestUrl = '', $resourceType = Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN, $requiredPermission = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ)
-	{
+	public function signRequestUrl(
+		$requestUrl = '',
+		$resourceType = Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN,
+		$requiredPermission = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ
+	) {
 	    return $requestUrl;
 	}
 	
@@ -63,15 +71,15 @@ class Zend_Service_WindowsAzure_Credentials_SharedKeyLite
 	 * @param string $requiredPermission Required permission
 	 * @return array Array of headers
 	 */
-    public function signRequestHeaders(
-        $httpVerb = Zend_Http_Client::GET, 
-        $path = '/', 
-        $queryString = '', 
-        $headers = null, 
-        $forTableStorage = false, 
-        $resourceType = Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN, 
-        $requiredPermission = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ
-    ) {
+	public function signRequestHeaders(
+		$httpVerb = Zend_Http_Client::GET,
+		$path = '/',
+		$queryString = '',
+		$headers = null,
+		$forTableStorage = false,
+		$resourceType = Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN,
+		$requiredPermission = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ
+	) {
 		// Determine path
 		if ($this->_usePathStyleUri) {
 			$path = substr($path, strpos($path, '/'));

+ 36 - 36
library/Zend/Service/WindowsAzure/Storage.php

@@ -17,7 +17,7 @@
  * @subpackage Storage
  * @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: Storage.php 35835 2009-12-17 09:40:36Z unknown $
+ * @version    $Id: Storage.php 35999 2009-12-21 07:56:42Z unknown $
  */
 
 /**
@@ -176,31 +176,31 @@ class Zend_Service_WindowsAzure_Storage
 	 * @param boolean $usePathStyleUri Use path-style URI's
 	 * @param Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy Retry policy to use when making requests
 	 */
-    public function __construct(
-        $host = self::URL_DEV_BLOB, 
-        $accountName = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_ACCOUNT, 
-        $accountKey = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_KEY, 
-        $usePathStyleUri = false, Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy = null
-    ) {
-		$this->_host            = $host;
-		$this->_accountName     = $accountName;
-		$this->_accountKey      = $accountKey;
+	public function __construct(
+		$host = self::URL_DEV_BLOB,
+		$accountName = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_ACCOUNT,
+		$accountKey = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_KEY,
+		$usePathStyleUri = false,
+		Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy = null
+	) {
+		$this->_host = $host;
+		$this->_accountName = $accountName;
+		$this->_accountKey = $accountKey;
 		$this->_usePathStyleUri = $usePathStyleUri;
 		
 		// Using local storage?
-        if (!$this->_usePathStyleUri 
-            && ($this->_host == self::URL_DEV_BLOB 
-                || $this->_host == self::URL_DEV_QUEUE 
-                || $this->_host == self::URL_DEV_TABLE)
-        ) {
+		if (!$this->_usePathStyleUri
+			&& ($this->_host == self::URL_DEV_BLOB
+				|| $this->_host == self::URL_DEV_QUEUE
+				|| $this->_host == self::URL_DEV_TABLE)
+		) {
 			// Local storage
 			$this->_usePathStyleUri = true;
 		}
 		
 		if (is_null($this->_credentials)) {
-            $this->_credentials = new Zend_Service_WindowsAzure_Credentials_SharedKey(
-                $this->_accountName, $this->_accountKey, $this->_usePathStyleUri
-            );
+		    $this->_credentials = new Zend_Service_WindowsAzure_Credentials_SharedKey(
+		    	$this->_accountName, $this->_accountKey, $this->_usePathStyleUri);
 		}
 		
 		$this->_retryPolicy = $retryPolicy;
@@ -295,11 +295,11 @@ class Zend_Service_WindowsAzure_Storage
 	 */
 	public function getBaseUrl()
 	{
-        if ($this->_usePathStyleUri) {
+		if ($this->_usePathStyleUri) {
 			return 'http://' . $this->_host . '/' . $this->_accountName;
-        }
-
-        return 'http://' . $this->_accountName . '.' . $this->_host;
+		} else {
+			return 'http://' . $this->_accountName . '.' . $this->_host;
+		}
 	}
 	
 	/**
@@ -338,16 +338,16 @@ class Zend_Service_WindowsAzure_Storage
 	 * @param string $requiredPermission Required permission
 	 * @return Zend_Http_Response
 	 */
-    protected function _performRequest(
-        $path = '/', 
-        $queryString = '', 
-        $httpVerb = Zend_Http_Client::GET, 
-        $headers = array(), 
-        $forTableStorage = false, 
-        $rawData = null, 
-        $resourceType = Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN, 
-        $requiredPermission = Zend_Service_WindowsAzure_Credentials::PERMISSION_READ
-    ) {
+	protected function _performRequest(
+		$path = '/',
+		$queryString = '',
+		$httpVerb = Zend_Http_Client::GET,
+		$headers = array(),
+		$forTableStorage = false,
+		$rawData = null,
+		$resourceType = Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN,
+		$requiredPermission = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ
+	) {
 	    // Clean path
 		if (strpos($path, '/') !== 0) {
 			$path = '/' . $path;
@@ -374,10 +374,10 @@ class Zend_Service_WindowsAzure_Storage
 		$queryString    = self::urlencode($queryString);
 
 		// Generate URL and sign request
-        $requestUrl     = $this->_credentials
-                        ->signRequestUrl($this->getBaseUrl() . $path . $queryString, $resourceType, $requiredPermission);
-        $requestHeaders = $this->_credentials
-                        ->signRequestHeaders($httpVerb, $path, $queryString, $headers, $forTableStorage, $resourceType, $requiredPermission);
+		$requestUrl     = $this->_credentials
+						  ->signRequestUrl($this->getBaseUrl() . $path . $queryString, $resourceType, $requiredPermission);
+		$requestHeaders = $this->_credentials
+						  ->signRequestHeaders($httpVerb, $path, $queryString, $headers, $forTableStorage, $resourceType, $requiredPermission);
 
 		// Prepare request
 		$this->_httpClientChannel->resetParameters(true);

+ 1 - 1
library/Zend/Service/WindowsAzure/Storage/BatchStorageAbstract.php

@@ -57,7 +57,7 @@ require_once 'Zend/Http/Response.php';
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
-abstract class Zend_Service_WindowsAzure_Storage_BatchStorageAbstract 
+abstract class Zend_Service_WindowsAzure_Storage_BatchStorageAbstract
     extends Zend_Service_WindowsAzure_Storage
 {	
     /**

+ 4 - 4
library/Zend/Service/WindowsAzure/Storage/Blob.php

@@ -17,11 +17,11 @@
  * @subpackage Storage
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://todo     name_todo
- * @version    $Id: Blob.php 35835 2009-12-17 09:40:36Z unknown $
+ * @version    $Id: Blob.php 35999 2009-12-21 07:56:42Z unknown $
  */
 
 /**
- * @see Zend_Service_WindowsAzure_Credentials_SharedKey
+ * @see Zend_Service_WindowsAzure_Credentials_CredentialsAbstract_SharedKey
  */
 require_once 'Zend/Service/WindowsAzure/Credentials/SharedKey.php';
 
@@ -123,7 +123,7 @@ class Zend_Service_WindowsAzure_Storage_Blob extends Zend_Service_WindowsAzure_S
 	 * @param boolean $usePathStyleUri Use path-style URI's
 	 * @param Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy Retry policy to use when making requests
 	 */
-	public function __construct($host = Zend_Service_WindowsAzure_Storage::URL_DEV_BLOB, $accountName = Zend_Service_WindowsAzure_Credentials_SharedKey::DEVSTORE_ACCOUNT, $accountKey = Zend_Service_WindowsAzure_Credentials_SharedKey::DEVSTORE_KEY, $usePathStyleUri = false, Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy = null)
+	public function __construct($host = Zend_Service_WindowsAzure_Storage::URL_DEV_BLOB, $accountName = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract_CredentialsAbstract::DEVSTORE_ACCOUNT, $accountKey = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract_CredentialsAbstract::DEVSTORE_KEY, $usePathStyleUri = false, Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy = null)
 	{
 		parent::__construct($host, $accountName, $accountKey, $usePathStyleUri, $retryPolicy);
 		
@@ -492,7 +492,7 @@ class Zend_Service_WindowsAzure_Storage_Blob extends Zend_Service_WindowsAzure_S
 		$response = $this->_performRequest('', $queryString, Zend_Http_Client::GET, array(), false, null, Zend_Service_WindowsAzure_Storage::RESOURCE_CONTAINER, Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_LIST);	
 		if ($response->isSuccessful()) {
 			$xmlContainers = $this->_parseResponse($response)->Containers->Container;
-			$xmlMarker = (string) $this->_parseResponse($response)->NextMarker;
+			$xmlMarker = (string)$this->_parseResponse($response)->NextMarker;
 
 			$containers = array();
 			if (!is_null($xmlContainers)) {

+ 4 - 4
library/Zend/Service/WindowsAzure/Storage/Queue.php

@@ -21,9 +21,9 @@
  */
 
 /**
- * @see Zend_Service_WindowsAzure_SharedKeyCredentials
+ * @see Zend_Service_WindowsAzure_Credentials_SharedKey
  */
-require_once 'Zend/Service/WindowsAzure/SharedKeyCredentials.php';
+require_once 'Zend/Service/WindowsAzure/Credentials/SharedKey.php';
 
 /**
  * @see Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract
@@ -89,7 +89,7 @@ class Zend_Service_WindowsAzure_Storage_Queue extends Zend_Service_WindowsAzure_
 	 * @param boolean $usePathStyleUri Use path-style URI's
 	 * @param Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy Retry policy to use when making requests
 	 */
-	public function __construct($host = Zend_Service_WindowsAzure_Storage::URL_DEV_QUEUE, $accountName = Zend_Service_WindowsAzure_SharedKeyCredentials::DEVSTORE_ACCOUNT, $accountKey = Zend_Service_WindowsAzure_SharedKeyCredentials::DEVSTORE_KEY, $usePathStyleUri = false, Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy = null)
+	public function __construct($host = Zend_Service_WindowsAzure_Storage::URL_DEV_QUEUE, $accountName = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_ACCOUNT, $accountKey = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_KEY, $usePathStyleUri = false, Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy = null)
 	{
 		parent::__construct($host, $accountName, $accountKey, $usePathStyleUri, $retryPolicy);
 		
@@ -301,7 +301,7 @@ class Zend_Service_WindowsAzure_Storage_Queue extends Zend_Service_WindowsAzure_
 		$response = $this->_performRequest('', $queryString, Zend_Http_Client::GET);	
 		if ($response->isSuccessful()) {
 			$xmlQueues = $this->_parseResponse($response)->Queues->Queue;
-			$xmlMarker = (string) $this->_parseResponse($response)->NextMarker;
+			$xmlMarker = (string)$this->_parseResponse($response)->NextMarker;
 
 			$queues = array();
 			if (!is_null($xmlQueues)) {

+ 11 - 1
library/Zend/Service/WindowsAzure/Storage/Table.php

@@ -93,7 +93,7 @@ require_once 'Zend/Service/WindowsAzure/Exception.php';
  * @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_Service_WindowsAzure_Storage_Table 
+class Zend_Service_WindowsAzure_Storage_Table
     extends Zend_Service_WindowsAzure_Storage_BatchStorageAbstract
 {
 	/**
@@ -753,6 +753,16 @@ class Zend_Service_WindowsAzure_Storage_Table
 	}
 	
 	/**
+	 * Generate RFC 1123 compliant date string
+	 * 
+	 * @return string
+	 */
+	protected function _rfcDate()
+	{
+	    return gmdate('D, d M Y H:i:s', time()) . ' GMT'; // RFC 1123
+	}
+	
+	/**
 	 * Fill text template with variables from key/value array
 	 * 
 	 * @param string $templateText Template text

+ 1 - 1
library/Zend/Service/WindowsAzure/Storage/TableEntityQuery.php

@@ -323,4 +323,4 @@ class Zend_Service_WindowsAzure_Storage_TableEntityQuery
 	{
 		return $this->assembleQuery();
 	}
-}
+}

+ 3 - 645
tests/TestConfiguration.php.dist

@@ -1,5 +1,4 @@
 <?php
-
 /**
  * Zend Framework
  *
@@ -15,612 +14,9 @@
  *
  * @category   Zend
  * @package    UnitTests
+ * @version    $Id$
  * @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$
- */
-
-/**
- * This file defines configuration for running the unit tests for the Zend
- * Framework.  Some tests have dependencies to PHP extensions or databases
- * which may not necessary installed on the target system.  For these cases,
- * the ability to disable or configure testing is provided below.  Tests for
- * components which should run universally are always run by the master
- * suite and cannot be disabled.
- *
- * Do not edit this file. Instead, copy this file to TestConfiguration.php,
- * and edit the new file. Never commit plaintext passwords to the source
- * code repository.
- */
-
-/**
- * GENERAL SETTINGS
- *
- * OB_ENABLED should be enabled for some tests to check if all functionality
- * works as expected. Such tests include those for Zend_Soap and Zend_Session,
- * which require that headers not be sent in order to work.
- */
-define('TESTS_ZEND_OB_ENABLED', false);
-
-/**
- * Zend_Auth_Adapter_DbTable tests
- */
-define('TESTS_ZEND_AUTH_ADAPTER_DBTABLE_PDO_SQLITE_ENABLED', false);
-define('TESTS_ZEND_AUTH_ADAPTER_DBTABLE_PDO_SQLITE_DATABASE', ':memory:');
-
-/**
- * Zend_Auth_Adapter_Ldap online tests
- * (See also TESTS_ZEND_LDAP_* configuration constants below)
- */
-define('TESTS_ZEND_AUTH_ADAPTER_LDAP_ONLINE_ENABLED', false);
-
-/**
- * Zend_Cache
- *
- * TESTS_ZEND_CACHE_SQLITE_ENABLED    => sqlite extension has to be enabled
- * TESTS_ZEND_CACHE_APC_ENABLED       => apc extension has to be enabled
- * TESTS_ZEND_CACHE_MEMCACHED_ENABLED => memcache extension has to be enabled and
- *                                       a memcached server has to be available
- * TESTS_ZEND_CACHE_XCACHE_ENABLED    => xcache extension has to be enabled
- */
-define('TESTS_ZEND_CACHE_SQLITE_ENABLED', false);
-define('TESTS_ZEND_CACHE_APC_ENABLED', false);
-define('TESTS_ZEND_CACHE_XCACHE_ENABLED', true);
-define('TESTS_ZEND_CACHE_XCACHE_USER', null);
-define('TESTS_ZEND_CACHE_XCACHE_PASSWORD', null);
-define('TESTS_ZEND_CACHE_PLATFORM_ENABLED', false);
-define('TESTS_ZEND_CACHE_MEMCACHED_ENABLED', false);
-define('TESTS_ZEND_CACHE_MEMCACHED_HOST', '127.0.0.1');
-define('TESTS_ZEND_CACHE_MEMCACHED_PORT', 11211);
-define('TESTS_ZEND_CACHE_MEMCACHED_PERSISTENT', true);
-
-/**
- * Zend_Controller
- *
- * TESTS_ZEND_CONTROLLER_DISPATCHER_OB => test disabling output buffering in
- *                                        dispatcher
- */
-define('TESTS_ZEND_CONTROLLER_DISPATCHER_OB', false);
-
-/**
- * Zend_Db_Adapter_Pdo_Mysql and Zend_Db_Adapter_Mysqli
- *
- * There are separate properties to enable tests for the PDO_MYSQL adapter and
- * the native Mysqli adapters, but the other properties are shared between the
- * two MySQL-related Zend_Db adapters.
- */
-define('TESTS_ZEND_DB_ADAPTER_PDO_MYSQL_ENABLED',  false);
-define('TESTS_ZEND_DB_ADAPTER_MYSQLI_ENABLED',  false);
-define('TESTS_ZEND_DB_ADAPTER_MYSQL_HOSTNAME', '127.0.0.1');
-define('TESTS_ZEND_DB_ADAPTER_MYSQL_USERNAME', null);
-define('TESTS_ZEND_DB_ADAPTER_MYSQL_PASSWORD', null);
-define('TESTS_ZEND_DB_ADAPTER_MYSQL_DATABASE', 'test');
-define('TESTS_ZEND_DB_ADAPTER_MYSQL_PORT', 3306);
-
-/**
- * Zend_Db_Adapter_Pdo_Sqlite
- *
- * Username and password are irrelevant for SQLite.
- */
-define('TESTS_ZEND_DB_ADAPTER_PDO_SQLITE_ENABLED',  false);
-define('TESTS_ZEND_DB_ADAPTER_PDO_SQLITE_DATABASE', ':memory:');
-
-/**
- * Zend_Db_Adapter_Pdo_Mssql
- *
- * Note that you need to patch your ntwdblib.dll, the one that
- * comes with PHP does not work.  See user comments at
- * http://us2.php.net/manual/en/ref.mssql.php
- */
-define('TESTS_ZEND_DB_ADAPTER_PDO_MSSQL_ENABLED',  false);
-define('TESTS_ZEND_DB_ADAPTER_PDO_MSSQL_HOSTNAME', '127.0.0.1');
-define('TESTS_ZEND_DB_ADAPTER_PDO_MSSQL_USERNAME', null);
-define('TESTS_ZEND_DB_ADAPTER_PDO_MSSQL_PASSWORD', null);
-define('TESTS_ZEND_DB_ADAPTER_PDO_MSSQL_DATABASE', 'test');
-
-/**
- * Zend_Db_Adapter_Pdo_Pgsql
- */
-define('TESTS_ZEND_DB_ADAPTER_PDO_PGSQL_ENABLED',  false);
-define('TESTS_ZEND_DB_ADAPTER_PDO_PGSQL_HOSTNAME', '127.0.0.1');
-define('TESTS_ZEND_DB_ADAPTER_PDO_PGSQL_USERNAME', null);
-define('TESTS_ZEND_DB_ADAPTER_PDO_PGSQL_PASSWORD', null);
-define('TESTS_ZEND_DB_ADAPTER_PDO_PGSQL_DATABASE', 'postgres');
-
-/**
- * Zend_Db_Adapter_Oracle and Zend_Db_Adapter_Pdo_Oci
- *
- * There are separate properties to enable tests for the PDO_OCI adapter and
- * the native Oracle adapter, but the other properties are shared between the
- * two Oracle-related Zend_Db adapters.
- */
-define('TESTS_ZEND_DB_ADAPTER_PDO_OCI_ENABLED',  false);
-define('TESTS_ZEND_DB_ADAPTER_ORACLE_ENABLED',  false);
-define('TESTS_ZEND_DB_ADAPTER_ORACLE_HOSTNAME', '127.0.0.1');
-define('TESTS_ZEND_DB_ADAPTER_ORACLE_USERNAME', null);
-define('TESTS_ZEND_DB_ADAPTER_ORACLE_PASSWORD', null);
-define('TESTS_ZEND_DB_ADAPTER_ORACLE_SID',      'xe');
-
-/**
- * Zend_Db_Adapter_Db2 and Zend_Db_Adapter_Pdo_Ibm
- * There are separate properties to enable tests for the PDO_IBM adapter and
- * the native DB2 adapter, but the other properties are shared between the
- * two related Zend_Db adapters.
- */
-define('TESTS_ZEND_DB_ADAPTER_PDO_IBM_ENABLED',  false);
-define('TESTS_ZEND_DB_ADAPTER_DB2_ENABLED',  false);
-define('TESTS_ZEND_DB_ADAPTER_DB2_HOSTNAME', '127.0.0.1');
-define('TESTS_ZEND_DB_ADAPTER_DB2_PORT', 50000);
-define('TESTS_ZEND_DB_ADAPTER_DB2_USERNAME', null);
-define('TESTS_ZEND_DB_ADAPTER_DB2_PASSWORD', null);
-define('TESTS_ZEND_DB_ADAPTER_DB2_DATABASE', 'sample');
-
-/**
- * Zend_Db_Adapter_Sqlsrv
- * Note: Make sure that you create the "test" database and set a 
- * username and password
- *
- */
-define('TESTS_ZEND_DB_ADAPTER_SQLSRV_ENABLED',  false);
-define('TESTS_ZEND_DB_ADAPTER_SQLSRV_HOSTNAME', 'localhost\SQLEXPRESS');
-define('TESTS_ZEND_DB_ADAPTER_SQLSRV_USERNAME', null);
-define('TESTS_ZEND_DB_ADAPTER_SQLSRV_PASSWORD', null);
-define('TESTS_ZEND_DB_ADAPTER_SQLSRV_DATABASE', 'test');
-
-/**
- * Zend_Feed_Reader tests
- *
- * If the ONLINE_ENABLED property is false, only tests that can be executed
- * without network connectivity are run; when enabled, all tests will run.
- */
-define('TESTS_ZEND_FEED_READER_ONLINE_ENABLED', false);
-
-/**
- * Zend_Gdata tests
- *
- * If the ONLINE_ENABLED property is false, only tests that can be executed with
- * a mock HTTP client are run.  No request is sent to the Google Gdata servers.
- * If ONLINE_ENABLED is true, some tests may make requests to the remote
- * servers.  This does not work if you are running tests on a disconnected
- * client host.  Also, the tests may show as failures if the Google servers
- * cannot be reached or if they do not respond for another reason.
- *
- * If the CLIENTLOGIN_ENABLED property below is false, the authenticated
- * tests are reported Skipped in the test run.  Set this property to true
- * to enable tests that require ClientLogin authentication.  Enter your
- * Google login credentials in the EMAIL and PASSWORD properties below.
- *
- * Edit TestConfiguration.php, not TestConfiguration.php.dist.
- * Never commit plaintext passwords to the source code repository.
- *
- * Note: the GData tests currently require that the TZID env variable
- * be set or the timezone otherwise configured.  You'll see errors from the
- * tests if this is not the case.
- */
-define('TESTS_ZEND_GDATA_ONLINE_ENABLED', false);
-define('TESTS_ZEND_GDATA_CLIENTLOGIN_ENABLED', false);
-
-/*
- * The credentials provided here should be only for a TEST account.
- * Data for various services in this account may be added to, updated,
- * or deleted based upon the actions of these test accounts.
- */
-define('TESTS_ZEND_GDATA_CLIENTLOGIN_EMAIL', 'example@example.com');
-define('TESTS_ZEND_GDATA_CLIENTLOGIN_PASSWORD', 'password');
-
-/*
- * This is the ID of a blank blog.  There is no need to have
- * any content in this blog.  Also, blogs can only be used
- * several times for the purpose of these test cases before
- * they must be deleted and recreated.  Otherwise, the tests
- * will start failing, as posts to Blogger will return a 201 Created
- * response even though the entry was not posted to the blog.
- * This problem is being investigated.
- */
-define('TESTS_ZEND_GDATA_BLOGGER_ONLINE_ENABLED', false);
-define('TESTS_ZEND_GDATA_BLOG_ID', '1111111111111111111');
-
-/*
- * This is the key for a spreadsheet with data only in the first row of
- * the spreadsheet.  The strings 'a1', 'b1', 'c1', 'd1' should be in the
- * corresponding cell locations.
- */
-define('TESTS_ZEND_GDATA_SPREADSHEETS_ONLINE_ENABLED', false);
-define('TESTS_ZEND_GDATA_SPREADSHEETS_SPREADSHEETKEY', 'o01111111111111111111.1111111111111111111');
-define('TESTS_ZEND_GDATA_SPREADSHEETS_WORKSHEETID', 'default');
-
-/*
- * This indicates that online tests for the Google Calendar API should
- * be performed. The default calendar will be used.
- */
-define('TESTS_ZEND_GDATA_CALENDAR_ONLINE_ENABLED', false);
-
-/*
- * This is the fully-qualified domain name for a domiain hosted using
- * Google Apps. This domain must be registered with Google Apps and
- * have API access enabled.  This should be a TEST domain only.
- */
-define('TESTS_ZEND_GDATA_GAPPS_ONLINE_ENABLED', false);
-define('TESTS_ZEND_GDATA_GAPPS_DOMAIN', 'example.com.invalid');
-define('TESTS_ZEND_GDATA_GAPPS_EMAIL', 'example@example.com');
-define('TESTS_ZEND_GDATA_GAPPS_PASSWORD', 'password');
-
-/*
- * This is the ONLINE_ENABLED property for Google Base.
- */
-define('TESTS_ZEND_GDATA_GBASE_ONLINE_ENABLED', false);
-
-/*
- * This indicates that online tests for the Books Search data API
- * should be performed.
- */
-define('TESTS_ZEND_GDATA_BOOKS_ONLINE_ENABLED', false);
-
-/*
- * This indicates that online tests for the YouTube data API should
- * be performed.
- */
-define('TESTS_ZEND_GDATA_YOUTUBE_ONLINE_ENABLED', false);
-
-/*
- * This is the username to use for retrieving subscriptions, etc
- */
-define('TESTS_ZEND_GDATA_YOUTUBE_ACCOUNT', 'zfgdata');
-
-/*
- * This is the developer key to access the YouTube API
- */
-define('TESTS_ZEND_GDATA_YOUTUBE_DEVELOPER_KEY', 'your_developer_key_here');
-
-/*
- * This is the client ID to access the YouTube API
- */
-define('TESTS_ZEND_GDATA_YOUTUBE_CLIENT_ID', 'ZF_UnitTests_unknown');
-
-/*
- * This indicates that online tests for the Google Documents API should
- * be performed.
- */
-define('TESTS_ZEND_GDATA_DOCS_ONLINE_ENABLED', false);
-
-/*
- * This indicates that online tests for the GData Photos API should
- * be performed.
- */
-define('TESTS_ZEND_GDATA_PHOTOS_ONLINE_ENABLED', false);
-
-/*
- * This indicates that online tests for the Google Health API should
- * be performed.
- */
-define('TESTS_ZEND_GDATA_HEALTH_ONLINE_ENABLED', false);
-
-/**
- * Zend_Http_Client tests
- *
- * To enable the dynamic Zend_Http_Client tests, you will need to symbolically
- * link or copy the files in tests/Zend/Http/Client/_files to a directory
- * under your web server(s) document root and set this constant to point to the
- * URL of this directory.
- */
-define('TESTS_ZEND_HTTP_CLIENT_BASEURI', false);
-
-/**
- * Zend_Http_Client_Proxy tests
- *
- * HTTP proxy to be used for testing the Proxy adapter. Set to a string of
- * the form 'host:port'. Set to null to skip HTTP proxy tests.
- */
-define('TESTS_ZEND_HTTP_CLIENT_HTTP_PROXY', false);
-define('TESTS_ZEND_HTTP_CLIENT_HTTP_PROXY_USER', '');
-define('TESTS_ZEND_HTTP_CLIENT_HTTP_PROXY_PASS', '');
-
-/**
- * Zend_Loader_Autoloader multi-version support tests
- *
- * ENABLED:      whether or not to run the multi-version tests
- * PATH:         path to a directory containing multiple ZF version installs
- * LATEST:       most recent ZF version in the PATH
- *               e.g., "1.9.2"
- * LATEST_MAJOR: most recent ZF major version in the PATH to test against
- *               e.g., "1.9.2"
- * LATEST_MINOR: most recent ZF minor version in the PATH to test against
- *               e.g., "1.8.4PL1"
- * SPECIFIC:     specific ZF version in the PATH to test against
- *               e.g., "1.7.6"
- * As an example, consider the following tree:
- *     ZendFramework/
- *     |-- 1.9.2
- *     |-- ZendFramework-1.9.1-minimal
- *     |-- 1.8.4PL1
- *     |-- 1.8.4
- *     |-- ZendFramework-1.8.3
- *     |-- 1.7.8
- *     |-- 1.7.7
- *     |-- 1.7.6
- * You would then set the value of "LATEST" and "LATEST_MAJOR" to "1.9.2", and
- * could choose between "1.9.2", "1.8.4PL1", and "1.7.8" for "LATEST_MINOR",
- * and any version number for "SPECIFIC". "PATH" would point to the parent
- * "ZendFramework" directory.
- */
-define('TESTS_ZEND_LOADER_AUTOLOADER_MULTIVERSION_ENABLED', false);
-define('TESTS_ZEND_LOADER_AUTOLOADER_MULTIVERSION_PATH', false);
-define('TESTS_ZEND_LOADER_AUTOLOADER_MULTIVERSION_LATEST', false);
-define('TESTS_ZEND_LOADER_AUTOLOADER_MULTIVERSION_LATEST_MAJOR', false);
-define('TESTS_ZEND_LOADER_AUTOLOADER_MULTIVERSION_LATEST_MINOR', false);
-define('TESTS_ZEND_LOADER_AUTOLOADER_MULTIVERSION_SPECIFIC', false);
-
-/**
- * Zend_Ldap online tests
- */
-define('TESTS_ZEND_LDAP_ONLINE_ENABLED', false);
-
-/* These largely map to the options described in the Zend_Ldap and
- * Zend_Auth_Adapter_Ldap documentation.
- *
- * Example Configuration for Active Directory:
- *                      HOST: dc1.w.net
- *             USE_START_TLS: true
- *                   USE_SSL: false
- *                  USERNAME: CN=User 1,CN=Users,DC=w,DC=net
- *            PRINCIPAL_NAME: user1@w.net
- *             LDAP_PASSWORD: pass1
- *                   BASE_DN: CN=Users,DC=w,DC=net
- *               DOMAIN_NAME: w.net
- * ACCOUNT_DOMAIN_NAME_SHORT: W
- *              ALT_USERNAME: user2
- *                    ALT_DN: CN=User 2,CN=Users,DC=w,DC=net
- *              ALT_PASSWORD: pass2
- *
- * Example Configuration for OpenLDAP
- *                      HOST: s0.foo.net
- *                  USERNAME: CN=user1,DC=foo,DC=net
- *            PRINCIPAL_NAME: user1@foo.net
- *             LDAP_PASSWORD: pass1
- *          BIND_REQUIRES_DN: true
- *                   BASE_DN: OU=Sales,DC=w,DC=net
- *               DOMAIN_NAME: foo.net
- * ACCOUNT_DOMAIN_NAME_SHORT: FOO
- *              ALT_USERNAME: abaker
- *                    ALT_DN: CN=Alice Baker,OU=Sales,DC=foo,DC=net
- *              ALT_PASSWORD: apass
- */
-define('TESTS_ZEND_LDAP_HOST', 'localhost');
-//define('TESTS_ZEND_LDAP_PORT', 389);
-define('TESTS_ZEND_LDAP_USE_START_TLS', true);
-//define('TESTS_ZEND_LDAP_USE_SSL', false);
-define('TESTS_ZEND_LDAP_USERNAME', 'CN=someUser,DC=example,DC=com');
-define('TESTS_ZEND_LDAP_PRINCIPAL_NAME', 'someUser@example.com');
-define('TESTS_ZEND_LDAP_PASSWORD', null);
-define('TESTS_ZEND_LDAP_BIND_REQUIRES_DN', true);
-define('TESTS_ZEND_LDAP_BASE_DN', 'OU=Sales,DC=example,DC=com');
-//define('TESTS_ZEND_LDAP_ACCOUNT_FILTER_FORMAT', '(&(objectClass=posixAccount)(uid=%s))');
-define('TESTS_ZEND_LDAP_ACCOUNT_DOMAIN_NAME', 'example.com');
-define('TESTS_ZEND_LDAP_ACCOUNT_DOMAIN_NAME_SHORT', 'EXAMPLE');
-define('TESTS_ZEND_LDAP_ALT_USERNAME', 'anotherUser');
-define('TESTS_ZEND_LDAP_ALT_DN', 'CN=Another User,OU=Sales,DC=example,DC=com');
-define('TESTS_ZEND_LDAP_ALT_PASSWORD', null);
-
-/**
- * Zend_Locale tests
- *
- * If the TESTS_ZEND_LOCALE_FORMAT_SETLOCALE property below is a valid,
- * locally recognized locale (try "locale -a"), then all tests in
- * tests/Zend/Locale/ test suites will execute *after*
- *    setlocale(LC_ALL, TESTS_ZEND_LOCALE_FORMAT_SETLOCALE);
- * Primarily, this switches certain PHP functions to emit "localized" output,
- * including the built-in "to string" for integer and float conversions.
- * Thus, a locale of 'fr_FR' yields number-to-string conversions in a
- * localized form with the decimal place separator chosen via:
- *    setlocale(LC_ALL, 'fr_FR@euro');
- */
-//define('TESTS_ZEND_LOCALE_FORMAT_SETLOCALE', 'fr');
-//define('TESTS_ZEND_LOCALE_FORMAT_SETLOCALE', 'fr_FR@euro');
-define('TESTS_ZEND_LOCALE_FORMAT_SETLOCALE', false);
-
-/**
- * Zend_Date tests
- *
- * If the BCMATH_ENABLED property below is false, all arithmetic
- * operations will use ordinary PHP math operators and functions.
- * Otherwise, the bcmath functions will be used for unlimited precision.
- *
- * If the EXTENDED_COVERAGE property below is false, most of the I18N
- * unit tests will not be computed... this speeds tests up to 80 minutes
- * when doing reports. *
- * Edit TestConfiguration.php, not TestConfiguration.php.dist.
- */
-define('TESTS_ZEND_LOCALE_BCMATH_ENABLED', true);
-define('TESTS_ZEND_I18N_EXTENDED_COVERAGE', true);
-
-/**
- * Zend_Mail_Storage tests
- *
- * TESTS_ZEND_MAIL_SERVER_TESTDIR and TESTS_ZEND_MAIL_SERVER_FORMAT are used for POP3 and IMAP tests.
- * TESTS_ZEND_MAIL_SERVER_FORMAT is the format your test mail server uses: 'mbox' or 'maildir'. The mail
- * storage for the user specified in your POP3 or IMAP tests should be TESTS_ZEND_MAIL_SERVER_TESTDIR. Be
- * careful: it's cleared before copying the files. If you want to copy the files manually set the dir
- * to null (or anything == null).
- *
- * TESTS_ZEND_MAIL_TEMPDIR is used for testing write operations in local storages. If not set (== null)
- * tempnam() is used.
- */
-define('TESTS_ZEND_MAIL_SERVER_TESTDIR', null);
-define('TESTS_ZEND_MAIL_SERVER_FORMAT', 'mbox');
-define('TESTS_ZEND_MAIL_TEMPDIR', null);
-
-/**
- * Zend_Mail_Storage_Pop3 / Zend_Mail_Transport_Pop3
- *
- * IMPORTANT: you need to copy tests/Zend/Mail/_files/test.mbox to your mail
- * if you haven't set TESTS_ZEND_MAIL_SERVER_TESTDIR
- */
-define('TESTS_ZEND_MAIL_POP3_ENABLED', false);
-define('TESTS_ZEND_MAIL_POP3_HOST', 'localhost');
-define('TESTS_ZEND_MAIL_POP3_USER', 'test');
-define('TESTS_ZEND_MAIL_POP3_PASSWORD', '');
-// test SSL connections if enabled in your test server
-define('TESTS_ZEND_MAIL_POP3_SSL', true);
-define('TESTS_ZEND_MAIL_POP3_TLS', true);
-// WRONG_PORT should be an existing server port,
-// INVALID_PORT should be a non existing (each on defined host)
-define('TESTS_ZEND_MAIL_POP3_WRONG_PORT', 80);
-define('TESTS_ZEND_MAIL_POP3_INVALID_PORT', 3141);
-
-/**
- * Zend_Mail_Storage_Imap / Zend_Mail_Transport_Imap
- *
- * IMPORTANT: you need to copy tests/Zend/Mail/_files/test.mbox to your mail
- * if you haven't set TESTS_ZEND_MAIL_SERVER_TESTDIR
- */
-define('TESTS_ZEND_MAIL_IMAP_ENABLED', false);
-define('TESTS_ZEND_MAIL_IMAP_HOST', 'localhost');
-define('TESTS_ZEND_MAIL_IMAP_USER', 'test');
-define('TESTS_ZEND_MAIL_IMAP_PASSWORD', '');
-// test SSL connections if enabled in your test server
-define('TESTS_ZEND_MAIL_IMAP_SSL', true);
-define('TESTS_ZEND_MAIL_IMAP_TLS', true);
-// WRONG_PORT should be an existing server port,
-// INVALID_PORT should be a non-existing (each on defined host)
-define('TESTS_ZEND_MAIL_IMAP_WRONG_PORT', 80);
-define('TESTS_ZEND_MAIL_IMAP_INVALID_PORT', 3141);
-
-
-/**
- * Zend_Mail_Storage_Maildir test
- *
- * Before enabling this test you have to unpack messages.tar in
- * Zend/Mail/_files/test.maildir/cur/ and remove the tar for this test to work.
- * That's because the messages files have a colon in the filename and that's a
- * forbidden character on Windows.
- */
-define('TESTS_ZEND_MAIL_MAILDIR_ENABLED', false);
-
-/**
- * Zend_Mail_Transport_Smtp
- *
- * @todo TO be implemented
- */
-define('TESTS_ZEND_MAIL_SMTP_ENABLED', false);
-define('TESTS_ZEND_MAIL_SMTP_HOST', 'localhost');
-define('TESTS_ZEND_MAIL_SMTP_PORT', 25);
-define('TESTS_ZEND_MAIL_SMTP_USER', 'testuser');
-define('TESTS_ZEND_MAIL_SMTP_PASSWORD', 'testpassword');
-define('TESTS_ZEND_MAIL_SMTP_AUTH', false);
-// AUTH can be set to false or a string of AUTH method (e.g. LOGIN, PLAIN, CRAMMD5 or DIGESTMD5)
-
-/**
- * Zend_Queue Test Configuration constants
- *
- * The Zend_Queue_Adapter_Db constant should be a JSON-encoded string
- * representing a configuration object for Zend_Db::factory(). For example:
- * {
- *     type: "pdo_mysql",
- *     host: "127.0.0.1",
- *     port: 3306,
- *     username: "queue",
- *     password: "queue",
- *     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_ACTIVEMQ_SCHEME', false);
-define('TESTS_ZEND_QUEUE_ACTIVEMQ_HOST', false);
-define('TESTS_ZEND_QUEUE_ACTIVEMQ_PORT', false);
-define('TESTS_ZEND_QUEUE_DB', 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
- */
-define('TESTS_ZEND_SERVICE_AMAZON_ONLINE_ENABLED', false);
-define('TESTS_ZEND_SERVICE_AMAZON_ONLINE_ACCESSKEYID', 'Enter AWSAccessKeyId here');
-define('TESTS_ZEND_SERVICE_AMAZON_ONLINE_SECRETKEY', 'Enter AWSSecretKey here');
-define('TESTS_ZEND_SERVICE_AMAZON_S3_BUCKET', 'zftestamazons3bucket');
-
-/**
- * Zend_Service_Delicious tests
- */
-define('TESTS_ZEND_SERVICE_DELICIOUS_ENABLED', false);
-
-/**
- * Zend_Service_Flickr online tests
- */
-define('TESTS_ZEND_SERVICE_FLICKR_ONLINE_ENABLED', false);
-define('TESTS_ZEND_SERVICE_FLICKR_ONLINE_APIKEY', 'Enter API key here');
-
-/**
- * Zend_Service_LiveDocx configuration
- *
- * Define username and password in order to run unit tests for LiveDocX web 
- * services.
- *
- * phpunit/phpunit will typically work.
- */
-define('TESTS_ZEND_SERVICE_LIVEDOCX_USERNAME', false);
-define('TESTS_ZEND_SERVICE_LIVEDOCX_PASSWORD', false);
-
-/**
- * Zend_Service_ReCaptcha tests
- */
-define('TESTS_ZEND_SERVICE_RECAPTCHA_ENABLED', false);
-define('TESTS_ZEND_SERVICE_RECAPTCHA_ONLINE_ENABLED', false);
-define('TESTS_ZEND_SERVICE_RECAPTCHA_PUBLIC_KEY', 'public key');
-define('TESTS_ZEND_SERVICE_RECAPTCHA_PRIVATE_KEY', 'private key');
-define('TESTS_ZEND_SERVICE_RECAPTCHA_MAILHIDE_PUBLIC_KEY', 'public mailhide key');
-define('TESTS_ZEND_SERVICE_RECAPTCHA_MAILHIDE_PRIVATE_KEY', 'private mailhide key');
-
-/**
- * Zend_Service_Simpy tests
- */
-define('TESTS_ZEND_SERVICE_SIMPY_ENABLED', false);
-define('TESTS_ZEND_SERVICE_SIMPY_USERNAME', 'syapizend');
-define('TESTS_ZEND_SERVICE_SIMPY_PASSWORD', 'mgt37ge');
-
-/**
- * Zend_Service_SlideShare tests
- */
-define('TESTS_ZEND_SERVICE_SLIDESHARE_USERNAME', '');
-define('TESTS_ZEND_SERVICE_SLIDESHARE_PASSWORD', '');
-define('TESTS_ZEND_SERVICE_SLIDESHARE_SHAREDSECRET', '');
-define('TESTS_ZEND_SERVICE_SLIDESHARE_APIKEY', '');
-
-// The slide show ID to retrieve during tests
-define('TESTS_ZEND_SERVICE_SLIDESHARE_SLIDESHOWID', 0);
-
-// The tag to retrieve during tests
-define('TESTS_ZEND_SERVICE_SLIDESHARE_TAG', 'zend');
-
-// The group to retrieve during tests
-define('TESTS_ZEND_SERVICE_SLIDESHARE_GROUP', '');
-
-/**
- * Zend_Service_Twitter tests
- *
- * ONLINE_ENABLED indicates whether or not to run tests requiring a network
- * connection.
- *
- * TWITTER_USER and TWITTER_PASS are valid Twitter credentials you wish to use
- * when testing.
- */
-define('TESTS_ZEND_SERVICE_TWITTER_ONLINE_ENABLED', false);
-define('TESTS_ZEND_SERVICE_TWITTER_USER', 'zftestuser');
-define('TESTS_ZEND_SERVICE_TWITTER_PASS', 'zftestuser');
-
-/**
- * Zend_Service_WindowsAzure  tests
  */
 
 /**
@@ -681,45 +77,7 @@ define('TESTS_ZEND_SERVICE_WINDOWSAZURE_SESSIONHANDLER_RUNONPROD',        false)
 define('TESTS_ZEND_SERVICE_WINDOWSAZURE_SESSIONHANDLER_TABLENAME_PREFIX', 'phpazuretestsession');
 
 /**
- * Zend_Service_Yahoo online tests
- */
-define('TESTS_ZEND_SERVICE_YAHOO_ONLINE_ENABLED', false);
-define('TESTS_ZEND_SERVICE_YAHOO_ONLINE_APPID', 'Enter APPID here');
-
-/**
- * Zend_Soap_AutoDiscover scenario tests for complex objects and wsdl generation
- *
- * Copy all the files of zf/tests/Zend/Soap/_files/fulltests into a directory
- * that can be reached by webserver and enter the base uri to this directory
- * into the variable. The test "Zend_Soap_AutoDiscover_OnlineTest" makes use
- * of the servers and AutoDiscover feature.
- *
- * NOTE: Make sure the servers are using the correct Zend Framework copy,
- * when having more than one version installed and include paths are changing.
- */
-define('TESTS_ZEND_SOAP_AUTODISCOVER_ONLINE_SERVER_BASEURI', false);
-
-/**
- * Zend_Uri tests
- *
- * Setting CRASH_TEST_ENABLED to true will enable some tests that may
- * potentially crash PHP on some systems, due to very deep-nesting regular
- * expressions.
- * 
- * Only do this if you know what you are doing!
- */
-define('TESTS_ZEND_URI_CRASH_TEST_ENABLED', false);
-
-/**
- * Zend_Validate tests
- *
- * Set ONLINE_ENABLED if you wish to run validators that require network 
- * connectivity.
- */
-define('TESTS_ZEND_VALIDATE_ONLINE_ENABLED', false);
-
-/**
  * PHPUnit Code Coverage / Test Report
  */
-define('TESTS_GENERATE_REPORT', false);
-define('TESTS_GENERATE_REPORT_TARGET', '/path/to/target');
+define('TESTS_ZEND_SERVICE_WINDOWSAZURE_GENERATE_REPORT',                 true);
+define('TESTS_ZEND_SERVICE_WINDOWSAZURE_GENERATE_REPORT_TARGET',          '/path/to/target');

+ 25 - 32
tests/TestHelper.php

@@ -13,14 +13,18 @@
  * to license@zend.com so we can send you a copy immediately.
  *
  * @category   Zend
- * @package    Zend
- * @subpackage UnitTests
+ * @package    UnitTests
+ * @version    $Id$
  * @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$
  */
 
 /*
+ * Start output buffering
+ */
+ob_start();
+
+/*
  * Include PHPUnit dependencies
  */
 require_once 'PHPUnit/Framework.php';
@@ -32,7 +36,7 @@ require_once 'PHPUnit/TextUI/TestRunner.php';
 require_once 'PHPUnit/Util/Filter.php';
 
 /*
- * Set error reporting to the level to which Zend Framework code must comply.
+ * Set error reporting to the highest level.
  */
 error_reporting( E_ALL | E_STRICT );
 
@@ -40,13 +44,20 @@ error_reporting( E_ALL | E_STRICT );
  * Determine the root, library, and tests directories of the framework
  * distribution.
  */
-$zfRoot        = realpath(dirname(dirname(__FILE__)));
+$zfRoot        = dirname(__FILE__) . '/..';
 $zfCoreLibrary = "$zfRoot/library";
 $zfCoreTests   = "$zfRoot/tests";
 
 /*
- * Prepend the Zend Framework library/ and tests/ directories to the
- * include_path. This allows the tests to run out of the box and helps prevent
+ * Omit from code coverage reports the contents of the tests directory
+ */
+foreach (array('php', 'phtml', 'csv') as $suffix) {
+    PHPUnit_Util_Filter::addDirectoryToFilter($zfCoreTests, ".$suffix");
+}
+
+/*
+ * Prepend the library/ and tests/ directories to the include_path.
+ * This allows the tests to run out of the box and helps prevent
  * loading other copies of the framework code and tests that would supersede
  * this copy.
  */
@@ -67,33 +78,15 @@ if (is_readable($zfCoreTests . DIRECTORY_SEPARATOR . 'TestConfiguration.php')) {
     require_once $zfCoreTests . DIRECTORY_SEPARATOR . 'TestConfiguration.php.dist';
 }
 
-if (defined('TESTS_GENERATE_REPORT') && TESTS_GENERATE_REPORT === true &&
+/*
+ * Add library/ directory to the PHPUnit code coverage whitelist.
+ * This has the effect that only production code source files appear
+ * in the code coverage report and that all production code source files, even
+ * those that are not covered by a test yet, are processed.
+ */
+if (defined('TESTS_ZEND_SERVICE_WINDOWSAZURE_GENERATE_REPORT') && TESTS_ZEND_SERVICE_WINDOWSAZURE_GENERATE_REPORT === true &&
     version_compare(PHPUnit_Runner_Version::id(), '3.1.6', '>=')) {
-
-    /*
-     * Add Zend Framework library/ directory to the PHPUnit code coverage
-     * whitelist. This has the effect that only production code source files
-     * appear in the code coverage report and that all production code source
-     * files, even those that are not covered by a test yet, are processed.
-     */
     PHPUnit_Util_Filter::addDirectoryToWhitelist($zfCoreLibrary);
-
-    /*
-     * Omit from code coverage reports the contents of the tests directory
-     */
-    foreach (array('.php', '.phtml', '.csv', '.inc') as $suffix) {
-        PHPUnit_Util_Filter::addDirectoryToFilter($zfCoreTests, $suffix);
-    }
-    PHPUnit_Util_Filter::addDirectoryToFilter(PEAR_INSTALL_DIR);
-    PHPUnit_Util_Filter::addDirectoryToFilter(PHP_LIBDIR);
-}
-
-
-/**
- * Start output buffering, if enabled
- */
-if (defined('TESTS_ZEND_OB_ENABLED') && constant('TESTS_ZEND_OB_ENABLED')) {
-    ob_start();
 }
 
 /*

+ 8 - 7
tests/Zend/Service/WindowsAzure/AllTests.php

@@ -15,12 +15,15 @@
  * @category   Zend
  * @package    Zend_Service_WindowsAzure
  * @subpackage UnitTests
- * @version    $Id: AllTests.php 35709 2009-12-14 14:14:14Z unknown $
+ * @version    $Id: AllTests.php 35999 2009-12-21 07:56:42Z unknown $
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/TestHelper.php';
+/**
+ * Test helpers
+ */
+require_once dirname(__FILE__) . '/../../../TestHelper.php';
 
 if (!defined('PHPUnit_MAIN_METHOD')) {
     define('PHPUnit_MAIN_METHOD', 'Zend_Service_WindowsAzure_AllTests::main');
@@ -43,9 +46,7 @@ require_once 'Zend/Service/WindowsAzure/SessionHandlerTest.php';
  * @category   Zend
  * @package    Zend_Service_WindowsAzure
  * @subpackage UnitTests
- * @group      Zend_Service
- * @group      Zend_Service_WindowsAzure
- * @version    $Id: AllTests.php 35709 2009-12-14 14:14:14Z unknown $
+ * @version    $Id: AllTests.php 35999 2009-12-21 07:56:42Z unknown $
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
@@ -58,10 +59,10 @@ class Zend_Service_WindowsAzure_AllTests
 
     public static function suite()
     {
-        $suite = new PHPUnit_Framework_TestSuite('Zend Framework - Zend_Service_WindowsAzure');
-
+        $suite = new PHPUnit_Framework_TestSuite(__CLASS__);
 
         $suite->addTest(Zend_Service_WindowsAzure_Credentials_AllTests::suite());
+        
         $suite->addTestSuite('Zend_Service_WindowsAzure_RetryPolicyTest');
         $suite->addTestSuite('Zend_Service_WindowsAzure_StorageTest');
         if (TESTS_ZEND_SERVICE_WINDOWSAZURE_BLOB_RUNTESTS) {

+ 10 - 4
tests/Zend/Service/WindowsAzure/BlobStorageSharedAccessTest.php

@@ -20,21 +20,27 @@
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/TestHelper.php';
-
 if (!defined('PHPUnit_MAIN_METHOD')) {
     define('PHPUnit_MAIN_METHOD', 'Zend_Service_WindowsAzure_BlobStorageSharedAccessTest::main');
 }
 
+/**
+ * Test helpers
+ */
+require_once dirname(__FILE__) . '/../../../TestHelper.php';
+require_once dirname(__FILE__) . '/../../../TestConfiguration.php.dist';
+require_once 'PHPUnit/Framework/TestCase.php';
+
+/** Zend_Service_WindowsAzure_Storage_Blob */
 require_once 'Zend/Service/WindowsAzure/Storage/Blob.php';
+
+/** Zend_Service_WindowsAzure_Credentials_SharedAccessSignature */
 require_once 'Zend/Service/WindowsAzure/Credentials/SharedAccessSignature.php';
 
 /**
  * @category   Zend
  * @package    Zend_Service_WindowsAzure
  * @subpackage UnitTests
- * @group      Zend_Service
- * @group      Zend_Service_WindowsAzure
  * @version    $Id: BlobStorageSharedAccessTest.php 25258 2009-08-14 08:40:41Z unknown $
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License

+ 8 - 4
tests/Zend/Service/WindowsAzure/BlobStorageTest.php

@@ -20,20 +20,24 @@
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/TestHelper.php';
-
 if (!defined('PHPUnit_MAIN_METHOD')) {
     define('PHPUnit_MAIN_METHOD', 'Zend_Service_WindowsAzure_BlobStorageTest::main');
 }
 
+/**
+ * Test helpers
+ */
+require_once dirname(__FILE__) . '/../../../TestHelper.php';
+require_once dirname(__FILE__) . '/../../../TestConfiguration.php.dist';
+require_once 'PHPUnit/Framework/TestCase.php';
+
+/** Zend_Service_WindowsAzure_Storage_Blob */
 require_once 'Zend/Service/WindowsAzure/Storage/Blob.php';
 
 /**
  * @category   Zend
  * @package    Zend_Service_WindowsAzure
  * @subpackage UnitTests
- * @group      Zend_Service
- * @group      Zend_Service_WindowsAzure
  * @version    $Id: BlobStorageTest.php 35709 2009-12-14 14:14:14Z unknown $
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License

+ 8 - 4
tests/Zend/Service/WindowsAzure/BlobStreamTest.php

@@ -20,20 +20,24 @@
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/TestHelper.php';
-
 if (!defined('PHPUnit_MAIN_METHOD')) {
     define('PHPUnit_MAIN_METHOD', 'Zend_Service_WindowsAzure_BlobStreamTest::main');
 }
 
+/**
+ * Test helpers
+ */
+require_once dirname(__FILE__) . '/../../../TestHelper.php';
+require_once dirname(__FILE__) . '/../../../TestConfiguration.php.dist';
+require_once 'PHPUnit/Framework/TestCase.php';
+
+/** Zend_Service_WindowsAzure_Storage_Blob */
 require_once 'Zend/Service/WindowsAzure/Storage/Blob.php';
 
 /**
  * @category   Zend
  * @package    Zend_Service_WindowsAzure
  * @subpackage UnitTests
- * @group      Zend_Service
- * @group      Zend_Service_WindowsAzure
  * @version    $Id: BlobStreamTest.php 24354 2009-07-24 08:48:54Z unknown $
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License

+ 8 - 7
tests/Zend/Service/WindowsAzure/Credentials/AllTests.php

@@ -15,12 +15,15 @@
  * @category   Zend
  * @package    Zend_Service_WindowsAzure
  * @subpackage UnitTests
- * @version    $Id: $
+ * @version    $Id: AllTests.php 35709 2009-12-14 14:14:14Z unknown $
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 
-require_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/TestHelper.php';
+/**
+ * Test helpers
+ */
+require_once dirname(__FILE__) . '/../../../../TestHelper.php';
 
 if (!defined('PHPUnit_MAIN_METHOD')) {
     define('PHPUnit_MAIN_METHOD', 'Zend_Service_WindowsAzure_Credentials_AllTests::main');
@@ -29,14 +32,11 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
 require_once 'Zend/Service/WindowsAzure/Credentials/SharedKeyTest.php';
 require_once 'Zend/Service/WindowsAzure/Credentials/SharedKeyLiteTest.php';
 require_once 'Zend/Service/WindowsAzure/Credentials/SharedAccessSignatureTest.php';
-
 /**
  * @category   Zend
  * @package    Zend_Service_WindowsAzure
  * @subpackage UnitTests
- * @group      Zend_Service
- * @group      Zend_Service_WindowsAzure
- * @version    $Id: $
+ * @version    $Id: AllTests.php 35709 2009-12-14 14:14:14Z unknown $
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
@@ -49,11 +49,12 @@ class Zend_Service_WindowsAzure_Credentials_AllTests
 
     public static function suite()
     {
-        $suite = new PHPUnit_Framework_TestSuite('Zend Framework - Zend_Service_WindowsAzure');
+        $suite = new PHPUnit_Framework_TestSuite(__CLASS__);
 
         $suite->addTestSuite('Zend_Service_WindowsAzure_Credentials_SharedKeyTest');
         $suite->addTestSuite('Zend_Service_WindowsAzure_Credentials_SharedKeyLiteTest');
         $suite->addTestSuite('Zend_Service_WindowsAzure_Credentials_SharedAccessSignatureTest');
+        
         return $suite;
     }
 }

+ 12 - 8
tests/Zend/Service/WindowsAzure/Credentials/SharedAccessSignatureTest.php

@@ -15,26 +15,30 @@
  * @category   Zend
  * @package    Zend_Service_WindowsAzure
  * @subpackage UnitTests
- * @version    $Id: $
+ * @version    $Id: SharedKeyCredentialsTest.php 22847 2009-06-24 06:51:14Z unknown $
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 
-require_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/TestHelper.php';
-
 if (!defined('PHPUnit_MAIN_METHOD')) {
-    define('PHPUnit_MAIN_METHOD', 'Zend_Service_WindowsAzure_Credentials_SharedAccessSignatureTest::main');
+    define('PHPUnit_MAIN_METHOD', 'Zend_Service_WindowsAzure_SharedAccessSignatureCredentialsTest::main');
 }
 
+/**
+ * Test helpers
+ */
+require_once dirname(__FILE__) . '/../../../../TestHelper.php';
+require_once dirname(__FILE__) . '/../../../../TestConfiguration.php.dist';
+require_once 'PHPUnit/Framework/TestCase.php';
+
+/** Zend_Service_WindowsAzure_Credentials_SharedAccessSignature */
 require_once 'Zend/Service/WindowsAzure/Credentials/SharedAccessSignature.php';
 
 /**
  * @category   Zend
  * @package    Zend_Service_WindowsAzure
  * @subpackage UnitTests
- * @group      Zend_Service
- * @group      Zend_Service_WindowsAzure
- * @version    $Id: $
+ * @version    $Id: SharedKeyCredentialsTest.php 22847 2009-06-24 06:51:14Z unknown $
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
@@ -42,7 +46,7 @@ class Zend_Service_WindowsAzure_Credentials_SharedAccessSignatureTest extends PH
 {
     public static function main()
     {
-        $suite  = new PHPUnit_Framework_TestSuite(__CLASS__);
+        $suite  = new PHPUnit_Framework_TestSuite("Zend_Service_WindowsAzure_Credentials_SharedAccessSignatureTest");
         $result = PHPUnit_TextUI_TestRunner::run($suite);
     }
     

+ 15 - 12
tests/Zend/Service/WindowsAzure/Credentials/SharedKeyLiteTest.php

@@ -15,27 +15,30 @@
  * @category   Zend
  * @package    Zend_Service_WindowsAzure
  * @subpackage UnitTests
- * @version    $Id: Credentials_SharedKeyTest.php 14561 2009-05-07 08:05:12Z unknown $
+ * @version    $Id: SharedKeyCredentialsTest.php 14561 2009-05-07 08:05:12Z unknown $
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 
-require_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/TestHelper.php';
-
 if (!defined('PHPUnit_MAIN_METHOD')) {
-    define('PHPUnit_MAIN_METHOD', 'Zend_Service_WindowsAzure_Credentials_SharedKeyLiteTest::main');
+    define('PHPUnit_MAIN_METHOD', 'Zend_Service_WindowsAzure_SharedKeyLiteCredentialsTest::main');
 }
 
+/**
+ * Test helpers
+ */
+require_once dirname(__FILE__) . '/../../../../TestHelper.php';
+require_once dirname(__FILE__) . '/../../../../TestConfiguration.php.dist';
+require_once 'PHPUnit/Framework/TestCase.php';
+
+/** Zend_Service_WindowsAzure_Credentials_SharedKeyLite */
 require_once 'Zend/Service/WindowsAzure/Credentials/SharedKeyLite.php';
-require_once 'Zend/Service/WindowsAzure/Credentials/SharedKey.php';
 
 /**
  * @category   Zend
  * @package    Zend_Service_WindowsAzure
  * @subpackage UnitTests
- * @group      Zend_Service
- * @group      Zend_Service_WindowsAzure
- * @version    $Id: Credentials_SharedKeyTest.php 14561 2009-05-07 08:05:12Z unknown $
+ * @version    $Id: SharedKeyCredentialsTest.php 14561 2009-05-07 08:05:12Z unknown $
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
@@ -43,7 +46,7 @@ class Zend_Service_WindowsAzure_Credentials_SharedKeyLiteTest extends PHPUnit_Fr
 {
     public static function main()
     {
-        $suite  = new PHPUnit_Framework_TestSuite(__CLASS__);
+        $suite  = new PHPUnit_Framework_TestSuite("Zend_Service_WindowsAzure_Credentials_SharedKeyLiteTest");
         $result = PHPUnit_TextUI_TestRunner::run($suite);
     }
 
@@ -52,7 +55,7 @@ class Zend_Service_WindowsAzure_Credentials_SharedKeyLiteTest extends PHPUnit_Fr
      */
     public function testSignForDevstoreWithRootPath()
     {
-        $credentials = new Zend_Service_WindowsAzure_Credentials_SharedKeyLite(Zend_Service_WindowsAzure_Credentials_SharedKey::DEVSTORE_ACCOUNT, Zend_Service_WindowsAzure_Credentials_SharedKey::DEVSTORE_KEY, true);
+        $credentials = new Zend_Service_WindowsAzure_Credentials_SharedKeyLite(Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_ACCOUNT, Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_KEY, true);
         $signedHeaders = $credentials->signRequestHeaders(
                               'GET',
                               '/',
@@ -71,7 +74,7 @@ class Zend_Service_WindowsAzure_Credentials_SharedKeyLiteTest extends PHPUnit_Fr
      */
     public function testSignForDevstoreWithOtherPath()
     {
-        $credentials = new Zend_Service_WindowsAzure_Credentials_SharedKeyLite(Zend_Service_WindowsAzure_Credentials_SharedKey::DEVSTORE_ACCOUNT, Zend_Service_WindowsAzure_Credentials_SharedKey::DEVSTORE_KEY, true);
+        $credentials = new Zend_Service_WindowsAzure_Credentials_SharedKeyLite(Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_ACCOUNT, Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_KEY, true);
         $signedHeaders = $credentials->signRequestHeaders(
                               'GET',
                               '/test',
@@ -90,7 +93,7 @@ class Zend_Service_WindowsAzure_Credentials_SharedKeyLiteTest extends PHPUnit_Fr
      */
     public function testSignForDevstoreWithQueryString()
     {
-        $credentials = new Zend_Service_WindowsAzure_Credentials_SharedKeyLite(Zend_Service_WindowsAzure_Credentials_SharedKey::DEVSTORE_ACCOUNT, Zend_Service_WindowsAzure_Credentials_SharedKey::DEVSTORE_KEY, true);
+        $credentials = new Zend_Service_WindowsAzure_Credentials_SharedKeyLite(Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_ACCOUNT, Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_KEY, true);
         $signedHeaders = $credentials->signRequestHeaders(
                               'GET',
                               '/',

+ 12 - 8
tests/Zend/Service/WindowsAzure/Credentials/SharedKeyTest.php

@@ -15,26 +15,30 @@
  * @category   Zend
  * @package    Zend_Service_WindowsAzure
  * @subpackage UnitTests
- * @version    $Id: $
+ * @version    $Id: SharedKeyTest.php 35999 2009-12-21 07:56:42Z unknown $
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 
-require_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/TestHelper.php';
-
 if (!defined('PHPUnit_MAIN_METHOD')) {
-    define('PHPUnit_MAIN_METHOD', 'Zend_Service_WindowsAzure_Credentials_SharedKeyTest::main');
+    define('PHPUnit_MAIN_METHOD', 'Zend_Service_WindowsAzure_SharedKeyCredentialsTest::main');
 }
 
+/**
+ * Test helpers
+ */
+require_once dirname(__FILE__) . '/../../../../TestHelper.php';
+require_once dirname(__FILE__) . '/../../../../TestConfiguration.php.dist';
+require_once 'PHPUnit/Framework/TestCase.php';
+
+/** Zend_Service_WindowsAzure_Credentials_SharedKey */
 require_once 'Zend/Service/WindowsAzure/Credentials/SharedKey.php';
 
 /**
  * @category   Zend
  * @package    Zend_Service_WindowsAzure
  * @subpackage UnitTests
- * @group      Zend_Service
- * @group      Zend_Service_WindowsAzure
- * @version    $Id: $
+ * @version    $Id: SharedKeyTest.php 35999 2009-12-21 07:56:42Z unknown $
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
@@ -42,7 +46,7 @@ class Zend_Service_WindowsAzure_Credentials_SharedKeyTest extends PHPUnit_Framew
 {
     public static function main()
     {
-        $suite  = new PHPUnit_Framework_TestSuite(__CLASS__);
+        $suite  = new PHPUnit_Framework_TestSuite("Zend_Service_WindowsAzure_Credentials_SharedKeyTest");
         $result = PHPUnit_TextUI_TestRunner::run($suite);
     }
 

+ 7 - 4
tests/Zend/Service/WindowsAzure/DynamicTableEntityTest.php

@@ -20,12 +20,17 @@
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/TestHelper.php';
-
 if (!defined('PHPUnit_MAIN_METHOD')) {
     define('PHPUnit_MAIN_METHOD', 'Zend_Service_WindowsAzure_DynamicTableEntityTest::main');
 }
 
+/**
+ * Test helpers
+ */
+require_once dirname(__FILE__) . '/../../../TestHelper.php';
+require_once dirname(__FILE__) . '/../../../TestConfiguration.php.dist';
+require_once 'PHPUnit/Framework/TestCase.php';
+
 /** Zend_Service_WindowsAzure_Storage_DynamicTableEntity */
 require_once 'Zend/Service/WindowsAzure/Storage/DynamicTableEntity.php';
 
@@ -33,8 +38,6 @@ require_once 'Zend/Service/WindowsAzure/Storage/DynamicTableEntity.php';
  * @category   Zend
  * @package    Zend_Service_WindowsAzure
  * @subpackage UnitTests
- * @group      Zend_Service
- * @group      Zend_Service_WindowsAzure
  * @version    $Id: BlobStorageTest.php 14561 2009-05-07 08:05:12Z unknown $
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License

+ 8 - 4
tests/Zend/Service/WindowsAzure/QueueStorageTest.php

@@ -20,20 +20,24 @@
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/TestHelper.php';
-
 if (!defined('PHPUnit_MAIN_METHOD')) {
     define('PHPUnit_MAIN_METHOD', 'Zend_Service_WindowsAzure_QueueStorageTest::main');
 }
 
+/**
+ * Test helpers
+ */
+require_once dirname(__FILE__) . '/../../../TestHelper.php';
+require_once dirname(__FILE__) . '/../../../TestConfiguration.php.dist';
+require_once 'PHPUnit/Framework/TestCase.php';
+
+/** Zend_Service_WindowsAzure_Storage_Queue */
 require_once 'Zend/Service/WindowsAzure/Storage/Queue.php';
 
 /**
  * @category   Zend
  * @package    Zend_Service_WindowsAzure
  * @subpackage UnitTests
- * @group      Zend_Service
- * @group      Zend_Service_WindowsAzure
  * @version    $Id: QueueStorageTest.php 24241 2009-07-22 09:43:13Z unknown $
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License

+ 8 - 4
tests/Zend/Service/WindowsAzure/RetryPolicyTest.php

@@ -20,20 +20,24 @@
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/TestHelper.php';
-
 if (!defined('PHPUnit_MAIN_METHOD')) {
     define('PHPUnit_MAIN_METHOD', 'Zend_Service_WindowsAzure_RetryPolicyTest::main');
 }
 
+/**
+ * Test helpers
+ */
+require_once dirname(__FILE__) . '/../../../TestHelper.php';
+require_once dirname(__FILE__) . '/../../../TestConfiguration.php.dist';
+require_once 'PHPUnit/Framework/TestCase.php';
+
+/** Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract */
 require_once 'Zend/Service/WindowsAzure/RetryPolicy/RetryPolicyAbstract.php';
 
 /**
  * @category   Zend
  * @package    Zend_Service_WindowsAzure
  * @subpackage UnitTests
- * @group      Zend_Service
- * @group      Zend_Service_WindowsAzure
  * @version    $Id: RetryPolicyTest.php 35709 2009-12-14 14:14:14Z unknown $
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License

+ 10 - 4
tests/Zend/Service/WindowsAzure/SessionHandlerTest.php

@@ -20,21 +20,27 @@
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/TestHelper.php';
-
 if (!defined('PHPUnit_MAIN_METHOD')) {
     define('PHPUnit_MAIN_METHOD', 'Zend_Service_WindowsAzure_SessionHandlerTest::main');
 }
 
+/**
+ * Test helpers
+ */
+require_once dirname(__FILE__) . '/../../../TestHelper.php';
+require_once dirname(__FILE__) . '/../../../TestConfiguration.php.dist';
+require_once 'PHPUnit/Framework/TestCase.php';
+
+/** Zend_Service_WindowsAzure_SessionHandler */
 require_once 'Zend/Service/WindowsAzure/SessionHandler.php';
+
+/** Zend_Service_WindowsAzure_Storage_Table */
 require_once 'Zend/Service/WindowsAzure/Storage/Table.php';
 
 /**
  * @category   Zend
  * @package    Zend_Service_WindowsAzure
  * @subpackage UnitTests
- * @group      Zend_Service
- * @group      Zend_Service_WindowsAzure
  * @version    $Id: BlobStorageTest.php 14561 2009-05-07 08:05:12Z unknown $
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License

+ 8 - 4
tests/Zend/Service/WindowsAzure/StorageTest.php

@@ -20,20 +20,24 @@
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'TestHelper.php';
-
 if (!defined('PHPUnit_MAIN_METHOD')) {
     define('PHPUnit_MAIN_METHOD', 'Zend_Service_WindowsAzure_StorageTest::main');
 }
 
+/**
+ * Test helpers
+ */
+require_once dirname(__FILE__) . '/../../../TestHelper.php';
+require_once dirname(__FILE__) . '/../../../TestConfiguration.php.dist';
+require_once 'PHPUnit/Framework/TestCase.php';
+
+/** Zend_Service_WindowsAzure_Storage */
 require_once 'Zend/Service/WindowsAzure/Storage.php';
 
 /**
  * @category   Zend
  * @package    Zend_Service_WindowsAzure
  * @subpackage UnitTests
- * @group      Zend_Service
- * @group      Zend_Service_WindowsAzure
  * @version    $Id: StorageTest.php 28585 2009-09-07 12:12:56Z unknown $
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License

+ 8 - 4
tests/Zend/Service/WindowsAzure/TableEntityQueryTest.php

@@ -20,20 +20,24 @@
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'TestHelper.php';
-
 if (!defined('PHPUnit_MAIN_METHOD')) {
     define('PHPUnit_MAIN_METHOD', 'Zend_Service_WindowsAzure_TableEntityQueryTest::main');
 }
 
+/**
+ * Test helpers
+ */
+require_once dirname(__FILE__) . '/../../../TestHelper.php';
+require_once dirname(__FILE__) . '/../../../TestConfiguration.php.dist';
+require_once 'PHPUnit/Framework/TestCase.php';
+
+/** Zend_Service_WindowsAzure_Storage_TableEntityQuery */
 require_once 'Zend/Service/WindowsAzure/Storage/TableEntityQuery.php';
 
 /**
  * @category   Zend
  * @package    Zend_Service_WindowsAzure
  * @subpackage UnitTests
- * @group      Zend_Service
- * @group      Zend_Service_WindowsAzure
  * @version    $Id: BlobStorageTest.php 14561 2009-05-07 08:05:12Z unknown $
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License

+ 8 - 4
tests/Zend/Service/WindowsAzure/TableEntityTest.php

@@ -20,20 +20,24 @@
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/TestHelper.php';
-
 if (!defined('PHPUnit_MAIN_METHOD')) {
     define('PHPUnit_MAIN_METHOD', 'Zend_Service_WindowsAzure_TableEntityTest::main');
 }
 
+/**
+ * Test helpers
+ */
+require_once dirname(__FILE__) . '/../../../TestHelper.php';
+require_once dirname(__FILE__) . '/../../../TestConfiguration.php.dist';
+require_once 'PHPUnit/Framework/TestCase.php';
+
+/** Zend_Service_WindowsAzure_Storage_TableEntity */
 require_once 'Zend/Service/WindowsAzure/Storage/TableEntity.php';
 
 /**
  * @category   Zend
  * @package    Zend_Service_WindowsAzure
  * @subpackage UnitTests
- * @group      Zend_Service
- * @group      Zend_Service_WindowsAzure
  * @version    $Id: BlobStorageTest.php 14561 2009-05-07 08:05:12Z unknown $
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License

+ 8 - 4
tests/Zend/Service/WindowsAzure/TableStorageTest.php

@@ -20,20 +20,24 @@
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/TestHelper.php';
-
 if (!defined('PHPUnit_MAIN_METHOD')) {
     define('PHPUnit_MAIN_METHOD', 'Zend_Service_WindowsAzure_TableStorageTest::main');
 }
 
+/**
+ * Test helpers
+ */
+require_once dirname(__FILE__) . '/../../../TestHelper.php';
+require_once dirname(__FILE__) . '/../../../TestConfiguration.php.dist';
+require_once 'PHPUnit/Framework/TestCase.php';
+
+/** Zend_Service_WindowsAzure_Storage_Table */
 require_once 'Zend/Service/WindowsAzure/Storage/Table.php';
 
 /**
  * @category   Zend
  * @package    Zend_Service_WindowsAzure
  * @subpackage UnitTests
- * @group      Zend_Service
- * @group      Zend_Service_WindowsAzure
  * @version    $Id: BlobStorageTest.php 14561 2009-05-07 08:05:12Z unknown $
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License