/** * test if we can dump the current schema */ public function test_can_dump_schema() { $this->adapter->execute_ddl('DROP TABLE IF EXISTS "animals"'); $this->adapter->execute_ddl("CREATE TABLE animals (id serial primary key, name varchar(32))"); $this->adapter->execute_ddl("CREATE INDEX idx_animals_on_name ON animals(name)"); $file = RUCKUSING_BASE . '/tests/logs/schema.txt'; $this->adapter->schema($file); $this->assertFileExists($file); if (file_exists($file)) { unlink($file); } $this->adapter->execute_ddl('DROP TABLE IF EXISTS "animals"'); }