Пример #1
0
 function init()
 {
     $this->db = $this->add('DB');
     try {
         $this->db->query('drop table author');
     } catch (PDOException $e) {
     }
     try {
         $this->db->query('drop table book');
     } catch (PDOException $e) {
     }
     try {
         $this->db->query('drop table contact');
     } catch (PDOException $e) {
     }
     $this->db->query('create table author (id int not null primary key auto_increment, name varchar(255), email varchar(255), birth date)');
     $this->db->query('create table book (id int not null primary key auto_increment, name varchar(255), isbn varchar(255), pages int, author_id int)');
     $this->db->query('create table contact (id int not null primary key auto_increment, address varchar(255), author_id int)');
     parent::init();
 }
Пример #2
0
 function runTests()
 {
     $this->grid->addColumn('text', 'Test_para');
     return parent::runTests();
 }