예제 #1
0
 /**
  * @inheritdoc
  */
 public function getRelationship($key)
 {
     if (!$this->has($key)) {
         throw new RuntimeException("Relationship member '{$key}' is not present.");
     }
     $value = parent::get($key);
     if (!is_object($value)) {
         throw new RuntimeException("Relationship member '{$key}' is not an object.'");
     }
     return new Relationship($value);
 }
 /**
  * @depends testIterator
  */
 public function testCount(StandardObject $object)
 {
     $this->assertEquals(count($object->toArray()), count($object));
 }