assertTrue($pdo->connect()); } public function testCreateTable() { global $pdo; $sql_table="DROP TABLE IF EXISTS table_test; CREATE TABLE table_test ( `name` VARCHAR(255) NOT NULL default '', `last_name` VARCHAR(255) NOT NULL default '', `type` INT NOT NULL );"; $this->assertTrue($pdo->query($sql_table, [])); } /** * @depends testCreateTable */ public function testInsert() { global $pdo; $this->assertEquals('table_test', $pdo->table->name); $this->assertTrue($pdo->insert(['name', 'last_name', 'type'], ['first', 'last', '1'])); } /** * @depends testCreateTable */ public function testDropTable() { global $pdo; $this->assertTrue($pdo->query('drop table table_test', [])); } }