Exemplo n.º 1
0
 public function testSaveNewObject()
 {
     $obj = new Object("TestObject");
     $obj->set("name", "Alice in wonderland");
     $obj->set("score", 81);
     $obj->save();
     $this->assertNotEmpty($obj->getObjectId());
     $this->assertNotEmpty($obj->getCreatedAt());
     $this->assertFalse($obj->isDirty());
     $this->assertEquals($obj->get("score"), 81);
     $obj->destroy();
 }