Beispiel #1
0
 public function testDelete()
 {
     $this->assertEquals([["id" => "1", "name" => "tim", "notes" => "some blob of data", "favorite_number" => "16"]], $this->tdb->get("test", 1));
     $this->tdb->delete("test", 1);
     // TODO get should return empty array if no records were found
     $this->assertEquals(false, $this->tdb->get("test", 1));
 }
Beispiel #2
0
 public function testRemoveField()
 {
     $this->tdb->add("test", ["name" => "tim"]);
     $this->tdb->removeField("test", "name");
     $record = $this->tdb->get("test", 1);
     $this->assertEquals(1, $record[0]["id"]);
     $this->assertEquals(false, isset($record[0]["name"]));
 }