Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
0310935e
Commit
0310935e
authored
Dec 10, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed test breaks.
parent
41685a24
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
19 deletions
+13
-19
ElasticSearchTestCase.php
...s/unit/extensions/elasticsearch/ElasticSearchTestCase.php
+2
-3
MongoDbTestCase.php
tests/unit/extensions/mongodb/MongoDbTestCase.php
+2
-3
RedisCacheTest.php
tests/unit/extensions/redis/RedisCacheTest.php
+2
-3
RedisTestCase.php
tests/unit/extensions/redis/RedisTestCase.php
+2
-3
SphinxTestCase.php
tests/unit/extensions/sphinx/SphinxTestCase.php
+2
-3
MailerTest.php
tests/unit/extensions/swiftmailer/MailerTest.php
+2
-3
MessageTest.php
tests/unit/extensions/swiftmailer/MessageTest.php
+1
-1
No files found.
tests/unit/extensions/elasticsearch/ElasticSearchTestCase.php
View file @
0310935e
...
@@ -6,7 +6,7 @@ use Yii;
...
@@ -6,7 +6,7 @@ use Yii;
use
yii\elasticsearch\Connection
;
use
yii\elasticsearch\Connection
;
use
yiiunit\TestCase
;
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
* ElasticSearchTestCase is the base class for all elasticsearch related test cases
...
@@ -48,4 +48,4 @@ class ElasticSearchTestCase extends TestCase
...
@@ -48,4 +48,4 @@ class ElasticSearchTestCase extends TestCase
}
}
return
$db
;
return
$db
;
}
}
}
}
\ No newline at end of file
tests/unit/extensions/mongodb/MongoDbTestCase.php
View file @
0310935e
...
@@ -57,7 +57,7 @@ class MongoDbTestCase extends TestCase
...
@@ -57,7 +57,7 @@ class MongoDbTestCase extends TestCase
protected
static
function
loadClassMap
()
protected
static
function
loadClassMap
()
{
{
$baseNameSpace
=
'yii/mongodb'
;
$baseNameSpace
=
'yii/mongodb'
;
$basePath
=
realpath
(
__DIR__
.
'/../../../../extensions/mongodb'
);
$basePath
=
realpath
(
__DIR__
.
'/../../../../extensions/
yii/
mongodb'
);
$files
=
FileHelper
::
findFiles
(
$basePath
);
$files
=
FileHelper
::
findFiles
(
$basePath
);
foreach
(
$files
as
$file
)
{
foreach
(
$files
as
$file
)
{
$classRelativePath
=
str_replace
(
$basePath
,
''
,
$file
);
$classRelativePath
=
str_replace
(
$basePath
,
''
,
$file
);
...
@@ -146,4 +146,4 @@ class MongoDbTestCase extends TestCase
...
@@ -146,4 +146,4 @@ class MongoDbTestCase extends TestCase
$buildInfo
=
$connection
->
getDatabase
()
->
executeCommand
([
'buildinfo'
=>
true
]);
$buildInfo
=
$connection
->
getDatabase
()
->
executeCommand
([
'buildinfo'
=>
true
]);
return
$buildInfo
[
'version'
];
return
$buildInfo
[
'version'
];
}
}
}
}
\ No newline at end of file
tests/unit/extensions/redis/RedisCacheTest.php
View file @
0310935e
...
@@ -6,7 +6,7 @@ use yii\redis\Cache;
...
@@ -6,7 +6,7 @@ use yii\redis\Cache;
use
yii\redis\Connection
;
use
yii\redis\Connection
;
use
yiiunit\framework\caching\CacheTestCase
;
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
* Class for testing redis cache backend
...
@@ -98,4 +98,4 @@ class RedisCacheTest extends CacheTestCase
...
@@ -98,4 +98,4 @@ class RedisCacheTest extends CacheTestCase
$this
->
assertTrue
(
$cache
->
get
(
$key
)
===
$data
);
$this
->
assertTrue
(
$cache
->
get
(
$key
)
===
$data
);
}
}
}
}
\ No newline at end of file
tests/unit/extensions/redis/RedisTestCase.php
View file @
0310935e
...
@@ -6,7 +6,7 @@ use Yii;
...
@@ -6,7 +6,7 @@ use Yii;
use
yii\redis\Connection
;
use
yii\redis\Connection
;
use
yiiunit\TestCase
;
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
* RedisTestCase is the base class for all redis related test cases
...
@@ -45,4 +45,4 @@ abstract class RedisTestCase extends TestCase
...
@@ -45,4 +45,4 @@ abstract class RedisTestCase extends TestCase
}
}
return
$db
;
return
$db
;
}
}
}
}
\ No newline at end of file
tests/unit/extensions/sphinx/SphinxTestCase.php
View file @
0310935e
...
@@ -72,7 +72,7 @@ class SphinxTestCase extends TestCase
...
@@ -72,7 +72,7 @@ class SphinxTestCase extends TestCase
protected
static
function
loadClassMap
()
protected
static
function
loadClassMap
()
{
{
$baseNameSpace
=
'yii/sphinx'
;
$baseNameSpace
=
'yii/sphinx'
;
$basePath
=
realpath
(
__DIR__
.
'/../../../../extensions/sphinx'
);
$basePath
=
realpath
(
__DIR__
.
'/../../../../extensions/
yii/
sphinx'
);
$files
=
FileHelper
::
findFiles
(
$basePath
);
$files
=
FileHelper
::
findFiles
(
$basePath
);
foreach
(
$files
as
$file
)
{
foreach
(
$files
as
$file
)
{
$classRelativePath
=
str_replace
(
$basePath
,
''
,
$file
);
$classRelativePath
=
str_replace
(
$basePath
,
''
,
$file
);
...
@@ -151,4 +151,4 @@ class SphinxTestCase extends TestCase
...
@@ -151,4 +151,4 @@ class SphinxTestCase extends TestCase
$this
->
db
=
$db
;
$this
->
db
=
$db
;
return
$db
;
return
$db
;
}
}
}
}
\ No newline at end of file
tests/unit/extensions/swiftmailer/MailerTest.php
View file @
0310935e
...
@@ -6,7 +6,7 @@ use Yii;
...
@@ -6,7 +6,7 @@ use Yii;
use
yii\swiftmailer\Mailer
;
use
yii\swiftmailer\Mailer
;
use
yiiunit\VendorTestCase
;
use
yiiunit\VendorTestCase
;
Yii
::
setAlias
(
'@yii/swiftmailer'
,
__DIR__
.
'/../../../../extensions/swiftmailer'
);
Yii
::
setAlias
(
'@yii/swiftmailer'
,
__DIR__
.
'/../../../../extensions/
yii/
swiftmailer'
);
/**
/**
* @group vendor
* @group vendor
...
@@ -121,4 +121,4 @@ class MailerTest extends VendorTestCase
...
@@ -121,4 +121,4 @@ class MailerTest extends VendorTestCase
$mailer
=
new
Mailer
();
$mailer
=
new
Mailer
();
$this
->
assertTrue
(
is_object
(
$mailer
->
getSwiftMailer
()),
'Unable to get Swift mailer instance!'
);
$this
->
assertTrue
(
is_object
(
$mailer
->
getSwiftMailer
()),
'Unable to get Swift mailer instance!'
);
}
}
}
}
\ No newline at end of file
tests/unit/extensions/swiftmailer/MessageTest.php
View file @
0310935e
...
@@ -8,7 +8,7 @@ use yii\swiftmailer\Mailer;
...
@@ -8,7 +8,7 @@ use yii\swiftmailer\Mailer;
use
yii\swiftmailer\Message
;
use
yii\swiftmailer\Message
;
use
yiiunit\VendorTestCase
;
use
yiiunit\VendorTestCase
;
Yii
::
setAlias
(
'@yii/swiftmailer'
,
__DIR__
.
'/../../../../extensions/swiftmailer'
);
Yii
::
setAlias
(
'@yii/swiftmailer'
,
__DIR__
.
'/../../../../extensions/
yii/
swiftmailer'
);
/**
/**
* @group vendor
* @group vendor
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment