Actually the reason we made them public is because of the json_encoder()'r, if their private or protected their not exported, which considering that these data structures exist to be exported ... would be troublesome :)

        -- Chris

On Aug 8, 2008, at 4:21 PM, Ropu wrote:

to avoid this issue, vars visibility should be protected or private.

just check that in no other place of the code we refer to the vars directly

On Wed, Aug 6, 2008 at 12:27 AM, <[EMAIL PROTECTED]> wrote:

Author: chabotc
Date: Tue Aug  5 16:27:29 2008
New Revision: 683031

URL: http://svn.apache.org/viewvc?rev=683031&view=rev
Log:
Fix up bodyType test, shouldn't use vars directly

Modified:
  incubator/shindig/trunk/php/test/social-api/BodyTypeTest.php

Modified: incubator/shindig/trunk/php/test/social-api/ BodyTypeTest.php
URL:
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/test/social-api/BodyTypeTest.php?rev=683031&r1=683030&r2=683031&view=diff

= = = = = = = = = ===================================================================== --- incubator/shindig/trunk/php/test/social-api/BodyTypeTest.php (original) +++ incubator/shindig/trunk/php/test/social-api/BodyTypeTest.php Tue Aug 5
16:27:29 2008
@@ -63,7 +63,7 @@
       */
      public function testGetEyeColor()
      {
- $this->assertEquals('EYECOLOR', $this->BodyType- >eyeColor);
+               $this->assertEquals('EYECOLOR',
$this->BodyType->getEyeColor());
      }

      /**
@@ -71,7 +71,7 @@
       */
      public function testGetHairColor()
      {
-               $this->assertEquals('HAIRCOLOR',
$this->BodyType->hairColor);
+               $this->assertEquals('HAIRCOLOR',
$this->BodyType->getHairColor());
      }

      /**
@@ -79,7 +79,7 @@
       */
      public function testGetHeight()
      {
- $this->assertEquals('HEIGHT', $this->BodyType- >height);
+               $this->assertEquals('HEIGHT',
$this->BodyType->getHeight());
      }

      /**
@@ -87,7 +87,7 @@
       */
      public function testGetWeight()
      {
- $this->assertEquals('WEIGHT', $this->BodyType- >weight);
+               $this->assertEquals('WEIGHT',
$this->BodyType->getWeight());
      }

      /**
@@ -96,7 +96,7 @@
      public function testSetBuild()
      {
              $this->BodyType->setBuild('build');
-               $this->assertEquals('build', $this->BodyType->build);
+ $this->assertEquals('build', $this->BodyType- >getBuild());
      }

      /**
@@ -105,7 +105,7 @@
      public function testSetEyeColor()
      {
              $this->BodyType->setEyeColor('eyecolor');
- $this->assertEquals('eyecolor', $this->BodyType- >eyeColor);
+               $this->assertEquals('eyecolor',
$this->BodyType->getEyeColor());
      }

      /**
@@ -114,7 +114,7 @@
      public function testSetHairColor()
      {
              $this->BodyType->setHairColor('haircolor');
-               $this->assertEquals('haircolor',
$this->BodyType->hairColor);
+               $this->assertEquals('haircolor',
$this->BodyType->getHairColor());
      }

      /**
@@ -123,7 +123,7 @@
      public function testSetHeight()
      {
              $this->BodyType->setHeight('height');
- $this->assertEquals('height', $this->BodyType- >height);
+               $this->assertEquals('height',
$this->BodyType->getHeight());
      }

      /**
@@ -132,6 +132,6 @@
      public function testSetWeight()
      {
              $this->BodyType->setWeight('weight');
- $this->assertEquals('weight', $this->BodyType- >weight);
+               $this->assertEquals('weight',
$this->BodyType->getWeight());
      }
}





--
.-. --- .--. ..-
R  o  p  u

Reply via email to