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
f2e57b2e
Commit
f2e57b2e
authored
Jul 02, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed test breaks.
parent
12c48d1a
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
40 additions
and
0 deletions
+40
-0
BehaviorTest.php
tests/unit/framework/base/BehaviorTest.php
+6
-0
ComponentTest.php
tests/unit/framework/base/ComponentTest.php
+1
-0
ModelTest.php
tests/unit/framework/base/ModelTest.php
+6
-0
ObjectTest.php
tests/unit/framework/base/ObjectTest.php
+1
-0
AssetControllerTest.php
...nit/framework/console/controllers/AssetControllerTest.php
+1
-0
ActiveRecordTest.php
tests/unit/framework/db/ActiveRecordTest.php
+1
-0
CommandTest.php
tests/unit/framework/db/CommandTest.php
+6
-0
ConnectionTest.php
tests/unit/framework/db/ConnectionTest.php
+6
-0
DatabaseTestCase.php
tests/unit/framework/db/DatabaseTestCase.php
+1
-0
QueryBuilderTest.php
tests/unit/framework/db/QueryBuilderTest.php
+5
-0
QueryTest.php
tests/unit/framework/db/QueryTest.php
+6
-0
No files found.
tests/unit/framework/base/BehaviorTest.php
View file @
f2e57b2e
...
@@ -33,6 +33,12 @@ class BarBehavior extends Behavior
...
@@ -33,6 +33,12 @@ class BarBehavior extends Behavior
class
BehaviorTest
extends
TestCase
class
BehaviorTest
extends
TestCase
{
{
protected
function
setUp
()
{
parent
::
setUp
();
$this
->
mockApplication
();
}
public
function
testAttachAndAccessing
()
public
function
testAttachAndAccessing
()
{
{
$bar
=
new
BarClass
();
$bar
=
new
BarClass
();
...
...
tests/unit/framework/base/ComponentTest.php
View file @
f2e57b2e
...
@@ -27,6 +27,7 @@ class ComponentTest extends TestCase
...
@@ -27,6 +27,7 @@ class ComponentTest extends TestCase
protected
function
setUp
()
protected
function
setUp
()
{
{
parent
::
setUp
();
parent
::
setUp
();
$this
->
mockApplication
();
$this
->
component
=
new
NewComponent
();
$this
->
component
=
new
NewComponent
();
}
}
...
...
tests/unit/framework/base/ModelTest.php
View file @
f2e57b2e
...
@@ -12,6 +12,12 @@ use yiiunit\data\base\InvalidRulesModel;
...
@@ -12,6 +12,12 @@ use yiiunit\data\base\InvalidRulesModel;
*/
*/
class
ModelTest
extends
TestCase
class
ModelTest
extends
TestCase
{
{
protected
function
setUp
()
{
parent
::
setUp
();
$this
->
mockApplication
();
}
public
function
testGetAttributeLabel
()
public
function
testGetAttributeLabel
()
{
{
$speaker
=
new
Speaker
();
$speaker
=
new
Speaker
();
...
...
tests/unit/framework/base/ObjectTest.php
View file @
f2e57b2e
...
@@ -17,6 +17,7 @@ class ObjectTest extends TestCase
...
@@ -17,6 +17,7 @@ class ObjectTest extends TestCase
protected
function
setUp
()
protected
function
setUp
()
{
{
parent
::
setUp
();
parent
::
setUp
();
$this
->
mockApplication
();
$this
->
object
=
new
NewObject
;
$this
->
object
=
new
NewObject
;
}
}
...
...
tests/unit/framework/console/controllers/AssetControllerTest.php
View file @
f2e57b2e
...
@@ -20,6 +20,7 @@ class AssetControllerTest extends TestCase
...
@@ -20,6 +20,7 @@ class AssetControllerTest extends TestCase
public
function
setUp
()
public
function
setUp
()
{
{
$this
->
mockApplication
();
$this
->
testFilePath
=
Yii
::
getAlias
(
'@yiiunit/runtime'
)
.
DIRECTORY_SEPARATOR
.
get_class
(
$this
);
$this
->
testFilePath
=
Yii
::
getAlias
(
'@yiiunit/runtime'
)
.
DIRECTORY_SEPARATOR
.
get_class
(
$this
);
$this
->
createDir
(
$this
->
testFilePath
);
$this
->
createDir
(
$this
->
testFilePath
);
$this
->
testAssetsBasePath
=
$this
->
testFilePath
.
DIRECTORY_SEPARATOR
.
'assets'
;
$this
->
testAssetsBasePath
=
$this
->
testFilePath
.
DIRECTORY_SEPARATOR
.
'assets'
;
...
...
tests/unit/framework/db/ActiveRecordTest.php
View file @
f2e57b2e
...
@@ -14,6 +14,7 @@ class ActiveRecordTest extends DatabaseTestCase
...
@@ -14,6 +14,7 @@ class ActiveRecordTest extends DatabaseTestCase
protected
function
setUp
()
protected
function
setUp
()
{
{
parent
::
setUp
();
parent
::
setUp
();
$this
->
mockApplication
();
ActiveRecord
::
$db
=
$this
->
getConnection
();
ActiveRecord
::
$db
=
$this
->
getConnection
();
}
}
...
...
tests/unit/framework/db/CommandTest.php
View file @
f2e57b2e
...
@@ -9,6 +9,12 @@ use yii\db\DataReader;
...
@@ -9,6 +9,12 @@ use yii\db\DataReader;
class
CommandTest
extends
DatabaseTestCase
class
CommandTest
extends
DatabaseTestCase
{
{
protected
function
setUp
()
{
parent
::
setUp
();
$this
->
mockApplication
();
}
function
testConstruct
()
function
testConstruct
()
{
{
$db
=
$this
->
getConnection
(
false
);
$db
=
$this
->
getConnection
(
false
);
...
...
tests/unit/framework/db/ConnectionTest.php
View file @
f2e57b2e
...
@@ -6,6 +6,12 @@ use yii\db\Connection;
...
@@ -6,6 +6,12 @@ use yii\db\Connection;
class
ConnectionTest
extends
DatabaseTestCase
class
ConnectionTest
extends
DatabaseTestCase
{
{
protected
function
setUp
()
{
parent
::
setUp
();
$this
->
mockApplication
();
}
function
testConstruct
()
function
testConstruct
()
{
{
$connection
=
$this
->
getConnection
(
false
);
$connection
=
$this
->
getConnection
(
false
);
...
...
tests/unit/framework/db/DatabaseTestCase.php
View file @
f2e57b2e
...
@@ -12,6 +12,7 @@ abstract class DatabaseTestCase extends TestCase
...
@@ -12,6 +12,7 @@ abstract class DatabaseTestCase extends TestCase
protected
function
setUp
()
protected
function
setUp
()
{
{
parent
::
setUp
();
parent
::
setUp
();
$this
->
mockApplication
();
$databases
=
$this
->
getParam
(
'databases'
);
$databases
=
$this
->
getParam
(
'databases'
);
$this
->
database
=
$databases
[
$this
->
driverName
];
$this
->
database
=
$databases
[
$this
->
driverName
];
$pdo_database
=
'pdo_'
.
$this
->
driverName
;
$pdo_database
=
'pdo_'
.
$this
->
driverName
;
...
...
tests/unit/framework/db/QueryBuilderTest.php
View file @
f2e57b2e
...
@@ -11,6 +11,11 @@ use yii\db\pgsql\QueryBuilder as PgsqlQueryBuilder;
...
@@ -11,6 +11,11 @@ use yii\db\pgsql\QueryBuilder as PgsqlQueryBuilder;
class
QueryBuilderTest
extends
DatabaseTestCase
class
QueryBuilderTest
extends
DatabaseTestCase
{
{
protected
function
setUp
()
{
parent
::
setUp
();
$this
->
mockApplication
();
}
/**
/**
* @throws \Exception
* @throws \Exception
...
...
tests/unit/framework/db/QueryTest.php
View file @
f2e57b2e
...
@@ -9,6 +9,12 @@ use yii\db\DataReader;
...
@@ -9,6 +9,12 @@ use yii\db\DataReader;
class
QueryTest
extends
DatabaseTestCase
class
QueryTest
extends
DatabaseTestCase
{
{
protected
function
setUp
()
{
parent
::
setUp
();
$this
->
mockApplication
();
}
function
testSelect
()
function
testSelect
()
{
{
// default
// default
...
...
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