Exemplo n.º 1
0
 public function testCount()
 {
     $query = new LeanQuery("TestObject");
     $cnt = $query->count();
     $this->assertGreaterThanOrEqual(0, $cnt);
     $obj = new LeanObject("TestObject");
     $id = microtime();
     $obj->set("testid", $id);
     $obj->save();
     $query->equalTo("testid", $id);
     $cnt = $query->count();
     $this->assertEquals(1, $cnt);
     $obj->destroy();
 }