You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by ch...@apache.org on 2008/10/09 22:39:36 UTC
svn commit: r703250 - in /incubator/shindig/trunk/php: src/social/model/
test/social/
Author: chabotc
Date: Thu Oct 9 13:39:36 2008
New Revision: 703250
URL: http://svn.apache.org/viewvc?rev=703250&view=rev
Log:
Clean up and/or remove broken tests that were still testing for the old social code base. Also some inconsistencies left after the PC alignment work? need to double check on those enums..
Removed:
incubator/shindig/trunk/php/test/social/ActivitiesHandlerTest.php
incubator/shindig/trunk/php/test/social/AppDataHandlerTest.php
incubator/shindig/trunk/php/test/social/EnumTest.php
incubator/shindig/trunk/php/test/social/JsonDbOpensocialServiceTest.php
incubator/shindig/trunk/php/test/social/MessagesHandlerTest.php
incubator/shindig/trunk/php/test/social/PeopleHandlerTest.php
incubator/shindig/trunk/php/test/social/RestRequestItemTest.php
incubator/shindig/trunk/php/test/social/UserIdTest.php
Modified:
incubator/shindig/trunk/php/src/social/model/Person.php
incubator/shindig/trunk/php/test/social/PersonTest.php
Modified: incubator/shindig/trunk/php/src/social/model/Person.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/social/model/Person.php?rev=703250&r1=703249&r2=703250&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/social/model/Person.php (original)
+++ incubator/shindig/trunk/php/src/social/model/Person.php Thu Oct 9 13:39:36 2008
@@ -241,7 +241,7 @@
public function setDrinker($drinker)
{
- $this->setFieldImpl('drinker', new EnumDrinker($drinker));
+ $this->setFieldImpl('drinker', $drinker);
}
public function getEmails()
@@ -401,7 +401,7 @@
public function setLookingFor($lookingFor)
{
- $this->setFieldImpl('lookingFor', new EnumLookingFor($lookingFor));
+ $this->setFieldImpl('lookingFor', $lookingFor);
}
public function getMovies()
@@ -441,7 +441,7 @@
public function setNetworkPresence($networkPresence)
{
- $this->setFieldImpl('networkPresence', new EnumPresence($networkPresence));
+ $this->setFieldImpl('networkPresence', $networkPresence);
}
public function getNickname()
@@ -602,7 +602,7 @@
public function setSmoker($smoker)
{
- $this->setFieldImpl('smoker', new EnumSmoker($smoker));
+ $this->setFieldImpl('smoker', $smoker);
}
public function getSports()
Modified: incubator/shindig/trunk/php/test/social/PersonTest.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/test/social/PersonTest.php?rev=703250&r1=703249&r2=703250&view=diff
==============================================================================
--- incubator/shindig/trunk/php/test/social/PersonTest.php (original)
+++ incubator/shindig/trunk/php/test/social/PersonTest.php Thu Oct 9 13:39:36 2008
@@ -59,7 +59,7 @@
$this->Person->jobs = 'JOBS';
$this->Person->languagesSpoken = 'LANGUAGESSPOKEN';
$this->Person->livingArrangement = 'LIVINGARRANGEMENT';
- $this->Person->lookingFor = new EnumLookingFor('FRIENDS');
+ //$this->Person->lookingFor = new EnumLookingFor('FRIENDS');
$this->Person->movies = 'MOVIES';
$this->Person->music = 'MUSIC';
$this->Person->networkPresence = 'NETWORKPRESENCE';
@@ -187,9 +187,9 @@
*/
public function testGetDrinker()
{
- $drinker = new EnumDrinker('HEAVILY');
+ //$drinker = new EnumDrinker('HEAVILY');
$this->Person->setDrinker('HEAVILY');
- $this->assertEquals($drinker, $this->Person->getDrinker());
+ $this->assertEquals('HEAVILY', $this->Person->getDrinker());
}
/**
@@ -324,13 +324,6 @@
$this->assertEquals('LIVINGARRANGEMENT', $this->Person->getLivingArrangement());
}
- /**
- * Tests Person->getLookingFor()
- */
- public function testGetLookingFor()
- {
- $this->assertEquals(new EnumLookingFor('FRIENDS'), $this->Person->getLookingFor());
- }
/**
* Tests Person->getMovies()
@@ -361,9 +354,8 @@
*/
public function testGetNetworkPresence()
{
- $presence = new EnumPresence('DND');
$this->Person->setNetworkPresence('DND');
- $this->assertEquals($presence, $this->Person->getNetworkPresence());
+ $this->assertEquals('DND', $this->Person->getNetworkPresence());
}
/**
@@ -476,9 +468,8 @@
*/
public function testGetSmoker()
{
- $smoker = new EnumSmoker('OCCASIONALLY');
$this->Person->setSmoker('OCCASIONALLY');
- $this->assertEquals($smoker, $this->Person->getSmoker());
+ $this->assertEquals('OCCASIONALLY', $this->Person->getSmoker());
}
/**
@@ -636,15 +627,6 @@
}
/**
- * Tests Person->setDrinker()
- */
- public function testSetDrinker()
- {
- $this->Person->setDrinker('NO');
- $this->assertEquals('No', $this->Person->drinker->displayValue);
- }
-
- /**
* Tests Person->setEmails()
*/
public function testSetEmails()
@@ -794,7 +776,7 @@
public function testSetLookingFor()
{
$this->Person->setLookingFor('FRIENDS');
- $this->assertEquals(new EnumLookingFor('FRIENDS'), $this->Person->getLookingFor());
+ $this->assertEquals('FRIENDS', $this->Person->getLookingFor());
}
/**
@@ -825,15 +807,6 @@
}
/**
- * Tests Person->setNetworkPresence()
- */
- public function testSetNetworkPresence()
- {
- $this->Person->setNetworkPresence('AWAY');
- $this->assertEquals('Away', $this->Person->networkPresence->displayValue);
- }
-
- /**
* Tests Person->setNickname()
*/
public function testSetNickname()
@@ -951,15 +924,6 @@
}
/**
- * Tests Person->setSmoker()
- */
- public function testSetSmoker()
- {
- $this->Person->setSmoker('NO');
- $this->assertEquals('No', $this->Person->smoker->displayValue);
- }
-
- /**
* Tests Person->setSports()
*/
public function testSetSports()