From 0310935e48a090da4e8fec3243e581692284cd51 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Tue, 10 Dec 2013 00:12:17 -0500 Subject: [PATCH] fixed test breaks. --- tests/unit/extensions/elasticsearch/ElasticSearchTestCase.php | 4 ++-- tests/unit/extensions/mongodb/MongoDbTestCase.php | 4 ++-- tests/unit/extensions/redis/RedisCacheTest.php | 4 ++-- tests/unit/extensions/redis/RedisTestCase.php | 4 ++-- tests/unit/extensions/sphinx/SphinxTestCase.php | 4 ++-- tests/unit/extensions/swiftmailer/MailerTest.php | 4 ++-- tests/unit/extensions/swiftmailer/MessageTest.php | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/unit/extensions/elasticsearch/ElasticSearchTestCase.php b/tests/unit/extensions/elasticsearch/ElasticSearchTestCase.php index e0435a7..e68613a 100644 --- a/tests/unit/extensions/elasticsearch/ElasticSearchTestCase.php +++ b/tests/unit/extensions/elasticsearch/ElasticSearchTestCase.php @@ -6,7 +6,7 @@ use Yii; use yii\elasticsearch\Connection; use yiiunit\TestCase; -Yii::setAlias('@yii/elasticsearch', __DIR__ . '/../../../../extensions/elasticsearch'); +Yii::setAlias('@yii/elasticsearch', __DIR__ . '/../../../../extensions/yii/elasticsearch'); /** * ElasticSearchTestCase is the base class for all elasticsearch related test cases @@ -48,4 +48,4 @@ class ElasticSearchTestCase extends TestCase } return $db; } -} \ No newline at end of file +} diff --git a/tests/unit/extensions/mongodb/MongoDbTestCase.php b/tests/unit/extensions/mongodb/MongoDbTestCase.php index 8177c44..df60b28 100644 --- a/tests/unit/extensions/mongodb/MongoDbTestCase.php +++ b/tests/unit/extensions/mongodb/MongoDbTestCase.php @@ -57,7 +57,7 @@ class MongoDbTestCase extends TestCase protected static function loadClassMap() { $baseNameSpace = 'yii/mongodb'; - $basePath = realpath(__DIR__. '/../../../../extensions/mongodb'); + $basePath = realpath(__DIR__. '/../../../../extensions/yii/mongodb'); $files = FileHelper::findFiles($basePath); foreach ($files as $file) { $classRelativePath = str_replace($basePath, '', $file); @@ -146,4 +146,4 @@ class MongoDbTestCase extends TestCase $buildInfo = $connection->getDatabase()->executeCommand(['buildinfo' => true]); return $buildInfo['version']; } -} \ No newline at end of file +} diff --git a/tests/unit/extensions/redis/RedisCacheTest.php b/tests/unit/extensions/redis/RedisCacheTest.php index a235bb5..4122947 100644 --- a/tests/unit/extensions/redis/RedisCacheTest.php +++ b/tests/unit/extensions/redis/RedisCacheTest.php @@ -6,7 +6,7 @@ use yii\redis\Cache; use yii\redis\Connection; use yiiunit\framework\caching\CacheTestCase; -Yii::setAlias('@yii/redis', __DIR__ . '/../../../../extensions/redis'); +Yii::setAlias('@yii/redis', __DIR__ . '/../../../../extensions/yii/redis'); /** * Class for testing redis cache backend @@ -98,4 +98,4 @@ class RedisCacheTest extends CacheTestCase $this->assertTrue($cache->get($key)===$data); } -} \ No newline at end of file +} diff --git a/tests/unit/extensions/redis/RedisTestCase.php b/tests/unit/extensions/redis/RedisTestCase.php index ed4dccd..fd37a10 100644 --- a/tests/unit/extensions/redis/RedisTestCase.php +++ b/tests/unit/extensions/redis/RedisTestCase.php @@ -6,7 +6,7 @@ use Yii; use yii\redis\Connection; use yiiunit\TestCase; -Yii::setAlias('@yii/redis', __DIR__ . '/../../../../extensions/redis'); +Yii::setAlias('@yii/redis', __DIR__ . '/../../../../extensions/yii/redis'); /** * RedisTestCase is the base class for all redis related test cases @@ -45,4 +45,4 @@ abstract class RedisTestCase extends TestCase } return $db; } -} \ No newline at end of file +} diff --git a/tests/unit/extensions/sphinx/SphinxTestCase.php b/tests/unit/extensions/sphinx/SphinxTestCase.php index 899ea72..c8c2ae5 100644 --- a/tests/unit/extensions/sphinx/SphinxTestCase.php +++ b/tests/unit/extensions/sphinx/SphinxTestCase.php @@ -72,7 +72,7 @@ class SphinxTestCase extends TestCase protected static function loadClassMap() { $baseNameSpace = 'yii/sphinx'; - $basePath = realpath(__DIR__. '/../../../../extensions/sphinx'); + $basePath = realpath(__DIR__. '/../../../../extensions/yii/sphinx'); $files = FileHelper::findFiles($basePath); foreach ($files as $file) { $classRelativePath = str_replace($basePath, '', $file); @@ -151,4 +151,4 @@ class SphinxTestCase extends TestCase $this->db = $db; return $db; } -} \ No newline at end of file +} diff --git a/tests/unit/extensions/swiftmailer/MailerTest.php b/tests/unit/extensions/swiftmailer/MailerTest.php index ce88711..90edeaf 100644 --- a/tests/unit/extensions/swiftmailer/MailerTest.php +++ b/tests/unit/extensions/swiftmailer/MailerTest.php @@ -6,7 +6,7 @@ use Yii; use yii\swiftmailer\Mailer; use yiiunit\VendorTestCase; -Yii::setAlias('@yii/swiftmailer', __DIR__ . '/../../../../extensions/swiftmailer'); +Yii::setAlias('@yii/swiftmailer', __DIR__ . '/../../../../extensions/yii/swiftmailer'); /** * @group vendor @@ -121,4 +121,4 @@ class MailerTest extends VendorTestCase $mailer = new Mailer(); $this->assertTrue(is_object($mailer->getSwiftMailer()), 'Unable to get Swift mailer instance!'); } -} \ No newline at end of file +} diff --git a/tests/unit/extensions/swiftmailer/MessageTest.php b/tests/unit/extensions/swiftmailer/MessageTest.php index 31a5c43..31ec727 100644 --- a/tests/unit/extensions/swiftmailer/MessageTest.php +++ b/tests/unit/extensions/swiftmailer/MessageTest.php @@ -8,7 +8,7 @@ use yii\swiftmailer\Mailer; use yii\swiftmailer\Message; use yiiunit\VendorTestCase; -Yii::setAlias('@yii/swiftmailer', __DIR__ . '/../../../../extensions/swiftmailer'); +Yii::setAlias('@yii/swiftmailer', __DIR__ . '/../../../../extensions/yii/swiftmailer'); /** * @group vendor