mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Changed the test setup to not run the test if test db config is not mssql.
This commit is contained in:
parent
9dfc7d6593
commit
8b78507b3d
1 changed files with 5 additions and 10 deletions
|
@ -287,14 +287,6 @@ class MssqlTest extends CakeTestCase {
|
|||
* @access public
|
||||
*/
|
||||
public $fixtures = array('core.category');
|
||||
/**
|
||||
* Skip if cannot connect to mssql
|
||||
*
|
||||
*/
|
||||
public function skip() {
|
||||
$this->_initDb();
|
||||
$this->skipUnless($this->db->config['driver'] == 'mssql', '%s SQL Server connection not available');
|
||||
}
|
||||
|
||||
/**
|
||||
* Make sure all fixtures tables are being created
|
||||
|
@ -319,8 +311,11 @@ class MssqlTest extends CakeTestCase {
|
|||
*
|
||||
*/
|
||||
public function setUp() {
|
||||
$db = ConnectionManager::getDataSource('test');
|
||||
$this->db = new MssqlTestDb($db->config);
|
||||
$this->Dbo = ConnectionManager::getDataSource('test');
|
||||
if (!($this->Dbo instanceof Mssql)) {
|
||||
$this->markTestSkipped('Please configure the test datasource to use SQL Server.');
|
||||
}
|
||||
$this->db = new MssqlTestDb($this->Dbo->config);
|
||||
$this->model = new MssqlTestModel();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue