Esempio n. 1
0
 function test_table_info()
 {
     $conn = $this->getGateway()->getDbConnection();
     $this->add_record1();
     $this->add_record2();
     $info = TDbMetaData::getInstance($conn)->getTableInfo('address');
     $table = new TTableGateway($info, $conn);
     $this->assertEquals(count($table->findAll()->readAll()), 2);
 }
Esempio n. 2
0
 function test_insert()
 {
     $table = new TTableGateway('table1', $this->get_conn());
     $this->assertTrue(is_int($table->insert(array('name' => 'cool'))));
 }