From 4d59587320160248838036163ef205fc5730efc4 Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Fri, 29 Mar 2013 01:10:03 +0100 Subject: [PATCH] fixed constructor overriding in test classes now use setUp() instead --- tests/unit/MysqlTestCase.php | 4 ++-- tests/unit/framework/caching/DbCacheTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/MysqlTestCase.php b/tests/unit/MysqlTestCase.php index d62f95e..e1a1f7e 100644 --- a/tests/unit/MysqlTestCase.php +++ b/tests/unit/MysqlTestCase.php @@ -4,7 +4,7 @@ namespace yiiunit; class MysqlTestCase extends TestCase { - function __construct() + protected function setUp() { if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) { $this->markTestSkipped('pdo and pdo_mysql extensions are required.'); @@ -15,7 +15,7 @@ class MysqlTestCase extends TestCase * @param bool $reset whether to clean up the test database * @return \yii\db\Connection */ - function getConnection($reset = true) + public function getConnection($reset = true) { $params = $this->getParam('mysql'); $db = new \yii\db\Connection; diff --git a/tests/unit/framework/caching/DbCacheTest.php b/tests/unit/framework/caching/DbCacheTest.php index 3977ee8..594e946 100644 --- a/tests/unit/framework/caching/DbCacheTest.php +++ b/tests/unit/framework/caching/DbCacheTest.php @@ -11,7 +11,7 @@ class DbCacheTest extends CacheTest private $_cacheInstance; private $_connection; - function __construct() + protected function setUp() { if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) { $this->markTestSkipped('pdo and pdo_mysql extensions are required.');