Author: chabotc
Date: Mon Sep  8 15:27:22 2008
New Revision: 693302

URL: http://svn.apache.org/viewvc?rev=693302&view=rev
Log:
Fix up UnitTest's for the new PC structures

Modified:
    incubator/shindig/trunk/php/test/social-api/AddressTest.php
    incubator/shindig/trunk/php/test/social-api/EmailTest.php
    incubator/shindig/trunk/php/test/social-api/NameTest.php
    incubator/shindig/trunk/php/test/social-api/PersonTest.php
    incubator/shindig/trunk/php/test/social-api/PhoneTest.php
    incubator/shindig/trunk/php/test/social-api/UrlTest.php

Modified: incubator/shindig/trunk/php/test/social-api/AddressTest.php
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/test/social-api/AddressTest.php?rev=693302&r1=693301&r2=693302&view=diff
==============================================================================
--- incubator/shindig/trunk/php/test/social-api/AddressTest.php (original)
+++ incubator/shindig/trunk/php/test/social-api/AddressTest.php Mon Sep  8 
15:27:22 2008
@@ -64,14 +64,6 @@
        }
 
        /**
-        * Tests Address->getExtendedAddress()
-        */
-       public function testGetExtendedAddress()
-       {
-               $this->assertEquals('EXTENDEDADDRESS', 
$this->Address->getExtendedAddress());
-       }
-
-       /**
         * Tests Address->getLatitude()
         */
        public function testGetLatitude()
@@ -96,14 +88,6 @@
        }
 
        /**
-        * Tests Address->getPoBox()
-        */
-       public function testGetPoBox()
-       {
-               $this->assertEquals('POBOX', $this->Address->getPoBox());
-       }
-
-       /**
         * Tests Address->getPostalCode()
         */
        public function testGetPostalCode()
@@ -136,11 +120,11 @@
        }
 
        /**
-        * Tests Address->getUnstructuredAddress()
+        * Tests Address->getFormatted()
         */
-       public function testGetUnstructuredAddress()
+       public function testGetFormatted()
        {
-               $this->assertEquals('UNSTRUCTUREDADDRESS', 
$this->Address->getUnstructuredAddress());
+               $this->assertEquals('UNSTRUCTUREDADDRESS', 
$this->Address->getFormatted());
        }
 
        /**
@@ -149,16 +133,7 @@
        public function testSetCountry()
        {
                $this->Address->setCountry('country');
-               $this->assertEquals('country', $this->Address->country);
-       }
-
-       /**
-        * Tests Address->setExtendedAddress()
-        */
-       public function testSetExtendedAddress()
-       {
-               $this->Address->setExtendedAddress('extendedaddress');
-               $this->assertEquals('extendedaddress', 
$this->Address->extendedAddress);
+               $this->assertEquals('country', $this->Address->getCountry());
        }
 
        /**
@@ -167,7 +142,7 @@
        public function testSetLatitude()
        {
                $this->Address->setLatitude('latitude');
-               $this->assertEquals('latitude', $this->Address->latitude);
+               $this->assertEquals('latitude', $this->Address->getLatitude());
        }
 
        /**
@@ -176,7 +151,7 @@
        public function testSetLocality()
        {
                $this->Address->setLocality('locality');
-               $this->assertEquals('locality', $this->Address->locality);
+               $this->assertEquals('locality', $this->Address->getLocality());
        }
 
        /**
@@ -185,16 +160,7 @@
        public function testSetLongitude()
        {
                $this->Address->setLongitude('longitude');
-               $this->assertEquals('longitude', $this->Address->longitude);
-       }
-
-       /**
-        * Tests Address->setPoBox()
-        */
-       public function testSetPoBox()
-       {
-               $this->Address->setPoBox('pobox');
-               $this->assertEquals('pobox', $this->Address->poBox);
+               $this->assertEquals('longitude', 
$this->Address->getLongitude());
        }
 
        /**
@@ -203,7 +169,7 @@
        public function testSetPostalCode()
        {
                $this->Address->setPostalCode('postalcode');
-               $this->assertEquals('postalcode', $this->Address->postalCode);
+               $this->assertEquals('postalcode', 
$this->Address->getPostalCode());
        }
 
        /**
@@ -212,7 +178,7 @@
        public function testSetRegion()
        {
                $this->Address->setRegion('religion');
-               $this->assertEquals('religion', $this->Address->region);
+               $this->assertEquals('religion', $this->Address->getRegion());
        }
 
        /**
@@ -221,7 +187,7 @@
        public function testSetStreetAddress()
        {
                $this->Address->setStreetAddress('streetaddress');
-               $this->assertEquals('streetaddress', 
$this->Address->streetAddress);
+               $this->assertEquals('streetaddress', 
$this->Address->getStreetAddress());
        }
 
        /**
@@ -230,15 +196,15 @@
        public function testSetType()
        {
                $this->Address->setType('type');
-               $this->assertEquals('type', $this->Address->type);
+               $this->assertEquals('type', $this->Address->getType());
        }
 
        /**
-        * Tests Address->setUnstructuredAddress()
+        * Tests Address->setFormatted()
         */
