Sfoglia il codice sorgente

Zend_Gdata_Extension_RecurrenceException's specialized property should be a boolean, so test for that.

Rob Allen 12 anni fa
parent
commit
9ce93c397c
1 ha cambiato i file con 7 aggiunte e 7 eliminazioni
  1. 7 7
      tests/Zend/Gdata/RecurrenceExceptionTest.php

+ 7 - 7
tests/Zend/Gdata/RecurrenceExceptionTest.php

@@ -64,9 +64,9 @@ class Zend_Gdata_RecurrenceExceptionTest extends PHPUnit_Framework_TestCase
     }
 
     public function testNormalRecurrenceExceptionShouldHaveNoExtensionElements() {
-        $this->recurrenceException->specialized = "false";
+        $this->recurrenceException->specialized = false;
 
-        $this->assertEquals("false", $this->recurrenceException->specialized);
+        $this->assertEquals(false, $this->recurrenceException->specialized);
 
         $this->assertEquals(0, count($this->recurrenceException->extensionElements));
         $newRecurrenceException = new Zend_Gdata_Extension_RecurrenceException();
@@ -75,14 +75,14 @@ class Zend_Gdata_RecurrenceExceptionTest extends PHPUnit_Framework_TestCase
         $newRecurrenceException->extensionElements = array(
                 new Zend_Gdata_App_Extension_Element('foo', 'atom', null, 'bar'));
         $this->assertEquals(1, count($newRecurrenceException->extensionElements));
-        $this->assertEquals("false", $newRecurrenceException->specialized);
+        $this->assertEquals(false, $newRecurrenceException->specialized);
 
         /* try constructing using magic factory */
         $gdata = new Zend_Gdata();
         $newRecurrenceException2 = $gdata->newRecurrenceException();
         $newRecurrenceException2->transferFromXML($newRecurrenceException->saveXML());
         $this->assertEquals(1, count($newRecurrenceException2->extensionElements));
-        $this->assertEquals("false", $newRecurrenceException2->specialized);
+        $this->assertEquals(false, $newRecurrenceException2->specialized);
     }
 
     public function testEmptyRecurrenceExceptionToAndFromStringShouldMatch() {
@@ -94,13 +94,13 @@ class Zend_Gdata_RecurrenceExceptionTest extends PHPUnit_Framework_TestCase
     }
 
     public function testRecurrenceExceptionWithValueToAndFromStringShouldMatch() {
-        $this->recurrenceException->specialized = "false";
+        $this->recurrenceException->specialized = false;
         $recurrenceExceptionXml = $this->recurrenceException->saveXML();
         $newRecurrenceException = new Zend_Gdata_Extension_RecurrenceException();
         $newRecurrenceException->transferFromXML($recurrenceExceptionXml);
         $newRecurrenceExceptionXml = $newRecurrenceException->saveXML();
         $this->assertTrue($recurrenceExceptionXml == $newRecurrenceExceptionXml);
-        $this->assertEquals("false", $this->recurrenceException->specialized);
+        $this->assertEquals(false, $this->recurrenceException->specialized);
     }
 
     public function testExtensionAttributes() {
@@ -119,7 +119,7 @@ class Zend_Gdata_RecurrenceExceptionTest extends PHPUnit_Framework_TestCase
 
     public function testConvertFullRecurrenceExceptionToAndFromString() {
         $this->recurrenceException->transferFromXML($this->recurrenceExceptionText);
-        $this->assertEquals("true", $this->recurrenceException->specialized);
+        $this->assertEquals(true, $this->recurrenceException->specialized);
         $this->assertTrue($this->recurrenceException->entryLink instanceof Zend_Gdata_Extension_EntryLink);
         $this->assertEquals("http://www.google.com/calendar/feeds/default/private/full/hj4geu9lpkh3ebk6rvm4k8mhik", $this->recurrenceException->entryLink->href);
         $this->assertTrue($this->recurrenceException->originalEvent instanceof Zend_Gdata_Extension_OriginalEvent);