Example #1
0
 public function test_querying()
 {
     $model = new Example();
     $backend = new MockBackend();
     $model->set_backend($backend);
     $model->filter("username", "test");
     $model->filter("username", "again", "!=");
     $model->order("testorder");
     $model->limit(5);
     $model->offset(2);
     $this->assertEquals(2, count($backend->query["filter"]));
     $this->assertEquals("testorder", $backend->query["order"]);
     $this->assertEquals(5, $backend->query["limit"]);
     $this->assertEquals(2, $backend->query["offset"]);
 }