-       public function testSetUnstructuredAddress()
+       public function testSetFormatted()
        {
-               $this->Address->setUnstructuredAddress('unstructuredaddress');
-               $this->assertEquals('unstructuredaddress', 
$this->Address->unstructuredAddress);
+               $this->Address->setFormatted('unstructuredaddress');
+               $this->assertEquals('unstructuredaddress', 
$this->Address->getFormatted());
        }
 }

Modified: incubator/shindig/trunk/php/test/social-api/EmailTest.php
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/test/social-api/EmailTest.php?rev=693302&r1=693301&r2=693302&view=diff
==============================================================================
--- incubator/shindig/trunk/php/test/social-api/EmailTest.php (original)
+++ incubator/shindig/trunk/php/test/social-api/EmailTest.php Mon Sep  8 
15:27:22 2008
@@ -46,14 +46,6 @@
        }
 
        /**
-        * Tests Email->getAddress()
-        */
-       public function testGetAddress()
-       {
-               $this->assertEquals('ADDRESS', $this->Email->getAddress());
-       }
-
-       /**
         * Tests Email->getType()
         */
        public function testGetType()
@@ -66,8 +58,8 @@
         */
        public function testSetAddress()
        {
-               $this->Email->setAddress('address');
-               $this->assertEquals('address', $this->Email->address);
+               $this->Email->setValue('address');
+               $this->assertEquals('address', $this->Email->getValue());
        }
 
        /**
@@ -76,6 +68,6 @@
        public function testSetType()
        {
                $this->Email->setType('type');
-               $this->assertEquals('type', $this->Email->type);
+               $this->assertEquals('type', $this->Email->getType());
        }
 }

Modified: incubator/shindig/trunk/php/test/social-api/NameTest.php
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/test/social-api/NameTest.php?rev=693302&r1=693301&r2=693302&view=diff
==============================================================================
--- incubator/shindig/trunk/php/test/social-api/NameTest.php (original)
+++ incubator/shindig/trunk/php/test/social-api/NameTest.php Mon Sep  8 
15:27:22 2008
@@ -128,7 +128,7 @@
        public function testGetUnstructured()
        {
                $this->Name->unstructured = $this->unstructured;
-               $this->assertEquals($this->Name->getUnstructured(), 
$this->unstructured);
+               $this->assertEquals($this->Name->getFormatted(), 
$this->unstructured);
        }
 
        /**
@@ -137,7 +137,7 @@
        public function testSetAdditionalName()
        {
                $this->Name->setAdditionalName($this->additionalName);
-               $this->assertEquals($this->Name->additionalName, 
$this->additionalName);
+               $this->assertEquals($this->Name->getAdditionalName(), 
$this->additionalName);
        }
 
        /**
@@ -146,7 +146,7 @@
        public function testSetFamilyName()
        {
                $this->Name->setFamilyName($this->familyName);
-               $this->assertEquals($this->Name->familyName, $this->familyName);
+               $this->assertEquals($this->Name->getFamilyName(), 
$this->familyName);
        }
 
        /**
@@ -155,7 +155,7 @@
        public function testSetGivenName()
        {
                $this->Name->setGivenName($this->givenName);
-               $this->assertEquals($this->Name->givenName, $this->givenName);
+               $this->assertEquals($this->Name->getGivenName(), 
$this->givenName);
        }
 
        /**
@@ -164,7 +164,7 @@
        public function testSetHonorificPrefix()
        {
                $this->Name->setHonorificPrefix($this->honorificPrefix);
-               $this->assertEquals($this->Name->honorificPrefix, 
$this->honorificPrefix);
+               $this->assertEquals($this->Name->getHonorificPrefix(), 
$this->honorificPrefix);
        
        }
 
@@ -174,7 +174,7 @@
        public function testSetHonorificSuffix()
        {
                $this->Name->setHonorificSuffix($this->honorificSuffix);
-               $this->assertEquals($this->Name->honorificSuffix, 
$this->honorificSuffix);
+               $this->assertEquals($this->Name->getHonorificSuffix(), 
$this->honorificSuffix);
        }
 
        /**
@@ -182,7 +182,7 @@
         */
        public function testSetUnstructured()
        {
-               $this->Name->setUnstructured($this->unstructured);
-               $this->assertEquals($this->Name->unstructured, 
$this->unstructured);
+               $this->Name->setFormatted($this->unstructured);
+               $this->assertEquals($this->Name->getFormatted(), 
$this->unstructured);
        }
 }

