Exemplo n.º 1
0
 public function tearDown()
 {
     parent::tearDown();
 }
 public function test_get_records()
 {
     $types = array('mysql');
     $users = array('root');
     foreach ($types as $i => $type) {
         parent::internal_connect_db($type, $users[$i]);
         parent::reset_db(__DIR__ . '/../setup/testTable.' . $type . '.sql');
         $base = $this->x->get_records();
         $this->assertTrue(is_array($base));
         $this->assertEquals(5, count($base));
         // make sure it was ordered
         $this->assertTrue((bool) preg_match('~ ORDER BY test_id~', $this->x->get_last_query()), "query does not appear to have been ordered: " . $this->x->get_last_query());
     }
 }