public function setUp() { if (!Sqlite::isPresent()) { $this->markTestSkipped('No SQLite support detected'); } $this->db = new MockDatabaseSqlite(); if (version_compare($this->db->getServerVersion(), '3.6.0', '<')) { $this->markTestSkipped("SQLite at least 3.6 required, {$this->db->getServerVersion()} found"); } }
private function checkSyntax() { if (!Sqlite::isPresent()) { $this->error("Error: SQLite support not found\n"); } $files = [$this->getOption('check-syntax')]; $files = array_merge($files, $this->mArgs); $result = Sqlite::checkSqlSyntax($files); if ($result === true) { $this->output("SQL syntax check: no errors detected.\n"); } else { $this->error("Error: {$result}\n"); } }