Beispiel #1
0
 public function testSaveNewObject()
 {
     $obj = new LeanObject("TestObject");
     $obj->set("name", "Alice in wonderland");
     $obj->set("score", 81);
     $obj->save();
     $this->assertNotEmpty($obj->getObjectId());
     $this->assertNotEmpty($obj->getCreatedAt());
     $this->assertFalse($obj->hasChanges());
     $this->assertEquals($obj->get("score"), 81);
     $obj->destroy();
 }