Modified: incubator/shindig/trunk/php/test/social-api/PersonTest.php
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/test/social-api/PersonTest.php?rev=693302&r1=693301&r2=693302&view=diff
==============================================================================
--- incubator/shindig/trunk/php/test/social-api/PersonTest.php (original)
+++ incubator/shindig/trunk/php/test/social-api/PersonTest.php Mon Sep  8 
15:27:22 2008
@@ -178,7 +178,8 @@
         */
        public function testGetDateOfBirth()
        {
-               $this->assertEquals('DATEOFBIRTH', 
$this->Person->getDateOfBirth());
+               $this->Person->setBirthday('DATEOFBIRTH');
+               $this->assertEquals('DATEOFBIRTH', 
$this->Person->getBirthday());
        }
 
        /**
@@ -230,9 +231,8 @@
         */
        public function testGetGender()
        {
-               $gender = new EnumGender('FEMALE');
                $this->Person->setGender('FEMALE');
-               $this->assertEquals($gender, $this->Person->getGender());
+               $this->assertEquals('FEMALE', $this->Person->getGender());
        }
 
        /**
@@ -309,14 +309,6 @@
        }
 
        /**
-        * Tests Person->getJobs()
-        */
-       public function testGetJobs()
-       {
-               $this->assertEquals('JOBS', $this->Person->getJobs());
-       }
-
-       /**
         * Tests Person->getLanguagesSpoken()
         */
        public function testGetLanguagesSpoken()
@@ -472,14 +464,6 @@
        }
 
        /**
-        * Tests Person->getSchools()
-        */
-       public function testGetSchools()
-       {
-               $this->assertEquals('SCHOOLS', $this->Person->getSchools());
-       }
-
-       /**
         * Tests Person->getSexualOrientation()
         */
        public function testGetSexualOrientation()
@@ -530,14 +514,6 @@
        }
 
        /**
-        * Tests Person->getTimeZone()
-        */
-       public function testGetTimeZone()
-       {
-               $this->assertEquals('TIMEZONE', $this->Person->getTimeZone());
-       }
-
-       /**
         * Tests Person->getTurnOffs()
         */
        public function testGetTurnOffs()
