mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +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
|
* @access public
|
||||||
*/
|
*/
|
||||||
public $fixtures = array('core.category');
|
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
|
* Make sure all fixtures tables are being created
|
||||||
|
@ -319,8 +311,11 @@ class MssqlTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() {
|
||||||
$db = ConnectionManager::getDataSource('test');
|
$this->Dbo = ConnectionManager::getDataSource('test');
|
||||||
$this->db = new MssqlTestDb($db->config);
|
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();
|
$this->model = new MssqlTestModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue