Bläddra i källkod

ZF-7335: TEST - add missing tag $Id$

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@17668 44c647ce-9c0f-0410-b52a-842ac1e357ba
mikaelkael 16 år sedan
förälder
incheckning
d55b58f347

+ 21 - 0
tests/Zend/Amf/AllTests.php

@@ -1,5 +1,26 @@
 <?php
 /**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Amf
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/**
  * Test helper
  */
 require_once dirname(__FILE__) . '/../../TestHelper.php';

+ 21 - 0
tests/Zend/Amf/AuthTest.php

@@ -1,4 +1,25 @@
 <?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Amf
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
 // Call Zend_Amf_AuthTest::main() if this source file is executed directly.
 if (!defined("PHPUnit_MAIN_METHOD")) {
     define("PHPUnit_MAIN_METHOD", "Zend_Amf_AuthTest::main");

+ 21 - 1
tests/Zend/Amf/Contact.php

@@ -1,7 +1,27 @@
 <?php
 /**
- * Test Class for class mapping tests.
+ * Zend Framework
+ *
+ * LICENSE
  *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Amf
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/**
+ * Test Class for class mapping tests.
  */
 class Contact
 {

+ 22 - 2
tests/Zend/Amf/ContactVO.php

@@ -1,5 +1,26 @@
 <?php
 /**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Amf
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/**
  * Test Class for returning the name of the php class to flex.
  *
  * @group ZF-6130
@@ -12,5 +33,4 @@ class ContactVO
   public $email = "";
   public $mobile = "";
 
-}
-?>
+}

+ 21 - 1
tests/Zend/Amf/RequestTest.php

@@ -1,4 +1,25 @@
 <?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Amf
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
 if (!defined('PHPUnit_MAIN_METHOD')) {
     define('PHPUnit_MAIN_METHOD', 'Zend_Amf_RequestTest::main');
 }
@@ -15,7 +36,6 @@ require_once 'Contact.php';
  *
  * @package Zend_Amf
  * @subpackage UnitTests
- * @version $Id$
  */
 class Zend_Amf_RequestTest extends PHPUnit_Framework_TestCase
 {

+ 21 - 0
tests/Zend/Amf/ResourceTest.php

@@ -1,4 +1,25 @@
 <?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Amf
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
 // Call Zend_Amf_AuthTest::main() if this source file is executed directly.
 if (!defined("PHPUnit_MAIN_METHOD")) {
     define("PHPUnit_MAIN_METHOD", "Zend_Amf_ResourceTest::main");

+ 21 - 0
tests/Zend/Amf/Resources/StreamContext.php

@@ -1,4 +1,25 @@
 <?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Amf
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
 class Zend_Amf_Parse_Resource_StreamContext
 {
     public function parse($resource)

+ 21 - 1
tests/Zend/Amf/ResponseTest.php

@@ -1,4 +1,25 @@
 <?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Amf
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
 if (!defined('PHPUnit_MAIN_METHOD')) {
     define('PHPUnit_MAIN_METHOD', 'Zend_Amf_ResponseTest::main');
 }
@@ -19,7 +40,6 @@ require_once 'Zend/Date.php';
  *
  * @package Zend_Amf
  * @subpackage UnitTests
- * @version $Id$
  */
 class Zend_Amf_ResponseTest extends PHPUnit_Framework_TestCase
 {

+ 21 - 0
tests/Zend/Amf/TypeLoaderTest.php

@@ -1,4 +1,25 @@
 <?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Amf
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
 if (!defined('PHPUnit_MAIN_METHOD')) {
     define('PHPUnit_MAIN_METHOD', 'Zend_Amf_TypeloaderTest::main');
 }

+ 16 - 0
tests/Zend/Cache/ZendServerDiskTest.php

@@ -1,7 +1,23 @@
 <?php
 /**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
  * @package    Zend_Cache
  * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
  */
 
 /**

+ 16 - 0
tests/Zend/Cache/ZendServerShMemTest.php

@@ -1,7 +1,23 @@
 <?php
 /**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
  * @package    Zend_Cache
  * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
  */
 
 /**

+ 136 - 135
tests/Zend/Gdata/Health/ProfileEntryTest.php

@@ -1,135 +1,136 @@
-<?php
-/**
- * Zend Framework
- *
- * LICENSE
- *
- * This source file is subject to the new BSD license that is bundled
- * with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://framework.zend.com/license/new-bsd
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@zend.com so we can send you a copy immediately.
- *
- * @category   Zend
- * @package    Zend_Gdata
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- */
-
-require_once 'Zend/Gdata/Health.php';
-require_once 'Zend/Gdata/Health/ProfileEntry.php';
-
-/**
- * @package Zend_Gdata
- * @subpackage UnitTests
- */
-class Zend_Gdata_Health_ProfileEntryTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp()
-    {
-        $this->entry = new Zend_Gdata_Health_ProfileEntry();
-        $this->entryText = file_get_contents(
-            'Zend/Gdata/Health/_files/TestDataHealthProfileEntrySample.xml', 
-            true);
-    }
-    
-    public function testEmptyProfileEntry()
-    { 
-        $this->assertTrue(is_array($this->entry->extensionElements));
-        $this->assertTrue(count($this->entry->extensionElements) == 0);
-        $this->assertTrue($this->entry->getCcr() === null);
-    }
-    
-    public function testEmptyProfileEntryToAndFromStringShouldMatch() {
-        $this->entry->transferFromXML($this->entryText);
-        $entryXml = $this->entry->saveXML();
-        $newProfileEntry = new Zend_Gdata_Health_ProfileEntry();
-        $newProfileEntry->transferFromXML($entryXml);
-        $newProfileEntryXML = $newProfileEntry->saveXML();
-        $this->assertTrue($entryXml == $newProfileEntryXML);
-    }
-        
-    public function testGetAllCcrFromProfileEntry()
-    {
-        $this->entry->transferFromXML($this->entryText);
-        $ccr = $this->entry->getCcr();
-        $this->assertTrue($ccr instanceof Zend_Gdata_Health_Extension_Ccr);
-        $this->assertXmlStringEqualsXmlString(file_get_contents(
-            'Zend/Gdata/Health/_files/TestDataHealthProfileEntrySample_just_ccr.xml', true), $ccr->getXML());
-    }
-    
-    public function testSetCcrInProfileEntry()
-    {
-        $this->entry->transferFromXML($this->entryText);
-        $ccrXML = file_get_contents(
-            'Zend/Gdata/Health/_files/TestDataHealthProfileEntrySample_just_ccr.xml', true);
-        $ccrElement = $this->entry->setCcr($ccrXML);
-        $this->assertTrue($ccrElement instanceof Zend_Gdata_Health_Extension_Ccr);
-        $this->assertXmlStringEqualsXmlString(file_get_contents(
-            'Zend/Gdata/Health/_files/TestDataHealthProfileEntrySample_just_ccr.xml', true), $this->entry->getCcr()->getXML());
-    }
-    
-    /*  
-     *  These functions test the magic _call method within Zend_Gdata_Health_Extension_Ccr
-     */    
-    public function testGetCcrMedicationsFromProfileEntry()
-    {
-        $this->entry->transferFromXML($this->entryText);
-        $medications = $this->entry->getCcr()->getMedications();
-        $this->assertEquals(1, count($medications));
-        foreach ($medications as $med) {
-          $this->assertXmlStringEqualsXmlString(file_get_contents(
-              "Zend/Gdata/Health/_files/TestDataHealthProfileEntrySample_medications_all.xml", true),
-              $med->ownerDocument->saveXML($med));
-        }
-    }
-    
-    public function testGetCcrConditionsFromProfileEntry()
-    {
-        $this->entry->transferFromXML($this->entryText);
-        $problems = $this->entry->getCcr()->getProblems();
-        $conditions = $this->entry->getCcr()->getConditions();
-        $this->assertEquals($problems, $conditions);
-        
-        $this->assertEquals(1, count($conditions));
-        foreach ($conditions as $index => $condition) {
-            $this->assertXmlStringEqualsXmlString(file_get_contents(
-                "Zend/Gdata/Health/_files/TestDataHealthProfileEntrySample_condition_all.xml", true),
-                $condition->ownerDocument->saveXML($condition));
-        }
-    }
-
-    public function testGetCcrAllerigiesFromProfileEntry()
-    {
-        $this->entry->transferFromXML($this->entryText);
-        $allergies = $this->entry->getCcr()->getAllergies();
-        $alerts = $this->entry->getCcr()->getAlerts();
-        $this->assertEquals($allergies, $alerts);
-        
-        $this->assertEquals(1, count($alerts));
-        foreach ($alerts as $index => $alert) {
-            $this->assertXmlStringEqualsXmlString(file_get_contents(
-                "Zend/Gdata/Health/_files/TestDataHealthProfileEntrySample_allergy_all.xml", true),
-                $alert->ownerDocument->saveXML($alert));
-        }
-    }
-    
-    public function testGetCcrLabResultsFromProfileEntry()
-    {
-        $this->entry->transferFromXML($this->entryText);
-        $labresults = $this->entry->getCcr()->getLabResults();
-        $results = $this->entry->getCcr()->getResults();
-        $this->assertEquals($labresults, $results);
-        
-        $this->assertEquals(1, count($results));
-        foreach ($results as $index => $result) {
-            $this->assertXmlStringEqualsXmlString(file_get_contents(
-                "Zend/Gdata/Health/_files/TestDataHealthProfileEntrySample_results0.xml", true),
-                $result->ownerDocument->saveXML($result));
-        }
-    }
-}
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Gdata
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+require_once 'Zend/Gdata/Health.php';
+require_once 'Zend/Gdata/Health/ProfileEntry.php';
+
+/**
+ * @package Zend_Gdata
+ * @subpackage UnitTests
+ */
+class Zend_Gdata_Health_ProfileEntryTest extends PHPUnit_Framework_TestCase
+{
+
+    public function setUp()
+    {
+        $this->entry = new Zend_Gdata_Health_ProfileEntry();
+        $this->entryText = file_get_contents(
+            'Zend/Gdata/Health/_files/TestDataHealthProfileEntrySample.xml', 
+            true);
+    }
+    
+    public function testEmptyProfileEntry()
+    { 
+        $this->assertTrue(is_array($this->entry->extensionElements));
+        $this->assertTrue(count($this->entry->extensionElements) == 0);
+        $this->assertTrue($this->entry->getCcr() === null);
+    }
+    
+    public function testEmptyProfileEntryToAndFromStringShouldMatch() {
+        $this->entry->transferFromXML($this->entryText);
+        $entryXml = $this->entry->saveXML();
+        $newProfileEntry = new Zend_Gdata_Health_ProfileEntry();
+        $newProfileEntry->transferFromXML($entryXml);
+        $newProfileEntryXML = $newProfileEntry->saveXML();
+        $this->assertTrue($entryXml == $newProfileEntryXML);
+    }
+        
+    public function testGetAllCcrFromProfileEntry()
+    {
+        $this->entry->transferFromXML($this->entryText);
+        $ccr = $this->entry->getCcr();
+        $this->assertTrue($ccr instanceof Zend_Gdata_Health_Extension_Ccr);
+        $this->assertXmlStringEqualsXmlString(file_get_contents(
+            'Zend/Gdata/Health/_files/TestDataHealthProfileEntrySample_just_ccr.xml', true), $ccr->getXML());
+    }
+    
+    public function testSetCcrInProfileEntry()
+    {
+        $this->entry->transferFromXML($this->entryText);
+        $ccrXML = file_get_contents(
+            'Zend/Gdata/Health/_files/TestDataHealthProfileEntrySample_just_ccr.xml', true);
+        $ccrElement = $this->entry->setCcr($ccrXML);
+        $this->assertTrue($ccrElement instanceof Zend_Gdata_Health_Extension_Ccr);
+        $this->assertXmlStringEqualsXmlString(file_get_contents(
+            'Zend/Gdata/Health/_files/TestDataHealthProfileEntrySample_just_ccr.xml', true), $this->entry->getCcr()->getXML());
+    }
+    
+    /*  
+     *  These functions test the magic _call method within Zend_Gdata_Health_Extension_Ccr
+     */    
+    public function testGetCcrMedicationsFromProfileEntry()
+    {
+        $this->entry->transferFromXML($this->entryText);
+        $medications = $this->entry->getCcr()->getMedications();
+        $this->assertEquals(1, count($medications));
+        foreach ($medications as $med) {
+          $this->assertXmlStringEqualsXmlString(file_get_contents(
+              "Zend/Gdata/Health/_files/TestDataHealthProfileEntrySample_medications_all.xml", true),
+              $med->ownerDocument->saveXML($med));
+        }
+    }
+    
+    public function testGetCcrConditionsFromProfileEntry()
+    {
+        $this->entry->transferFromXML($this->entryText);
+        $problems = $this->entry->getCcr()->getProblems();
+        $conditions = $this->entry->getCcr()->getConditions();
+        $this->assertEquals($problems, $conditions);
+        
+        $this->assertEquals(1, count($conditions));
+        foreach ($conditions as $index => $condition) {
+            $this->assertXmlStringEqualsXmlString(file_get_contents(
+                "Zend/Gdata/Health/_files/TestDataHealthProfileEntrySample_condition_all.xml", true),
+                $condition->ownerDocument->saveXML($condition));
+        }
+    }
+
+    public function testGetCcrAllerigiesFromProfileEntry()
+    {
+        $this->entry->transferFromXML($this->entryText);
+        $allergies = $this->entry->getCcr()->getAllergies();
+        $alerts = $this->entry->getCcr()->getAlerts();
+        $this->assertEquals($allergies, $alerts);
+        
+        $this->assertEquals(1, count($alerts));
+        foreach ($alerts as $index => $alert) {
+            $this->assertXmlStringEqualsXmlString(file_get_contents(
+                "Zend/Gdata/Health/_files/TestDataHealthProfileEntrySample_allergy_all.xml", true),
+                $alert->ownerDocument->saveXML($alert));
+        }
+    }
+    
+    public function testGetCcrLabResultsFromProfileEntry()
+    {
+        $this->entry->transferFromXML($this->entryText);
+        $labresults = $this->entry->getCcr()->getLabResults();
+        $results = $this->entry->getCcr()->getResults();
+        $this->assertEquals($labresults, $results);
+        
+        $this->assertEquals(1, count($results));
+        foreach ($results as $index => $result) {
+            $this->assertXmlStringEqualsXmlString(file_get_contents(
+                "Zend/Gdata/Health/_files/TestDataHealthProfileEntrySample_results0.xml", true),
+                $result->ownerDocument->saveXML($result));
+        }
+    }
+}

+ 118 - 117
tests/Zend/Gdata/Health/ProfileFeedTest.php

@@ -1,117 +1,118 @@
-<?php
-/**
- * Zend Framework
- *
- * LICENSE
- *
- * This source file is subject to the new BSD license that is bundled
- * with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://framework.zend.com/license/new-bsd
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@zend.com so we can send you a copy immediately.
- *
- * @category   Zend
- * @package    Zend_Gdata
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- */
-
-require_once 'Zend/Gdata/Health.php';
-require_once 'Zend/Gdata/Health/ProfileFeed.php';
-require_once 'Zend/Gdata/Health/ProfileEntry.php';
-
-/**
- * @package Zend_Gdata
- * @subpackage UnitTests
- */
-class Zend_Gdata_Health_ProfileFeedTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp()
-    {
-        $this->profileFeed = new Zend_Gdata_Health_ProfileFeed();
-        $this->feedText = file_get_contents(
-            'Zend/Gdata/Health/_files/TestDataHealthProfileFeedSample.xml', true);
-    }
-    
-    private function verifyAllSamplePropertiesAreCorrect($profileFeed) {
-        $this->assertEquals('https://www.google.com/health/feeds/profile/default', $profileFeed->id->text);
-        $this->assertEquals('2008-09-30T01:07:17.888Z', $profileFeed->updated->text);
-        $this->assertEquals('http://schemas.google.com/g/2005#kind', $profileFeed->category[0]->scheme);
-        $this->assertEquals('http://schemas.google.com/health/kinds#profile', $profileFeed->category[0]->term);
-        $this->assertEquals('text', $profileFeed->title->type);
-        $this->assertEquals('Profile Feed', $profileFeed->title->text);
-        $this->assertEquals('self', $profileFeed->getLink('self')->rel);
-        $this->assertEquals('application/atom+xml', $profileFeed->getLink('self')->type);
-        $this->assertEquals('https://www.google.com/health/feeds/profile/default?digest=false', 
-            $profileFeed->getLink('self')->href);
-        $this->assertEquals(1, $profileFeed->startIndex->text);
-    }
-    
-    public function testAllSamplePropertiesAreCorrect() {
-        $this->profileFeed->transferFromXML($this->feedText);
-        $this->verifyAllSamplePropertiesAreCorrect($this->profileFeed);
-    }
-    
-    public function testToAndFromXMLString()
-    {
-        $this->assertEquals(0, count($this->profileFeed->entry));
-        
-        $this->profileFeed->transferFromXML($this->feedText);
-        $this->assertEquals(15, count($this->profileFeed->entry));
-        foreach($this->profileFeed->entry as $entry)
-        {
-            $this->assertTrue($entry instanceof Zend_Gdata_Health_ProfileEntry);
-        }
-
-        $newProfileFeed = new Zend_Gdata_Health_ProfileFeed();
-        $doc = new DOMDocument();
-        $doc->loadXML($this->profileFeed->saveXML());
-        $newProfileFeed->transferFromDom($doc->documentElement);
-        
-        $this->assertEquals(15, count($newProfileFeed->entry));
-        foreach($newProfileFeed->entry as $entry)
-        {
-            $this->assertTrue($entry instanceof Zend_Gdata_Health_ProfileEntry);
-        }
-    }
-    
-    
-    public function testGetEntries()
-    { 
-        $this->profileFeed->transferFromXML($this->feedText);
-        $entries = $this->profileFeed->getEntries();
-        $this->assertTrue(is_array($entries));
-        $this->assertEquals(15, count($entries));
-    }
-     
-    public function testGetAllCcrFromProfileEntries()
-    {
-        $newProfileFeed = new Zend_Gdata_Health_ProfileFeed();
-        $newProfileFeed->transferFromXML($this->feedText);
-        foreach($newProfileFeed->entry as $entry)
-        {
-            $ccr = $entry->getCcr();
-            $this->assertTrue($ccr instanceof Zend_Gdata_Health_Extension_Ccr);
-        } 
-    }
-    
-    public function testGetFirstEntrysCcrMedication()
-    {
-        $this->profileFeed->transferFromXML($this->feedText);
-        
-        $medications = $this->profileFeed->entry[0]->getCcr()->getMedications();
-        $this->assertType('DOMNodeList', $medications);
-        $this->assertEquals(1, count($medications));
-        
-        foreach ($medications as $med) {
-          $xmlStr = $med->ownerDocument->saveXML($med);
-          $this->assertXmlStringEqualsXmlString(file_get_contents(
-              'Zend/Gdata/Health/_files/TestDataHealthProfileEntrySample_medications3.xml', true),
-              $xmlStr);
-        }
-    }
-}
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Gdata
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+require_once 'Zend/Gdata/Health.php';
+require_once 'Zend/Gdata/Health/ProfileFeed.php';
+require_once 'Zend/Gdata/Health/ProfileEntry.php';
+
+/**
+ * @package Zend_Gdata
+ * @subpackage UnitTests
+ */
+class Zend_Gdata_Health_ProfileFeedTest extends PHPUnit_Framework_TestCase
+{
+
+    public function setUp()
+    {
+        $this->profileFeed = new Zend_Gdata_Health_ProfileFeed();
+        $this->feedText = file_get_contents(
+            'Zend/Gdata/Health/_files/TestDataHealthProfileFeedSample.xml', true);
+    }
+    
+    private function verifyAllSamplePropertiesAreCorrect($profileFeed) {
+        $this->assertEquals('https://www.google.com/health/feeds/profile/default', $profileFeed->id->text);
+        $this->assertEquals('2008-09-30T01:07:17.888Z', $profileFeed->updated->text);
+        $this->assertEquals('http://schemas.google.com/g/2005#kind', $profileFeed->category[0]->scheme);
+        $this->assertEquals('http://schemas.google.com/health/kinds#profile', $profileFeed->category[0]->term);
+        $this->assertEquals('text', $profileFeed->title->type);
+        $this->assertEquals('Profile Feed', $profileFeed->title->text);
+        $this->assertEquals('self', $profileFeed->getLink('self')->rel);
+        $this->assertEquals('application/atom+xml', $profileFeed->getLink('self')->type);
+        $this->assertEquals('https://www.google.com/health/feeds/profile/default?digest=false', 
+            $profileFeed->getLink('self')->href);
+        $this->assertEquals(1, $profileFeed->startIndex->text);
+    }
+    
+    public function testAllSamplePropertiesAreCorrect() {
+        $this->profileFeed->transferFromXML($this->feedText);
+        $this->verifyAllSamplePropertiesAreCorrect($this->profileFeed);
+    }
+    
+    public function testToAndFromXMLString()
+    {
+        $this->assertEquals(0, count($this->profileFeed->entry));
+        
+        $this->profileFeed->transferFromXML($this->feedText);
+        $this->assertEquals(15, count($this->profileFeed->entry));
+        foreach($this->profileFeed->entry as $entry)
+        {
+            $this->assertTrue($entry instanceof Zend_Gdata_Health_ProfileEntry);
+        }
+
+        $newProfileFeed = new Zend_Gdata_Health_ProfileFeed();
+        $doc = new DOMDocument();
+        $doc->loadXML($this->profileFeed->saveXML());
+        $newProfileFeed->transferFromDom($doc->documentElement);
+        
+        $this->assertEquals(15, count($newProfileFeed->entry));
+        foreach($newProfileFeed->entry as $entry)
+        {
+            $this->assertTrue($entry instanceof Zend_Gdata_Health_ProfileEntry);
+        }
+    }
+    
+    
+    public function testGetEntries()
+    { 
+        $this->profileFeed->transferFromXML($this->feedText);
+        $entries = $this->profileFeed->getEntries();
+        $this->assertTrue(is_array($entries));
+        $this->assertEquals(15, count($entries));
+    }
+     
+    public function testGetAllCcrFromProfileEntries()
+    {
+        $newProfileFeed = new Zend_Gdata_Health_ProfileFeed();
+        $newProfileFeed->transferFromXML($this->feedText);
+        foreach($newProfileFeed->entry as $entry)
+        {
+            $ccr = $entry->getCcr();
+            $this->assertTrue($ccr instanceof Zend_Gdata_Health_Extension_Ccr);
+        } 
+    }
+    
+    public function testGetFirstEntrysCcrMedication()
+    {
+        $this->profileFeed->transferFromXML($this->feedText);
+        
+        $medications = $this->profileFeed->entry[0]->getCcr()->getMedications();
+        $this->assertType('DOMNodeList', $medications);
+        $this->assertEquals(1, count($medications));
+        
+        foreach ($medications as $med) {
+          $xmlStr = $med->ownerDocument->saveXML($med);
+          $this->assertXmlStringEqualsXmlString(file_get_contents(
+              'Zend/Gdata/Health/_files/TestDataHealthProfileEntrySample_medications3.xml', true),
+              $xmlStr);
+        }
+    }
+}

+ 58 - 57
tests/Zend/Gdata/Health/ProfileListEntryTest.php

@@ -1,57 +1,58 @@
-<?php
-/**
- * Zend Framework
- *
- * LICENSE
- *
- * This source file is subject to the new BSD license that is bundled
- * with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://framework.zend.com/license/new-bsd
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@zend.com so we can send you a copy immediately.
- *
- * @category   Zend
- * @package    Zend_Gdata
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- */
-
-require_once 'Zend/Gdata/Health.php';
-require_once 'Zend/Gdata/Health/ProfileListEntry.php';
-
-/**
- * @package Zend_Gdata
- * @subpackage UnitTests
- */
-class Zend_Gdata_Health_ProfileListEntryTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp()
-    {
-        $this->entry = new Zend_Gdata_Health_ProfileListEntry();
-        $this->entryText = file_get_contents(
-            'Zend/Gdata/Health/_files/TestDataHealthProfileListEntrySample.xml', true);
-    }
-    
-    public function testEmptyProfileEntryToAndFromStringShouldMatch() {
-        $this->entry->transferFromXML($this->entryText);
-        $entryXml = $this->entry->saveXML();
-        $newProfileListEntry = new Zend_Gdata_Health_ProfileListEntry();
-        $newProfileListEntry->transferFromXML($entryXml);
-        $newProfileListEntryXML = $newProfileListEntry->saveXML();
-        $this->assertTrue($entryXml == $newProfileListEntryXML);
-    }
-    
-    public function testGetProfileID() {
-        $this->entry->transferFromXML($this->entryText);
-        $this->assertEquals('vndCn5sdfwdEIY', $this->entry->getProfileID());
-    }
-    
-    public function testGetProfileName() {
-        $this->entry->transferFromXML($this->entryText);
-        $this->assertEquals('profile name', $this->entry->getProfileName());
-    }
-}
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Gdata
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+require_once 'Zend/Gdata/Health.php';
+require_once 'Zend/Gdata/Health/ProfileListEntry.php';
+
+/**
+ * @package Zend_Gdata
+ * @subpackage UnitTests
+ */
+class Zend_Gdata_Health_ProfileListEntryTest extends PHPUnit_Framework_TestCase
+{
+
+    public function setUp()
+    {
+        $this->entry = new Zend_Gdata_Health_ProfileListEntry();
+        $this->entryText = file_get_contents(
+            'Zend/Gdata/Health/_files/TestDataHealthProfileListEntrySample.xml', true);
+    }
+    
+    public function testEmptyProfileEntryToAndFromStringShouldMatch() {
+        $this->entry->transferFromXML($this->entryText);
+        $entryXml = $this->entry->saveXML();
+        $newProfileListEntry = new Zend_Gdata_Health_ProfileListEntry();
+        $newProfileListEntry->transferFromXML($entryXml);
+        $newProfileListEntryXML = $newProfileListEntry->saveXML();
+        $this->assertTrue($entryXml == $newProfileListEntryXML);
+    }
+    
+    public function testGetProfileID() {
+        $this->entry->transferFromXML($this->entryText);
+        $this->assertEquals('vndCn5sdfwdEIY', $this->entry->getProfileID());
+    }
+    
+    public function testGetProfileName() {
+        $this->entry->transferFromXML($this->entryText);
+        $this->assertEquals('profile name', $this->entry->getProfileName());
+    }
+}

+ 148 - 147
tests/Zend/Gdata/Health/QueryTest.php

@@ -1,147 +1,148 @@
-<?php
-/**
- * Zend Framework
- *
- * LICENSE
- *
- * This source file is subject to the new BSD license that is bundled
- * with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://framework.zend.com/license/new-bsd
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@zend.com so we can send you a copy immediately.
- *
- * @category   Zend
- * @package    Zend_Gdata
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- */
-
-require_once 'Zend/Gdata/Health.php';
-require_once 'Zend/Gdata/Health/Query.php';
-require_once 'Zend/Http/Client.php';
-
-/**
- * @package Zend_Gdata
- * @subpackage UnitTests
- */
-class Zend_Gdata_Health_QueryTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp()
-    {
-        $this->query = new Zend_Gdata_Health_Query();
-    }
-
-    public function testDigest()
-    {
-        $this->query->resetParameters();
-        $this->assertEquals(null, $this->query->getDigest());
-        $this->query->setDigest('true');
-        $this->assertEquals('true', $this->query->getDigest());
-        $this->assertContains('digest=true', $this->query->getQueryUrl());
-    }
-    
-    public function testCategory()
-    {
-        $this->query->resetParameters();
-        $this->query->setCategory('medication');
-        $this->assertEquals($this->query->getCategory(), 'medication');
-        
-        $this->query->setCategory('medication', 'Lipitor');
-        $this->assertEquals($this->query->getCategory(), 'medication/%7Bhttp%3A%2F%2Fschemas.google.com%2Fhealth%2Fitem%7DLipitor');
-        
-        $this->query->setCategory('condition', 'Malaria');
-        $this->assertEquals($this->query->getCategory(), 'condition/%7Bhttp%3A%2F%2Fschemas.google.com%2Fhealth%2Fitem%7DMalaria');
-    }
-       
-    public function testGrouped()
-    {
-        $this->query->resetParameters();
-        $this->query->setGrouped('true');
-        $this->assertEquals('true', $this->query->getGrouped());
-        $this->assertContains('grouped=true', $this->query->getQueryUrl());
-    }
-    
-    public function testMaxResultsGroup()
-    {
-        $this->query->resetParameters();
-        
-        try {
-            $this->query->setMaxResultsGroup(1);
-            $this->fail('Expecting to catch Zend_Gdata_App_InvalidArgumentException');
-        } catch (Exception $e) {
-            $this->assertThat($e, $this->isInstanceOf('Zend_Gdata_App_InvalidArgumentException'),
-                'Expecting Zend_Gdata_App_InvalidArgumentException, got '.get_class($e));
-        }
-        
-        $this->assertEquals(null, $this->query->getMaxResultsGroup());
-        
-        $this->query->setGrouped('true');
-        $this->query->setMaxResultsGroup(1);
-        $this->assertEquals(1, $this->query->getMaxResultsGroup());
-        $this->assertContains('max-results-group=1', $this->query->getQueryUrl());
-    }
-    
-    public function testMaxResultsInGroup()
-    {
-        $this->query->resetParameters();
-        
-        try {
-            $this->query->setMaxResultsInGroup(2);
-            $this->fail('Expecting to catch Zend_Gdata_App_InvalidArgumentException');
-        } catch (Exception $e) {
-            $this->assertThat($e, $this->isInstanceOf('Zend_Gdata_App_InvalidArgumentException'),
-                'Expecting Zend_Gdata_App_InvalidArgumentException, got '.get_class($e));
-        }
-        
-        $this->query->setGrouped('true');
-        $this->assertEquals(null, $this->query->getMaxResultsInGroup());
-        $this->query->setMaxResultsInGroup(2);
-        $this->assertEquals(2, $this->query->getMaxResultsInGroup());
-        $this->assertContains('max-results-in-group=2', $this->query->getQueryUrl());
-    }
-    
-    public function testStartIndexGroup()
-    {
-        $this->query->resetParameters();
-        
-        $this->assertEquals(null, $this->query->getStartIndexGroup());
-        
-        try {
-            $this->query->setStartIndexGroup(3);
-            $this->fail('Expecting to catch Zend_Gdata_App_InvalidArgumentException');
-        } catch (Exception $e) {
-            $this->assertThat($e, $this->isInstanceOf('Zend_Gdata_App_InvalidArgumentException'),
-                'Expecting Zend_Gdata_App_InvalidArgumentException, got '.get_class($e));
-        }
-        
-        $this->query->setGrouped('true');
-        $this->query->setStartIndexGroup(3);
-        $this->assertEquals(3, $this->query->getStartIndexGroup());
-        $this->assertContains('start-index-group=3', $this->query->getQueryUrl());
-    }
-    
-    public function testStartIndexInGroup()
-    {
-        $this->query->resetParameters();
-        
-        $this->assertEquals(null, $this->query->getStartIndexInGroup());
-        
-        try {
-            $this->query->setStartIndexInGroup(4);
-            $this->fail('Expecting to catch Zend_Gdata_App_InvalidArgumentException');
-        } catch (Exception $e) {
-            $this->assertThat($e, $this->isInstanceOf('Zend_Gdata_App_InvalidArgumentException'),
-                'Expecting Zend_Gdata_App_InvalidArgumentException, got '.get_class($e));
-        }
-        
-        $this->query->setGrouped('true');
-        $this->query->setStartIndexInGroup(4);
-        $this->assertEquals(4, $this->query->getStartIndexInGroup());
-        $this->assertContains('start-index-in-group=4', $this->query->getQueryUrl());
-    }
-
-}
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Gdata
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+require_once 'Zend/Gdata/Health.php';
+require_once 'Zend/Gdata/Health/Query.php';
+require_once 'Zend/Http/Client.php';
+
+/**
+ * @package Zend_Gdata
+ * @subpackage UnitTests
+ */
+class Zend_Gdata_Health_QueryTest extends PHPUnit_Framework_TestCase
+{
+
+    public function setUp()
+    {
+        $this->query = new Zend_Gdata_Health_Query();
+    }
+
+    public function testDigest()
+    {
+        $this->query->resetParameters();
+        $this->assertEquals(null, $this->query->getDigest());
+        $this->query->setDigest('true');
+        $this->assertEquals('true', $this->query->getDigest());
+        $this->assertContains('digest=true', $this->query->getQueryUrl());
+    }
+    
+    public function testCategory()
+    {
+        $this->query->resetParameters();
+        $this->query->setCategory('medication');
+        $this->assertEquals($this->query->getCategory(), 'medication');
+        
+        $this->query->setCategory('medication', 'Lipitor');
+        $this->assertEquals($this->query->getCategory(), 'medication/%7Bhttp%3A%2F%2Fschemas.google.com%2Fhealth%2Fitem%7DLipitor');
+        
+        $this->query->setCategory('condition', 'Malaria');
+        $this->assertEquals($this->query->getCategory(), 'condition/%7Bhttp%3A%2F%2Fschemas.google.com%2Fhealth%2Fitem%7DMalaria');
+    }
+       
+    public function testGrouped()
+    {
+        $this->query->resetParameters();
+        $this->query->setGrouped('true');
+        $this->assertEquals('true', $this->query->getGrouped());
+        $this->assertContains('grouped=true', $this->query->getQueryUrl());
+    }
+    
+    public function testMaxResultsGroup()
+    {
+        $this->query->resetParameters();
+        
+        try {
+            $this->query->setMaxResultsGroup(1);
+            $this->fail('Expecting to catch Zend_Gdata_App_InvalidArgumentException');
+        } catch (Exception $e) {
+            $this->assertThat($e, $this->isInstanceOf('Zend_Gdata_App_InvalidArgumentException'),
+                'Expecting Zend_Gdata_App_InvalidArgumentException, got '.get_class($e));
+        }
+        
+        $this->assertEquals(null, $this->query->getMaxResultsGroup());
+        
+        $this->query->setGrouped('true');
+        $this->query->setMaxResultsGroup(1);
+        $this->assertEquals(1, $this->query->getMaxResultsGroup());
+        $this->assertContains('max-results-group=1', $this->query->getQueryUrl());
+    }
+    
+    public function testMaxResultsInGroup()
+    {
+        $this->query->resetParameters();
+        
+        try {
+            $this->query->setMaxResultsInGroup(2);
+            $this->fail('Expecting to catch Zend_Gdata_App_InvalidArgumentException');
+        } catch (Exception $e) {
+            $this->assertThat($e, $this->isInstanceOf('Zend_Gdata_App_InvalidArgumentException'),
+                'Expecting Zend_Gdata_App_InvalidArgumentException, got '.get_class($e));
+        }
+        
+        $this->query->setGrouped('true');
+        $this->assertEquals(null, $this->query->getMaxResultsInGroup());
+        $this->query->setMaxResultsInGroup(2);
+        $this->assertEquals(2, $this->query->getMaxResultsInGroup());
+        $this->assertContains('max-results-in-group=2', $this->query->getQueryUrl());
+    }
+    
+    public function testStartIndexGroup()
+    {
+        $this->query->resetParameters();
+        
+        $this->assertEquals(null, $this->query->getStartIndexGroup());
+        
+        try {
+            $this->query->setStartIndexGroup(3);
+            $this->fail('Expecting to catch Zend_Gdata_App_InvalidArgumentException');
+        } catch (Exception $e) {
+            $this->assertThat($e, $this->isInstanceOf('Zend_Gdata_App_InvalidArgumentException'),
+                'Expecting Zend_Gdata_App_InvalidArgumentException, got '.get_class($e));
+        }
+        
+        $this->query->setGrouped('true');
+        $this->query->setStartIndexGroup(3);
+        $this->assertEquals(3, $this->query->getStartIndexGroup());
+        $this->assertContains('start-index-group=3', $this->query->getQueryUrl());
+    }
+    
+    public function testStartIndexInGroup()
+    {
+        $this->query->resetParameters();
+        
+        $this->assertEquals(null, $this->query->getStartIndexInGroup());
+        
+        try {
+            $this->query->setStartIndexInGroup(4);
+            $this->fail('Expecting to catch Zend_Gdata_App_InvalidArgumentException');
+        } catch (Exception $e) {
+            $this->assertThat($e, $this->isInstanceOf('Zend_Gdata_App_InvalidArgumentException'),
+                'Expecting Zend_Gdata_App_InvalidArgumentException, got '.get_class($e));
+        }
+        
+        $this->query->setGrouped('true');
+        $this->query->setStartIndexInGroup(4);
+        $this->assertEquals(4, $this->query->getStartIndexInGroup());
+        $this->assertContains('start-index-in-group=4', $this->query->getQueryUrl());
+    }
+
+}

+ 311 - 310
tests/Zend/Gdata/HealthOnlineTest.php

@@ -1,310 +1,311 @@
-<?php
-/**
- * Zend Framework
- *
- * LICENSE
- *
- * This source file is subject to the new BSD license that is bundled
- * with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://framework.zend.com/license/new-bsd
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@zend.com so we can send you a copy immediately.
- *
- * @category   Zend
- * @package    Zend_Gdata
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- */
-
-require_once 'Zend/Gdata/Health.php';
-require_once 'Zend/Gdata/Health/Query.php';
-require_once 'Zend/Gdata/ClientLogin.php';
-
-/**
- * @package Zend_Gdata
- * @subpackage UnitTests
- */
-class Zend_Gdata_HealthOnlineTest extends PHPUnit_Framework_TestCase
-{
-
-    public function setUp()
-    {
-        $this->user = constant('TESTS_ZEND_GDATA_CLIENTLOGIN_EMAIL');
-        $this->pass = constant('TESTS_ZEND_GDATA_CLIENTLOGIN_PASSWORD');
-        $serviceName = Zend_Gdata_Health::HEALTH_SERVICE_NAME;
-        $client = Zend_Gdata_ClientLogin::getHttpClient($this->user, $this->pass, $serviceName);
-        $this->health = new Zend_Gdata_Health($client, 'google-MyPHPApp-v1.0');
-    }
-    
-    private function setupProfileID() 
-    {
-        $profileListFeed = $this->health->getHealthProfileListFeed();
-        $profileID = $profileListFeed->entry[0]->getProfileID();
-        $this->health->setProfileID($profileID);
-    }
-   
-    public function testSetProfileID() 
-    {
-        $this->health->setProfileID('123456790');
-        $this->assertEquals('123456790', $this->health->getProfileID());
-    }
-    
-    public function testGetHealthProfileListFeedWithoutUsingClientLogin() 
-    {             
-        $client = new Zend_Gdata_HttpClient();
-        $this->health = new Zend_Gdata_Health($client);
-        
-        try {
-            $feed = $this->health->getHealthProfileListFeed();
-            $this->fail('Expecting to catch Zend_Gdata_App_AuthException');
-        } catch (Exception $e) {
-            $this->assertThat($e, $this->isInstanceOf('Zend_Gdata_App_AuthException'),
-                'Expecting Zend_Gdata_App_AuthException, got '.get_class($e));
-        }
-    }
-    
-    public function testGetHealthProfileFeedWithoutUsingClientLogin() 
-    {
-        try {
-            $feed = $this->health->getHealthProfileFeed();
-            $this->fail('Expecting to catch Zend_Gdata_App_AuthException');
-        } catch (Exception $e) {
-            $this->assertThat($e, $this->isInstanceOf('Zend_Gdata_App_AuthException'),
-                'Expecting Zend_Gdata_App_AuthException, got '.get_class($e));
-        }
-    }
-    
-    public function testUseH9() 
-    {
-        $serviceName = Zend_Gdata_Health::H9_SANDBOX_SERVICE_NAME;
-        $client = Zend_Gdata_ClientLogin::getHttpClient($this->user, $this->pass, $serviceName);
-        $h9 = new Zend_Gdata_Health($client, 'google-MyPHPApp-v1.0', true);
-        
-        $profileListFeed = $h9->getHealthProfileListFeed();
-        $profileID = $profileListFeed->entry[0]->getProfileID();
-        $h9->setProfileID($profileID);
-        
-        // query profile feed
-        $feed1 = $h9->getHealthProfileFeed();
-        $this->assertTrue($feed1 instanceof Zend_Gdata_Health_ProfileFeed);   
-        foreach ($feed1->getEntries() as $entry) {
-            $this->assertTrue($entry instanceof Zend_Gdata_Health_ProfileEntry);
-            $this->assertEquals($entry->getHttpClient(), $feed1->getHttpClient());
-        }
-        
-        // send CCR
-        $subject = "Title of your notice goes here";
-        $body = "Notice body can contain <b>html</b> entities";
-        $type = "html";
-        $ccrXML = file_get_contents('Zend/Gdata/Health/_files/ccr_notice_sample.xml', true);
-    
-        $responseEntry = $h9->sendHealthNotice($subject, $body, $type, $ccrXML);
-        
-        $this->assertTrue($responseEntry instanceof Zend_Gdata_Health_ProfileEntry);       
-        $this->assertEquals($subject, $responseEntry->title->text);
-        $this->assertEquals($body, $responseEntry->content->text);
-        $this->assertEquals($type, $responseEntry->content->type);
-        $this->assertXmlStringEqualsXmlString($responseEntry->getCcr()->saveXML(), $ccrXML);
-    }
-
-    public function testGetHealthProfileListFeed() 
-    {
-        // no query
-        $feed1 = $this->health->getHealthProfileListFeed();
-        $this->assertTrue($feed1 instanceof Zend_Gdata_Health_ProfileListFeed);   
-        foreach ($feed1->getEntries() as $entry) {
-            $this->assertTrue($entry instanceof Zend_Gdata_Health_ProfileListEntry);
-            $this->assertEquals($entry->getHttpClient(), $feed1->getHttpClient());
-        }
-        
-        // with query object
-        $query = new Zend_Gdata_Health_Query('https://www.google.com/health/feeds/profile/list');
-        $feed2 = $this->health->getHealthProfileListFeed($query);
-        $this->assertTrue($feed2 instanceof Zend_Gdata_Health_ProfileListFeed);
-        foreach ($feed2->entry as $entry) {
-            $this->assertTrue($entry instanceof Zend_Gdata_Health_ProfileListEntry);
-            $this->assertEquals($entry->getHttpClient(), $feed2->getHttpClient());
-        }
-        
-        // with direct query string
-        $feed3 = $this->health->getHealthProfileListFeed('https://www.google.com/health/feeds/profile/list');
-        $this->assertTrue($feed3 instanceof Zend_Gdata_Health_ProfileListFeed);
-        foreach ($feed3->entry as $entry) {
-            $this->assertTrue($entry instanceof Zend_Gdata_Health_ProfileListEntry);
-            $this->assertEquals($entry->getHttpClient(), $feed3->getHttpClient());
-        }
-        
-        $this->assertEquals($feed1->saveXML(), $feed2->saveXML());
-        $this->assertEquals($feed1->saveXML(), $feed3->saveXML());
-        $this->assertEquals($feed2->saveXML(), $feed3->saveXML());
-    }
-    
-    
-    public function testGetProfileFeedNoQuery() 
-    {
-        $this->setupProfileID();
-        
-        // no query, digest=false
-        $profileFeed = $this->health->getHealthProfileFeed();
-        $this->assertTrue($profileFeed instanceof Zend_Gdata_Health_ProfileFeed);  
-        $this->assertTrue(count($profileFeed->entry) > 1, 'digest=false, should have multiple <entry> elements');    
-        foreach ($profileFeed->entry as $entry) {
-            $this->assertTrue($entry instanceof Zend_Gdata_Health_ProfileEntry);
-            $ccr = $entry->getCcr();
-            $this->assertTrue($ccr instanceof Zend_Gdata_Health_Extension_Ccr);
-            $this->assertEquals($entry->getHttpClient(), $profileFeed->getHttpClient());
-        }
-    }
-    
-    public function testGetProfileFeedByQuery() 
-    {
-        $this->setupProfileID();
-        $profileID = $this->health->getProfileID();
-        
-        // with direct query string
-        $feed1 = $this->health->getHealthProfileFeed(
-            "https://www.google.com/health/feeds/profile/ui/{$profileID}?digest=true");        
-        $this->assertTrue($feed1 instanceof Zend_Gdata_Health_ProfileFeed);
-        $this->assertTrue(count($feed1->entry) === 1, 'digest=true, expected a single <entry> element');
-        foreach ($feed1->entry as $entry) {
-            $this->assertTrue($entry instanceof Zend_Gdata_Health_ProfileEntry);
-            $ccr = $entry->getCcr();
-            $this->assertTrue($ccr instanceof Zend_Gdata_Health_Extension_Ccr);
-            $this->assertEquals($entry->getHttpClient(), $feed1->getHttpClient());
-        }
-        
-        // with query object
-        $query = new Zend_Gdata_Health_Query("https://www.google.com/health/feeds/profile/ui/{$profileID}");
-        $query->setDigest('true');
-        $feed2 = $this->health->getHealthProfileFeed($query);
-        $this->assertTrue($feed2 instanceof Zend_Gdata_Health_ProfileFeed);
-        $this->assertTrue(count($feed2->entry) === 1, 'digest=true, expected a single <entry> element');
-        foreach ($feed2->entry as $entry) {
-            $this->assertTrue($entry instanceof Zend_Gdata_Health_ProfileEntry);
-            $ccr = $entry->getCcr();
-            $this->assertTrue($ccr instanceof Zend_Gdata_Health_Extension_Ccr);
-            $this->assertEquals($entry->getHttpClient(), $feed2->getHttpClient());
-        }
-        
-        $this->assertEquals($feed1->saveXML(), $feed2->saveXML());
-    }
-  
-    public function testGetProfileEntryNoQuery() 
-    {
-        try {
-            $entry = $this->health->getHealthProfileEntry(); 
-            $this->fail('Expecting to catch Zend_Gdata_App_InvalidArgumentException');
-        } catch (Exception $e) {
-            $this->assertThat($e, $this->isInstanceOf('Zend_Gdata_App_InvalidArgumentException'),
-                'Expecting Zend_Gdata_App_InvalidArgumentException, got '.get_class($e));
-        }   
-    }
-    
-    public function testGetProfileEntry() 
-    {
-        $this->setupProfileID();
-        $profileID = $this->health->getProfileID();
-        
-        $feed = $this->health->getHealthProfileFeed();    
-        $entryFromProfileQuery = $feed->entry[0];
-        $this->assertTrue($entryFromProfileQuery instanceof Zend_Gdata_Health_ProfileEntry);
-        
-        // direct query string
-        $entry1 = $this->health->getHealthProfileEntry($entryFromProfileQuery->id->text); 
-        $this->assertTrue($entry1 instanceof Zend_Gdata_Health_ProfileEntry);
-        
-        // query object
-        $query = new Zend_Gdata_Health_Query("https://www.google.com/health/feeds/profile/ui/{$profileID}");
-        $entry2 = $this->health->getHealthProfileEntry($query); 
-        $this->assertTrue($entry2 instanceof Zend_Gdata_Health_ProfileEntry);
-        
-        $this->assertEquals($entryFromProfileQuery->getHttpClient(), $entry1->getHttpClient());
-        $this->assertEquals($entryFromProfileQuery->getHttpClient(), $entry2->getHttpClient());
-        $this->assertEquals($entry1->getHttpClient(), $entry2->getHttpClient());
-        
-        $this->assertXmlStringEqualsXmlString($entryFromProfileQuery->getCcr()->saveXML(), $entry1->getCcr()->saveXML());
-        $this->assertXmlStringEqualsXmlString($entryFromProfileQuery->getCcr()->saveXML(), $entry2->getCcr()->saveXML());
-        $this->assertXmlStringEqualsXmlString($entry1->getCcr()->saveXML(), $entry2->getCcr()->saveXML());
-    }
-  
-    public function testSendNoticeWithoutUsingClientLogin() 
-    {                     
-        try {
-            $responseEntry = $this->health->sendHealthNotice("", "");
-            $this->fail('Expecting to catch Zend_Gdata_App_AuthException');
-        } catch (Exception $e) {
-            $this->assertThat($e, $this->isInstanceOf('Zend_Gdata_App_AuthException'),
-                'Expecting Zend_Gdata_App_AuthException, got '.get_class($e));
-        }
-    }
-    
-    public function testSendNoticeWithoutCcr()
-    {
-        $this->setupProfileID();
-        $profileID = $this->health->getProfileID();
-        
-        $subject = "Title of your notice goes here";
-        $body = "Notice body goes here";
-    
-        $responseEntry = $this->health->sendHealthNotice($subject, $body);
-        
-        $this->assertTrue($responseEntry instanceof Zend_Gdata_Health_ProfileEntry);       
-        $this->assertEquals($subject, $responseEntry->title->text);
-        $this->assertEquals($body, $responseEntry->content->text);
-        $this->assertNull($responseEntry->getCcr());
-    }
-    
-    public function testSendNoticeWithoutCcrUsingDirectInsert()
-    {
-        $this->setupProfileID();
-        $profileID = $this->health->getProfileID();
-        
-        $subject = "Title of your notice goes here";
-        $body = "Notice body goes here";
-    
-        $entry = new Zend_Gdata_Health_ProfileEntry();
-        
-        $author = $this->health->newAuthor();
-        $author->name = $this->health->newName('John Doe');
-        $author->email = $this->health->newEmail('user@example.com');
-        $entry->setAuthor(array(0 => $author)); 
-
-        $entry->title = $this->health->newTitle($subject);
-        $entry->content = $this->health->newContent($body);
-        $entry->content->type = 'text';
-        
-        $ccrXML = file_get_contents('Zend/Gdata/Health/_files/ccr_notice_sample.xml', true);
-        $entry->setCcr($ccrXML);
-          
-        $uri = "https://www.google.com/health/feeds/register/ui/{$profileID}";
-        $responseEntry = $this->health->insertEntry($entry, $uri, 'Zend_Gdata_Health_ProfileEntry');
-        
-        $this->assertTrue($responseEntry instanceof Zend_Gdata_Health_ProfileEntry);  
-        $this->assertEquals($subject, $responseEntry->title->text);     
-        $this->assertEquals($author->name->text, 'John Doe');
-        $this->assertEquals($author->email->text, 'user@example.com');
-        $this->assertEquals($body, $responseEntry->content->text);
-    }
-
-    public function testSendNoticeWithCcr()
-    {
-        $this->setupProfileID();
-        $profileID = $this->health->getProfileID();
-        
-        $subject = "Title of your notice goes here";
-        $body = "Notice body can contain <b>html</b> entities";
-        $type = "html";
-        $ccrXML = file_get_contents('Zend/Gdata/Health/_files/ccr_notice_sample.xml', true);
-    
-        $responseEntry = $this->health->sendHealthNotice($subject, $body, $type, $ccrXML);
-        
-        $this->assertTrue($responseEntry instanceof Zend_Gdata_Health_ProfileEntry);       
-        $this->assertEquals($subject, $responseEntry->title->text);
-        $this->assertEquals($body, $responseEntry->content->text);
-        $this->assertEquals($type, $responseEntry->content->type);
-        $this->assertXmlStringEqualsXmlString($responseEntry->getCcr()->saveXML(), $ccrXML);
-    }
-}
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Gdata
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+require_once 'Zend/Gdata/Health.php';
+require_once 'Zend/Gdata/Health/Query.php';
+require_once 'Zend/Gdata/ClientLogin.php';
+
+/**
+ * @package Zend_Gdata
+ * @subpackage UnitTests
+ */
+class Zend_Gdata_HealthOnlineTest extends PHPUnit_Framework_TestCase
+{
+
+    public function setUp()
+    {
+        $this->user = constant('TESTS_ZEND_GDATA_CLIENTLOGIN_EMAIL');
+        $this->pass = constant('TESTS_ZEND_GDATA_CLIENTLOGIN_PASSWORD');
+        $serviceName = Zend_Gdata_Health::HEALTH_SERVICE_NAME;
+        $client = Zend_Gdata_ClientLogin::getHttpClient($this->user, $this->pass, $serviceName);
+        $this->health = new Zend_Gdata_Health($client, 'google-MyPHPApp-v1.0');
+    }
+    
+    private function setupProfileID() 
+    {
+        $profileListFeed = $this->health->getHealthProfileListFeed();
+        $profileID = $profileListFeed->entry[0]->getProfileID();
+        $this->health->setProfileID($profileID);
+    }
+   
+    public function testSetProfileID() 
+    {
+        $this->health->setProfileID('123456790');
+        $this->assertEquals('123456790', $this->health->getProfileID());
+    }
+    
+    public function testGetHealthProfileListFeedWithoutUsingClientLogin() 
+    {             
+        $client = new Zend_Gdata_HttpClient();
+        $this->health = new Zend_Gdata_Health($client);
+        
+        try {
+            $feed = $this->health->getHealthProfileListFeed();
+            $this->fail('Expecting to catch Zend_Gdata_App_AuthException');
+        } catch (Exception $e) {
+            $this->assertThat($e, $this->isInstanceOf('Zend_Gdata_App_AuthException'),
+                'Expecting Zend_Gdata_App_AuthException, got '.get_class($e));
+        }
+    }
+    
+    public function testGetHealthProfileFeedWithoutUsingClientLogin() 
+    {
+        try {
+            $feed = $this->health->getHealthProfileFeed();
+            $this->fail('Expecting to catch Zend_Gdata_App_AuthException');
+        } catch (Exception $e) {
+            $this->assertThat($e, $this->isInstanceOf('Zend_Gdata_App_AuthException'),
+                'Expecting Zend_Gdata_App_AuthException, got '.get_class($e));
+        }
+    }
+    
+    public function testUseH9() 
+    {
+        $serviceName = Zend_Gdata_Health::H9_SANDBOX_SERVICE_NAME;
+        $client = Zend_Gdata_ClientLogin::getHttpClient($this->user, $this->pass, $serviceName);
+        $h9 = new Zend_Gdata_Health($client, 'google-MyPHPApp-v1.0', true);
+        
+        $profileListFeed = $h9->getHealthProfileListFeed();
+        $profileID = $profileListFeed->entry[0]->getProfileID();
+        $h9->setProfileID($profileID);
+        
+        // query profile feed
+        $feed1 = $h9->getHealthProfileFeed();
+        $this->assertTrue($feed1 instanceof Zend_Gdata_Health_ProfileFeed);   
+        foreach ($feed1->getEntries() as $entry) {
+            $this->assertTrue($entry instanceof Zend_Gdata_Health_ProfileEntry);
+            $this->assertEquals($entry->getHttpClient(), $feed1->getHttpClient());
+        }
+        
+        // send CCR
+        $subject = "Title of your notice goes here";
+        $body = "Notice body can contain <b>html</b> entities";
+        $type = "html";
+        $ccrXML = file_get_contents('Zend/Gdata/Health/_files/ccr_notice_sample.xml', true);
+    
+        $responseEntry = $h9->sendHealthNotice($subject, $body, $type, $ccrXML);
+        
+        $this->assertTrue($responseEntry instanceof Zend_Gdata_Health_ProfileEntry);       
+        $this->assertEquals($subject, $responseEntry->title->text);
+        $this->assertEquals($body, $responseEntry->content->text);
+        $this->assertEquals($type, $responseEntry->content->type);
+        $this->assertXmlStringEqualsXmlString($responseEntry->getCcr()->saveXML(), $ccrXML);
+    }
+
+    public function testGetHealthProfileListFeed() 
+    {
+        // no query
+        $feed1 = $this->health->getHealthProfileListFeed();
+        $this->assertTrue($feed1 instanceof Zend_Gdata_Health_ProfileListFeed);   
+        foreach ($feed1->getEntries() as $entry) {
+            $this->assertTrue($entry instanceof Zend_Gdata_Health_ProfileListEntry);
+            $this->assertEquals($entry->getHttpClient(), $feed1->getHttpClient());
+        }
+        
+        // with query object
+        $query = new Zend_Gdata_Health_Query('https://www.google.com/health/feeds/profile/list');
+        $feed2 = $this->health->getHealthProfileListFeed($query);
+        $this->assertTrue($feed2 instanceof Zend_Gdata_Health_ProfileListFeed);
+        foreach ($feed2->entry as $entry) {
+            $this->assertTrue($entry instanceof Zend_Gdata_Health_ProfileListEntry);
+            $this->assertEquals($entry->getHttpClient(), $feed2->getHttpClient());
+        }
+        
+        // with direct query string
+        $feed3 = $this->health->getHealthProfileListFeed('https://www.google.com/health/feeds/profile/list');
+        $this->assertTrue($feed3 instanceof Zend_Gdata_Health_ProfileListFeed);
+        foreach ($feed3->entry as $entry) {
+            $this->assertTrue($entry instanceof Zend_Gdata_Health_ProfileListEntry);
+            $this->assertEquals($entry->getHttpClient(), $feed3->getHttpClient());
+        }
+        
+        $this->assertEquals($feed1->saveXML(), $feed2->saveXML());
+        $this->assertEquals($feed1->saveXML(), $feed3->saveXML());
+        $this->assertEquals($feed2->saveXML(), $feed3->saveXML());
+    }
+    
+    
+    public function testGetProfileFeedNoQuery() 
+    {
+        $this->setupProfileID();
+        
+        // no query, digest=false
+        $profileFeed = $this->health->getHealthProfileFeed();
+        $this->assertTrue($profileFeed instanceof Zend_Gdata_Health_ProfileFeed);  
+        $this->assertTrue(count($profileFeed->entry) > 1, 'digest=false, should have multiple <entry> elements');    
+        foreach ($profileFeed->entry as $entry) {
+            $this->assertTrue($entry instanceof Zend_Gdata_Health_ProfileEntry);
+            $ccr = $entry->getCcr();
+            $this->assertTrue($ccr instanceof Zend_Gdata_Health_Extension_Ccr);
+            $this->assertEquals($entry->getHttpClient(), $profileFeed->getHttpClient());
+        }
+    }
+    
+    public function testGetProfileFeedByQuery() 
+    {
+        $this->setupProfileID();
+        $profileID = $this->health->getProfileID();
+        
+        // with direct query string
+        $feed1 = $this->health->getHealthProfileFeed(
+            "https://www.google.com/health/feeds/profile/ui/{$profileID}?digest=true");        
+        $this->assertTrue($feed1 instanceof Zend_Gdata_Health_ProfileFeed);
+        $this->assertTrue(count($feed1->entry) === 1, 'digest=true, expected a single <entry> element');
+        foreach ($feed1->entry as $entry) {
+            $this->assertTrue($entry instanceof Zend_Gdata_Health_ProfileEntry);
+            $ccr = $entry->getCcr();
+            $this->assertTrue($ccr instanceof Zend_Gdata_Health_Extension_Ccr);
+            $this->assertEquals($entry->getHttpClient(), $feed1->getHttpClient());
+        }
+        
+        // with query object
+        $query = new Zend_Gdata_Health_Query("https://www.google.com/health/feeds/profile/ui/{$profileID}");
+        $query->setDigest('true');
+        $feed2 = $this->health->getHealthProfileFeed($query);
+        $this->assertTrue($feed2 instanceof Zend_Gdata_Health_ProfileFeed);
+        $this->assertTrue(count($feed2->entry) === 1, 'digest=true, expected a single <entry> element');
+        foreach ($feed2->entry as $entry) {
+            $this->assertTrue($entry instanceof Zend_Gdata_Health_ProfileEntry);
+            $ccr = $entry->getCcr();
+            $this->assertTrue($ccr instanceof Zend_Gdata_Health_Extension_Ccr);
+            $this->assertEquals($entry->getHttpClient(), $feed2->getHttpClient());
+        }
+        
+        $this->assertEquals($feed1->saveXML(), $feed2->saveXML());
+    }
+  
+    public function testGetProfileEntryNoQuery() 
+    {
+        try {
+            $entry = $this->health->getHealthProfileEntry(); 
+            $this->fail('Expecting to catch Zend_Gdata_App_InvalidArgumentException');
+        } catch (Exception $e) {
+            $this->assertThat($e, $this->isInstanceOf('Zend_Gdata_App_InvalidArgumentException'),
+                'Expecting Zend_Gdata_App_InvalidArgumentException, got '.get_class($e));
+        }   
+    }
+    
+    public function testGetProfileEntry() 
+    {
+        $this->setupProfileID();
+        $profileID = $this->health->getProfileID();
+        
+        $feed = $this->health->getHealthProfileFeed();    
+        $entryFromProfileQuery = $feed->entry[0];
+        $this->assertTrue($entryFromProfileQuery instanceof Zend_Gdata_Health_ProfileEntry);
+        
+        // direct query string
+        $entry1 = $this->health->getHealthProfileEntry($entryFromProfileQuery->id->text); 
+        $this->assertTrue($entry1 instanceof Zend_Gdata_Health_ProfileEntry);
+        
+        // query object
+        $query = new Zend_Gdata_Health_Query("https://www.google.com/health/feeds/profile/ui/{$profileID}");
+        $entry2 = $this->health->getHealthProfileEntry($query); 
+        $this->assertTrue($entry2 instanceof Zend_Gdata_Health_ProfileEntry);
+        
+        $this->assertEquals($entryFromProfileQuery->getHttpClient(), $entry1->getHttpClient());
+        $this->assertEquals($entryFromProfileQuery->getHttpClient(), $entry2->getHttpClient());
+        $this->assertEquals($entry1->getHttpClient(), $entry2->getHttpClient());
+        
+        $this->assertXmlStringEqualsXmlString($entryFromProfileQuery->getCcr()->saveXML(), $entry1->getCcr()->saveXML());
+        $this->assertXmlStringEqualsXmlString($entryFromProfileQuery->getCcr()->saveXML(), $entry2->getCcr()->saveXML());
+        $this->assertXmlStringEqualsXmlString($entry1->getCcr()->saveXML(), $entry2->getCcr()->saveXML());
+    }
+  
+    public function testSendNoticeWithoutUsingClientLogin() 
+    {                     
+        try {
+            $responseEntry = $this->health->sendHealthNotice("", "");
+            $this->fail('Expecting to catch Zend_Gdata_App_AuthException');
+        } catch (Exception $e) {
+            $this->assertThat($e, $this->isInstanceOf('Zend_Gdata_App_AuthException'),
+                'Expecting Zend_Gdata_App_AuthException, got '.get_class($e));
+        }
+    }
+    
+    public function testSendNoticeWithoutCcr()
+    {
+        $this->setupProfileID();
+        $profileID = $this->health->getProfileID();
+        
+        $subject = "Title of your notice goes here";
+        $body = "Notice body goes here";
+    
+        $responseEntry = $this->health->sendHealthNotice($subject, $body);
+        
+        $this->assertTrue($responseEntry instanceof Zend_Gdata_Health_ProfileEntry);       
+        $this->assertEquals($subject, $responseEntry->title->text);
+        $this->assertEquals($body, $responseEntry->content->text);
+        $this->assertNull($responseEntry->getCcr());
+    }
+    
+    public function testSendNoticeWithoutCcrUsingDirectInsert()
+    {
+        $this->setupProfileID();
+        $profileID = $this->health->getProfileID();
+        
+        $subject = "Title of your notice goes here";
+        $body = "Notice body goes here";
+    
+        $entry = new Zend_Gdata_Health_ProfileEntry();
+        
+        $author = $this->health->newAuthor();
+        $author->name = $this->health->newName('John Doe');
+        $author->email = $this->health->newEmail('user@example.com');
+        $entry->setAuthor(array(0 => $author)); 
+
+        $entry->title = $this->health->newTitle($subject);
+        $entry->content = $this->health->newContent($body);
+        $entry->content->type = 'text';
+        
+        $ccrXML = file_get_contents('Zend/Gdata/Health/_files/ccr_notice_sample.xml', true);
+        $entry->setCcr($ccrXML);
+          
+        $uri = "https://www.google.com/health/feeds/register/ui/{$profileID}";
+        $responseEntry = $this->health->insertEntry($entry, $uri, 'Zend_Gdata_Health_ProfileEntry');
+        
+        $this->assertTrue($responseEntry instanceof Zend_Gdata_Health_ProfileEntry);  
+        $this->assertEquals($subject, $responseEntry->title->text);     
+        $this->assertEquals($author->name->text, 'John Doe');
+        $this->assertEquals($author->email->text, 'user@example.com');
+        $this->assertEquals($body, $responseEntry->content->text);
+    }
+
+    public function testSendNoticeWithCcr()
+    {
+        $this->setupProfileID();
+        $profileID = $this->health->getProfileID();
+        
+        $subject = "Title of your notice goes here";
+        $body = "Notice body can contain <b>html</b> entities";
+        $type = "html";
+        $ccrXML = file_get_contents('Zend/Gdata/Health/_files/ccr_notice_sample.xml', true);
+    
+        $responseEntry = $this->health->sendHealthNotice($subject, $body, $type, $ccrXML);
+        
+        $this->assertTrue($responseEntry instanceof Zend_Gdata_Health_ProfileEntry);       
+        $this->assertEquals($subject, $responseEntry->title->text);
+        $this->assertEquals($body, $responseEntry->content->text);
+        $this->assertEquals($type, $responseEntry->content->type);
+        $this->assertXmlStringEqualsXmlString($responseEntry->getCcr()->saveXML(), $ccrXML);
+    }
+}

+ 1 - 0
tests/Zend/Ldap/AttributeTest.php

@@ -17,6 +17,7 @@
  * @subpackage UnitTests
  * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
  */
 
 /**

+ 1 - 0
tests/Zend/Ldap/ChangePasswordTest.php

@@ -17,6 +17,7 @@
  * @subpackage UnitTests
  * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
  */
 
 /**

+ 1 - 0
tests/Zend/Ldap/ConverterTest.php

@@ -17,6 +17,7 @@
  * @subpackage UnitTests
  * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
  */
 
 /**

+ 1 - 0
tests/Zend/Ldap/FilterTest.php

@@ -17,6 +17,7 @@
  * @subpackage UnitTests
  * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
  */
 
 /**

+ 1 - 0
tests/Zend/Tool/AllTests.php

@@ -17,6 +17,7 @@
  * @subpackage UnitTests
  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
  */
 
 /**

+ 21 - 0
tests/Zend/View/Helper/CycleTest.php

@@ -1,4 +1,25 @@
 <?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_View
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
 // Call Zend_View_Helper_CycleTest::main() if this source file is executed directly.
 if (! defined("PHPUnit_MAIN_METHOD")) {
     define("PHPUnit_MAIN_METHOD", "Zend_View_Helper_CycleTest::main");