Skip to content
Permalink
Browse files

Improving migration of DboMysqlTest to phpunit

  • Loading branch information...
lorenzo committed Jun 10, 2010
1 parent a8328f3 commit b3d9de1a9733167d5e7d71502c39c46108bcce98
Showing with 6 additions and 28 deletions.
  1. +6 −28 cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php
@@ -167,21 +167,17 @@ class DboMysqlTest extends CakeTestCase {
*/
public $Dbo = null;
/**
* Skip if cannot connect to mysql
*
*/
public function skip() {
$this->_initDb();
$this->skipUnless($this->Dbo->config['driver'] == 'mysql', '%s MySQL connection not available');
}
/**
* Sets up a Dbo class instance for testing
*
*/
public function startTest() {
public function setUp() {
$this->Dbo = ConnectionManager::getDataSource('test_suite');
if ($this->Dbo->config['driver'] !== 'mysql') {
$this->markTestSkipped('The MySQL extension is not available.');
}
$this->_debug = Configure::read('debug');
Configure::write('debug', 1);
$this->model = new MysqlTestModel();
}
@@ -192,24 +188,6 @@ public function startTest() {
public function tearDown() {
unset($this->model);
ClassRegistry::flush();
}
/**
* startCase
*
* @return void
*/
function startCase() {
$this->_debug = Configure::read('debug');
Configure::write('debug', 1);
}
/**
* endCase
*
* @return void
*/
function endCase() {
Configure::write('debug', $this->_debug);
}

0 comments on commit b3d9de1

Please sign in to comment.
You can’t perform that action at this time.