DatabaseTasks::runTestQuery
protected function DatabaseTasks::runTestQuery
protected DatabaseTasks::runTestQuery($query, $pass, $fail, $fatal = FALSE)
Run SQL tests to ensure the database can execute commands with the current user.
File
- includes/install.inc, line 449
- API functions for installing modules and themes.
Class
- DatabaseTasks
- Database installer structure.
Code
protected function runTestQuery($query, $pass, $fail, $fatal = FALSE) { try { db_query($query); $this->pass(st($pass)); } catch (Exception $e) { $this->fail(st($fail, array('%query' => $query, '%error' => $e->getMessage(), '%name' => $this->name()))); return !$fatal; } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!install.inc/function/DatabaseTasks::runTestQuery/7.x