@@ -655,8 +631,8 @@
         */
        public function testSetDateOfBirth()
        {
-               $this->Person->setDateOfBirth('dateofbirth');
-               $this->assertEquals('dateofbirth', $this->Person->dateOfBirth);
+               $this->Person->setBirthday('dateofbirth');
+               $this->assertEquals('dateofbirth', 
$this->Person->getBirthday());
        }
 
        /**
@@ -710,7 +686,7 @@
        public function testSetGender()
        {
                $this->Person->setGender('MALE');
-               $this->assertEquals('Male', 
$this->Person->gender->displayValue);
+               $this->assertEquals('MALE', $this->Person->gender);
        }
 
        /**
@@ -795,15 +771,6 @@
        }
 
        /**
-        * Tests Person->setJobs()
-        */
-       public function testSetJobs()
-       {
-               $this->Person->setJobs('jobs');
-               $this->assertEquals('jobs', $this->Person->jobs);
-       }
-
-       /**
         * Tests Person->setLanguagesSpoken()
         */
        public function testSetLanguagesSpoken()
@@ -975,15 +942,6 @@
        }
 
        /**
-        * Tests Person->setSchools()
-        */
-       public function testSetSchools()
-       {
-               $this->Person->setSchools('schools');
-               $this->assertEquals('schools', $this->Person->schools);
-       }
-
-       /**
         * Tests Person->setSexualOrientation()
         */
        public function testSetSexualOrientation()
@@ -1038,15 +996,6 @@
        }
 
        /**
-        * Tests Person->setTimeZone()
-        */
-       public function testSetTimeZone()
-       {
-               $this->Person->setTimeZone('timezone');
-               $this->assertEquals('timezone', $this->Person->timeZone);
-       }
-
-       /**
         * Tests Person->setTurnOffs()
         */
        public function testSetTurnOffs()

Modified: incubator/shindig/trunk/php/test/social-api/PhoneTest.php
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/test/social-api/PhoneTest.php?rev=693302&r1=693301&r2=693302&view=diff
==============================================================================
--- incubator/shindig/trunk/php/test/social-api/PhoneTest.php (original)
+++ incubator/shindig/trunk/php/test/social-api/PhoneTest.php Mon Sep  8 
15:27:22 2008
@@ -50,7 +50,7 @@
         */
        public function testGetNumber()
        {
-               $this->assertEquals('number', $this->Phone->getNumber());
+               $this->assertEquals('number', $this->Phone->getValue());
        }
 
        /**
@@ -66,8 +66,8 @@
         */
        public function testSetNumber()
        {
-               $this->Phone->setNumber('NUMBER');
-               $this->assertEquals('NUMBER', $this->Phone->number);
+               $this->Phone->setValue('NUMBER');
+               $this->assertEquals('NUMBER', $this->Phone->getValue());
        }
 
        /**

Modified: incubator/shindig/trunk/php/test/social-api/UrlTest.php
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/test/social-api/UrlTest.php?rev=693302&r1=693301&r2=693302&view=diff
==============================================================================
--- incubator/shindig/trunk/php/test/social-api/UrlTest.php (original)
+++ incubator/shindig/trunk/php/test/social-api/UrlTest.php Mon Sep  8 15:27:22 
2008
@@ -33,7 +33,7 @@
        protected function setUp()
        {
                parent::setUp();
-               $this->Url = new Url('A', 'L', 'T');
+               $this->Url = new Url('A', 'T', 'L');
        }
 
        /**
@@ -50,7 +50,7 @@
         */
        public function testGetAddress()
        {
-               $this->assertEquals('A', $this->Url->getAddress());
+               $this->assertEquals('A', $this->Url->getValue());
        }
 
        /**
@@ -74,8 +74,8 @@
         */
        public function testSetAddress()
        {
-               $this->Url->setAddress('a');
-               $this->assertEquals('a', $this->Url->address);
+               $this->Url->setValue('a');
+               $this->assertEquals('a', $this->Url->getValue());
        }
 
        /**
@@ -84,7 +84,7 @@
        public function testSetLinkText()
        {
                $this->Url->setLinkText('l');
-               $this->assertEquals('l', $this->Url->linkText);
+               $this->assertEquals('l', $this->Url->getLinkText());
        }
 
        /**


Reply via email to