Extends
lithium\test\Unit
Skip the test if a MySQL adapter configuration is unavailable.
Source
public function skip() {
$this->skipIf(!MySql::enabled(), 'MySQL Extension is not loaded');
$this->_dbConfig = Connections::get('test', array('config' => true));
$hasDb = (isset($this->_dbConfig['adapter']) && $this->_dbConfig['adapter'] == 'MySql');
$message = 'Test database is either unavailable, or not using a MySQL adapter';
$this->skipIf(!$hasDb, $message);
$this->db = new MySql($this->_dbConfig);
$lithium = LITHIUM_LIBRARY_PATH . '/lithium';
$sqlFile = $lithium . '/tests/mocks/data/source/database/adapter/mysql_companies.sql';
$sql = file_get_contents($sqlFile);
$this->db->read($sql, array('return' => 'resource'));
}