Пример #1
0
 public function testSaveObjectWithNewChildren()
 {
     $a = new Object("TestObject");
     $b = new Object("TestObject");
     $c = new Object("TestObject");
     $a->set("foo", "aar");
     $b->set("foo", "bar");
     $c->set("foo", "car");
     $a->set("mylikes", array($b, "foo"));
     $a->set("dislikes", array($c, 42));
     $a->save();
     $this->assertNotEmpty($a->getObjectId());
     $this->assertNotEmpty($b->getObjectId());
     $this->assertNotEmpty($c->getObjectId());
     Object::destroyAll(array($a, $b, $c));
 }