diff --git a/tests/unit/MysqlTestCase.php b/tests/unit/MysqlTestCase.php deleted file mode 100644 index 3c16e03..0000000 --- a/tests/unit/MysqlTestCase.php +++ /dev/null @@ -1,37 +0,0 @@ -markTestSkipped('pdo and pdo_mysql extensions are required.'); - } - } - - /** - * @param bool $reset whether to clean up the test database - * @return \yii\db\Connection - */ - public function getConnection($reset = true) - { - $params = $this->getParam('mysql'); - $db = new \yii\db\Connection; - $db->dsn = $params['dsn']; - $db->username = $params['username']; - $db->password = $params['password']; - if ($reset) { - $db->open(); - $lines = explode(';', file_get_contents($params['fixture'])); - foreach ($lines as $line) { - if (trim($line) !== '') { - $db->pdo->exec($line); - } - } - } - return $db; - } -} diff --git a/tests/unit/TestCase.php b/tests/unit/TestCase.php index 44cb238..479f85d 100644 --- a/tests/unit/TestCase.php +++ b/tests/unit/TestCase.php @@ -5,7 +5,7 @@ namespace yiiunit; /** * This is the base class for all yii framework unit tests. */ -class TestCase extends \yii\test\TestCase +abstract class TestCase extends \yii\test\TestCase { public static $params; diff --git a/tests/unit/framework/caching/ApcCacheTest.php b/tests/unit/framework/caching/ApcCacheTest.php index c059554..17bcb6e 100644 --- a/tests/unit/framework/caching/ApcCacheTest.php +++ b/tests/unit/framework/caching/ApcCacheTest.php @@ -1,12 +1,11 @@