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
dc110a9c
Commit
dc110a9c
authored
Feb 07, 2014
by
Tobias Munk
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
4a201c7a
' into feature/toolbar-ui-2
parents
2f552665
4a201c7a
Hide whitespace changes
Inline
Side-by-side
Showing
51 changed files
with
34 additions
and
77 deletions
+34
-77
LoginForm.php
apps/advanced/common/models/LoginForm.php
+0
-1
ContactPage.php
apps/basic/tests/_pages/ContactPage.php
+4
-4
LoginPage.php
apps/basic/tests/_pages/LoginPage.php
+3
-4
Context.php
extensions/apidoc/models/Context.php
+0
-1
FunctionDoc.php
extensions/apidoc/models/FunctionDoc.php
+0
-1
PropertyDoc.php
extensions/apidoc/models/PropertyDoc.php
+1
-1
TypeDoc.php
extensions/apidoc/models/TypeDoc.php
+0
-1
Renderer.php
extensions/apidoc/templates/bootstrap/Renderer.php
+0
-1
AssetBundle.php
extensions/apidoc/templates/bootstrap/assets/AssetBundle.php
+0
-1
guide.php
extensions/apidoc/templates/bootstrap/layouts/guide.php
+0
-1
main.php
extensions/apidoc/templates/bootstrap/layouts/main.php
+0
-3
Renderer.php
extensions/apidoc/templates/offline/Renderer.php
+0
-4
AssetBundle.php
extensions/apidoc/templates/offline/assets/AssetBundle.php
+0
-1
Renderer.php
extensions/apidoc/templates/online/Renderer.php
+0
-2
AuthAction.php
extensions/authclient/AuthAction.php
+1
-1
Module.php
extensions/debug/Module.php
+15
-3
Generator.php
extensions/gii/generators/model/Generator.php
+1
-1
ActiveRecord.php
extensions/mongodb/ActiveRecord.php
+0
-2
Session.php
extensions/mongodb/Session.php
+0
-2
ActiveQuery.php
extensions/redis/ActiveQuery.php
+1
-1
Connection.php
extensions/redis/Connection.php
+0
-1
LuaScriptBuilder.php
extensions/redis/LuaScriptBuilder.php
+1
-1
IndexSchema.php
extensions/sphinx/IndexSchema.php
+0
-1
ActiveQueryTrait.php
framework/db/ActiveQueryTrait.php
+0
-1
BaseConsole.php
framework/helpers/BaseConsole.php
+1
-1
BaseStringHelper.php
framework/helpers/BaseStringHelper.php
+0
-2
Customer.php
tests/unit/data/ar/Customer.php
+0
-1
Customer.php
tests/unit/data/ar/mongodb/Customer.php
+0
-2
ActiveRecord.php
tests/unit/data/ar/redis/ActiveRecord.php
+0
-2
Customer.php
tests/unit/data/ar/redis/Customer.php
+0
-1
ArticleIndex.php
tests/unit/data/ar/sphinx/ArticleIndex.php
+0
-2
BaseOAuthTest.php
tests/unit/extensions/authclient/BaseOAuthTest.php
+0
-1
CollectionTest.php
tests/unit/extensions/authclient/CollectionTest.php
+0
-1
ActiveRecordTest.php
tests/unit/extensions/elasticsearch/ActiveRecordTest.php
+0
-4
ActiveRecordTest.php
tests/unit/extensions/redis/ActiveRecordTest.php
+0
-1
RedisConnectionTest.php
tests/unit/extensions/redis/RedisConnectionTest.php
+0
-2
ExternalActiveRelationTest.php
tests/unit/extensions/sphinx/ExternalActiveRelationTest.php
+0
-1
SchemaTest.php
tests/unit/extensions/sphinx/SchemaTest.php
+0
-1
ActiveRecordTestTrait.php
tests/unit/framework/ar/ActiveRecordTestTrait.php
+0
-1
ActiveRecordTest.php
tests/unit/framework/db/ActiveRecordTest.php
+0
-1
QueryBuilderTest.php
tests/unit/framework/db/QueryBuilderTest.php
+0
-1
CubridActiveRecordTest.php
tests/unit/framework/db/cubrid/CubridActiveRecordTest.php
+0
-1
PostgreSQLConnectionTest.php
tests/unit/framework/db/pgsql/PostgreSQLConnectionTest.php
+1
-1
SqliteActiveRecordTest.php
tests/unit/framework/db/sqlite/SqliteActiveRecordTest.php
+0
-1
LoggerTest.php
tests/unit/framework/log/LoggerTest.php
+0
-2
TargetTest.php
tests/unit/framework/log/TargetTest.php
+0
-2
CompareValidatorTest.php
tests/unit/framework/validators/CompareValidatorTest.php
+1
-1
ExistValidatorTest.php
tests/unit/framework/validators/ExistValidatorTest.php
+1
-1
FilterValidatorTest.php
tests/unit/framework/validators/FilterValidatorTest.php
+1
-1
RangeValidatorTest.php
tests/unit/framework/validators/RangeValidatorTest.php
+1
-1
CacheSessionTest.php
tests/unit/framework/web/CacheSessionTest.php
+1
-1
No files found.
apps/advanced/common/models/LoginForm.php
View file @
dc110a9c
<?php
namespace
common\models
;
use
common\models\User
;
use
yii\base\Model
;
use
Yii
;
...
...
apps/basic/tests/_pages/ContactPage.php
View file @
dc110a9c
...
...
@@ -13,10 +13,10 @@ class ContactPage extends BasePage
*/
public
function
submit
(
array
$contactData
)
{
$data
=
[];
foreach
(
$contactData
as
$name
=>
$value
)
{
$
data
[
"ContactForm[
$name
]"
]
=
$value
;
foreach
(
$contactData
as
$field
=>
$value
)
{
$inputType
=
$field
===
'body'
?
'textarea'
:
'input'
;
$
this
->
guy
->
fillField
(
$inputType
.
'[name="ContactForm['
.
$field
.
']"]'
,
$value
)
;
}
$this
->
guy
->
submitForm
(
'#contact-form'
,
$data
);
$this
->
guy
->
click
(
'Submit'
,
'#contact-form'
);
}
}
apps/basic/tests/_pages/LoginPage.php
View file @
dc110a9c
...
...
@@ -14,9 +14,8 @@ class LoginPage extends BasePage
*/
public
function
login
(
$username
,
$password
)
{
$this
->
guy
->
submitForm
(
'#login-form'
,
[
'LoginForm[username]'
=>
$username
,
'LoginForm[password]'
=>
$password
,
]);
$this
->
guy
->
fillField
(
'input[name="LoginForm[username]"]'
,
$username
);
$this
->
guy
->
fillField
(
'input[name="LoginForm[password]"]'
,
$password
);
$this
->
guy
->
click
(
'Login'
,
'#login-form'
);
}
}
extensions/apidoc/models/Context.php
View file @
dc110a9c
...
...
@@ -9,7 +9,6 @@ namespace yii\apidoc\models;
use
phpDocumentor\Reflection\FileReflector
;
use
yii\base\Component
;
use
yii\base\Exception
;
/**
*
...
...
extensions/apidoc/models/FunctionDoc.php
View file @
dc110a9c
...
...
@@ -11,7 +11,6 @@ use phpDocumentor\Reflection\DocBlock\Tag\ParamTag;
use
phpDocumentor\Reflection\DocBlock\Tag\PropertyTag
;
use
phpDocumentor\Reflection\DocBlock\Tag\ReturnTag
;
use
phpDocumentor\Reflection\DocBlock\Tag\ThrowsTag
;
use
yii\base\Exception
;
/**
* Represents API documentation information for a `function`.
...
...
extensions/apidoc/models/PropertyDoc.php
View file @
dc110a9c
...
...
@@ -63,7 +63,7 @@ class PropertyDoc extends BaseDoc
$this
->
defaultValue
=
PrettyPrinter
::
getRepresentationOfValue
(
$reflector
->
getNode
()
->
default
);
}
foreach
(
$this
->
tags
as
$
i
=>
$
tag
)
{
foreach
(
$this
->
tags
as
$tag
)
{
if
(
$tag
instanceof
VarTag
)
{
$this
->
type
=
$tag
->
getType
();
$this
->
types
=
$tag
->
getTypes
();
...
...
extensions/apidoc/models/TypeDoc.php
View file @
dc110a9c
...
...
@@ -8,7 +8,6 @@
namespace
yii\apidoc\models
;
use
phpDocumentor\Reflection\DocBlock\Tag\AuthorTag
;
use
yii\base\Exception
;
use
yii\helpers\StringHelper
;
/**
...
...
extensions/apidoc/templates/bootstrap/Renderer.php
View file @
dc110a9c
...
...
@@ -11,7 +11,6 @@ use yii\apidoc\models\Context;
use
yii\console\Controller
;
use
Yii
;
use
yii\helpers\Console
;
use
yii\helpers\FileHelper
;
/**
*
...
...
extensions/apidoc/templates/bootstrap/assets/AssetBundle.php
View file @
dc110a9c
...
...
@@ -6,7 +6,6 @@
*/
namespace
yii\apidoc\templates\bootstrap\assets
;
use
yii\web\JqueryAsset
;
use
yii\web\View
;
/**
...
...
extensions/apidoc/templates/bootstrap/layouts/guide.php
View file @
dc110a9c
<?php
use
yii\apidoc\templates\bootstrap\SideNavWidget
;
use
yii\helpers\StringHelper
;
/**
* @var yii\web\View $this
...
...
extensions/apidoc/templates/bootstrap/layouts/main.php
View file @
dc110a9c
<?php
use
yii\apidoc\templates\bootstrap\SideNavWidget
;
use
yii\bootstrap\Nav
;
use
yii\bootstrap\NavBar
;
use
yii\helpers\Html
;
use
yii\helpers\StringHelper
;
use
yii\widgets\Menu
;
/**
* @var yii\web\View $this
...
...
extensions/apidoc/templates/offline/Renderer.php
View file @
dc110a9c
...
...
@@ -6,11 +6,7 @@
*/
namespace
yii\apidoc\templates\offline
;
use
yii\apidoc\models\Context
;
use
yii\console\Controller
;
use
Yii
;
use
yii\helpers\Console
;
use
yii\helpers\FileHelper
;
/**
*
...
...
extensions/apidoc/templates/offline/assets/AssetBundle.php
View file @
dc110a9c
...
...
@@ -6,7 +6,6 @@
*/
namespace
yii\apidoc\templates\offline\assets
;
use
yii\web\JqueryAsset
;
use
yii\web\View
;
/**
...
...
extensions/apidoc/templates/online/Renderer.php
View file @
dc110a9c
...
...
@@ -11,8 +11,6 @@ use yii\apidoc\models\TypeDoc;
use
yii\console\Controller
;
use
Yii
;
use
yii\helpers\Console
;
use
yii\helpers\FileHelper
;
use
yii\helpers\StringHelper
;
/**
*
...
...
extensions/authclient/AuthAction.php
View file @
dc110a9c
...
...
@@ -315,7 +315,7 @@ class AuthAction extends Action
return
Yii
::
$app
->
getResponse
()
->
redirect
(
$url
);
}
else
{
// Upgrade to access token.
$
accessToken
=
$
client
->
fetchAccessToken
();
$client
->
fetchAccessToken
();
return
$this
->
authSuccess
(
$client
);
}
}
...
...
extensions/debug/Module.php
View file @
dc110a9c
...
...
@@ -11,7 +11,6 @@ use Yii;
use
yii\base\Application
;
use
yii\web\View
;
use
yii\web\ForbiddenHttpException
;
use
yii\helpers\ArrayHelper
;
/**
* The Yii Debug Module provides the debug toolbar and debugger
...
...
@@ -40,7 +39,8 @@ class Module extends \yii\base\Module
/**
* @var array list of debug panels. The array keys are the panel IDs, and values are the corresponding
* panel class names or configuration arrays. This will be merged with [[corePanels()]].
* You may set a panel to be false to disable a core panel.
* You may reconfigure a core panel via this property by using the same panel ID.
* You may also disable a core panel by setting it to be false in this property.
*/
public
$panels
=
[];
/**
...
...
@@ -76,7 +76,19 @@ class Module extends \yii\base\Module
Yii
::
$app
->
getView
()
->
on
(
View
::
EVENT_END_BODY
,
[
$this
,
'renderToolbar'
]);
});
$this
->
panels
=
array_filter
(
ArrayHelper
::
merge
(
$this
->
corePanels
(),
$this
->
panels
));
// merge custom panels and core panels so that they are ordered mainly by custom panels
if
(
empty
(
$this
->
panels
))
{
$this
->
panels
=
$this
->
corePanels
();
}
else
{
$corePanels
=
$this
->
corePanels
();
foreach
(
$corePanels
as
$id
=>
$config
)
{
if
(
isset
(
$this
->
panels
[
$id
]))
{
unset
(
$corePanels
[
$id
]);
}
}
$this
->
panels
=
array_filter
(
array_merge
(
$corePanels
,
$this
->
panels
));
}
foreach
(
$this
->
panels
as
$id
=>
$config
)
{
$config
[
'module'
]
=
$this
;
$config
[
'id'
]
=
$id
;
...
...
extensions/gii/generators/model/Generator.php
View file @
dc110a9c
...
...
@@ -252,7 +252,7 @@ class Generator extends \yii\gii\Generator
try
{
$db
=
$this
->
getDbConnection
();
$uniqueIndexes
=
$db
->
getSchema
()
->
findUniqueIndexes
(
$table
);
foreach
(
$uniqueIndexes
as
$
indexName
=>
$
uniqueColumns
)
{
foreach
(
$uniqueIndexes
as
$uniqueColumns
)
{
// Avoid validating auto incrementable columns
if
(
!
$this
->
isUniqueColumnAutoIncrementable
(
$table
,
$uniqueColumns
))
{
$attributesCount
=
count
(
$uniqueColumns
);
...
...
extensions/mongodb/ActiveRecord.php
View file @
dc110a9c
...
...
@@ -8,9 +8,7 @@
namespace
yii\mongodb
;
use
yii\base\InvalidConfigException
;
use
yii\base\InvalidParamException
;
use
yii\db\BaseActiveRecord
;
use
yii\base\UnknownMethodException
;
use
yii\db\StaleObjectException
;
use
yii\helpers\Inflector
;
use
yii\helpers\StringHelper
;
...
...
extensions/mongodb/Session.php
View file @
dc110a9c
...
...
@@ -8,8 +8,6 @@
namespace
yii\mongodb
;
use
Yii
;
use
yii\mongodb\Connection
;
use
yii\mongodb\Query
;
use
yii\base\InvalidConfigException
;
/**
...
...
extensions/redis/ActiveQuery.php
View file @
dc110a9c
...
...
@@ -288,7 +288,7 @@ class ActiveQuery extends \yii\base\Component implements ActiveQueryInterface
if
(
count
(
$this
->
where
)
==
1
)
{
$pks
=
(
array
)
reset
(
$this
->
where
);
}
else
{
foreach
(
$this
->
where
as
$
column
=>
$
values
)
{
foreach
(
$this
->
where
as
$values
)
{
if
(
is_array
(
$values
))
{
// TODO support composite IN for composite PK
throw
new
NotSupportedException
(
'Find by composite PK is not supported by redis ActiveRecord.'
);
...
...
extensions/redis/Connection.php
View file @
dc110a9c
...
...
@@ -8,7 +8,6 @@
namespace
yii\redis
;
use
yii\base\Component
;
use
yii\base\InvalidConfigException
;
use
yii\db\Exception
;
use
yii\helpers\Inflector
;
...
...
extensions/redis/LuaScriptBuilder.php
View file @
dc110a9c
...
...
@@ -336,7 +336,7 @@ EOF;
}
$columnAlias
=
$this
->
addColumn
(
$column
,
$columns
);
$parts
=
[];
foreach
(
$values
as
$
i
=>
$
value
)
{
foreach
(
$values
as
$value
)
{
if
(
is_array
(
$value
))
{
$value
=
isset
(
$value
[
$column
])
?
$value
[
$column
]
:
null
;
}
...
...
extensions/sphinx/IndexSchema.php
View file @
dc110a9c
...
...
@@ -8,7 +8,6 @@
namespace
yii\sphinx
;
use
yii\base\Object
;
use
yii\base\InvalidParamException
;
/**
* IndexSchema represents the metadata of a Sphinx index.
...
...
framework/db/ActiveQueryTrait.php
View file @
dc110a9c
...
...
@@ -6,7 +6,6 @@
*/
namespace
yii\db
;
use
yii\base\InvalidCallException
;
/**
* ActiveQueryTrait implements the common methods and properties for active record query classes.
...
...
framework/helpers/BaseConsole.php
View file @
dc110a9c
...
...
@@ -414,7 +414,7 @@ class BaseConsole
break
;
case
0
:
// ansi reset
$return
=
''
;
for
(
$n
=
$tags
;
$tags
>
0
;
$tags
--
)
{
for
(;
$tags
>
0
;
$tags
--
)
{
$return
.=
'</span>'
;
}
return
$return
;
...
...
framework/helpers/BaseStringHelper.php
View file @
dc110a9c
...
...
@@ -7,8 +7,6 @@
namespace
yii\helpers
;
use
yii\base\InvalidParamException
;
/**
* BaseStringHelper provides concrete implementation for [[StringHelper]].
*
...
...
tests/unit/data/ar/Customer.php
View file @
dc110a9c
<?php
namespace
yiiunit\data\ar
;
use
yii\db\ActiveQuery
;
use
yiiunit\framework\db\ActiveRecordTest
;
/**
...
...
tests/unit/data/ar/mongodb/Customer.php
View file @
dc110a9c
...
...
@@ -2,8 +2,6 @@
namespace
yiiunit\data\ar\mongodb
;
use
yii\mongodb\ActiveQuery
;
class
Customer
extends
ActiveRecord
{
public
static
function
collectionName
()
...
...
tests/unit/data/ar/redis/ActiveRecord.php
View file @
dc110a9c
...
...
@@ -7,8 +7,6 @@
namespace
yiiunit\data\ar\redis
;
use
yii\redis\Connection
;
/**
* ActiveRecord is ...
*
...
...
tests/unit/data/ar/redis/Customer.php
View file @
dc110a9c
...
...
@@ -2,7 +2,6 @@
namespace
yiiunit\data\ar\redis
;
use
yii\redis\ActiveQuery
;
use
yiiunit\extensions\redis\ActiveRecordTest
;
class
Customer
extends
ActiveRecord
...
...
tests/unit/data/ar/sphinx/ArticleIndex.php
View file @
dc110a9c
<?php
namespace
yiiunit\data\ar\sphinx
;
use
yii\sphinx\ActiveQuery
;
class
ArticleIndex
extends
ActiveRecord
{
public
$custom_column
;
...
...
tests/unit/extensions/authclient/BaseOAuthTest.php
View file @
dc110a9c
...
...
@@ -4,7 +4,6 @@ namespace yiiunit\extensions\authclient;
use
yii\authclient\signature\PlainText
;
use
yii\authclient\OAuthToken
;
use
yiiunit\extensions\authclient\TestCase
;
use
yii\authclient\BaseOAuth
;
class
BaseOAuthTest
extends
TestCase
...
...
tests/unit/extensions/authclient/CollectionTest.php
View file @
dc110a9c
...
...
@@ -4,7 +4,6 @@ namespace yiiunit\extensions\authclient;
use
yii\authclient\Collection
;
use
yii\authclient\BaseClient
;
use
yiiunit\extensions\authclient\TestCase
;
class
CollectionTest
extends
TestCase
{
...
...
tests/unit/extensions/elasticsearch/ActiveRecordTest.php
View file @
dc110a9c
...
...
@@ -3,10 +3,8 @@
namespace
yiiunit\extensions\elasticsearch
;
use
yii\base\Event
;
use
yii\base\Exception
;
use
yii\db\BaseActiveRecord
;
use
yii\elasticsearch\Connection
;
use
yii\helpers\Json
;
use
yiiunit\framework\ar\ActiveRecordTestTrait
;
use
yiiunit\data\ar\elasticsearch\ActiveRecord
;
use
yiiunit\data\ar\elasticsearch\Customer
;
...
...
@@ -381,7 +379,6 @@ class ActiveRecordTest extends ElasticSearchTestCase
public
function
testFindAsArrayFields
()
{
$customerClass
=
$this
->
getCustomerClass
();
/** @var TestCase|ActiveRecordTestTrait $this */
// indexBy + asArray
$customers
=
$this
->
callCustomerFind
()
->
asArray
()
->
fields
([
'id'
,
'name'
])
->
all
();
...
...
@@ -456,7 +453,6 @@ class ActiveRecordTest extends ElasticSearchTestCase
public
function
testFindIndexByAsArrayFields
()
{
$customerClass
=
$this
->
getCustomerClass
();
/** @var TestCase|ActiveRecordTestTrait $this */
// indexBy + asArray
$customers
=
$this
->
callCustomerFind
()
->
indexBy
(
'name'
)
->
asArray
()
->
fields
(
'id'
,
'name'
)
->
all
();
...
...
tests/unit/extensions/redis/ActiveRecordTest.php
View file @
dc110a9c
...
...
@@ -2,7 +2,6 @@
namespace
yiiunit\extensions\redis
;
use
yii\redis\ActiveQuery
;
use
yiiunit\data\ar\redis\ActiveRecord
;
use
yiiunit\data\ar\redis\Customer
;
use
yiiunit\data\ar\redis\OrderItem
;
...
...
tests/unit/extensions/redis/RedisConnectionTest.php
View file @
dc110a9c
...
...
@@ -2,8 +2,6 @@
namespace
yiiunit\extensions\redis
;
use
yii\redis\Connection
;
/**
* @group redis
*/
...
...
tests/unit/extensions/sphinx/ExternalActiveRelationTest.php
View file @
dc110a9c
...
...
@@ -6,7 +6,6 @@ use yiiunit\data\ar\sphinx\ActiveRecord;
use
yiiunit\data\ar\ActiveRecord
as
ActiveRecordDb
;
use
yiiunit\data\ar\sphinx\ArticleIndex
;
use
yiiunit\data\ar\sphinx\ArticleDb
;
use
yiiunit\data\ar\sphinx\TagDb
;
/**
* @group sphinx
...
...
tests/unit/extensions/sphinx/SchemaTest.php
View file @
dc110a9c
...
...
@@ -3,7 +3,6 @@
namespace
yiiunit\extensions\sphinx
;
use
yii\caching\FileCache
;
use
yii\sphinx\Schema
;
/**
* @group sphinx
...
...
tests/unit/framework/ar/ActiveRecordTestTrait.php
View file @
dc110a9c
...
...
@@ -206,7 +206,6 @@ trait ActiveRecordTestTrait
public
function
testfindIndexByAsArray
()
{
$customerClass
=
$this
->
getCustomerClass
();
/** @var TestCase|ActiveRecordTestTrait $this */
// indexBy + asArray
$customers
=
$this
->
callCustomerFind
()
->
asArray
()
->
indexBy
(
'name'
)
->
all
();
...
...
tests/unit/framework/db/ActiveRecordTest.php
View file @
dc110a9c
<?php
namespace
yiiunit\framework\db
;
use
yii\db\ActiveQuery
;
use
yiiunit\data\ar\ActiveRecord
;
use
yiiunit\data\ar\Customer
;
use
yiiunit\data\ar\NullValues
;
...
...
tests/unit/framework/db/QueryBuilderTest.php
View file @
dc110a9c
...
...
@@ -2,7 +2,6 @@
namespace
yiiunit\framework\db
;
use
yii\db\Query
;
use
yii\db\QueryBuilder
;
use
yii\db\Schema
;
use
yii\db\mysql\QueryBuilder
as
MysqlQueryBuilder
;
...
...
tests/unit/framework/db/cubrid/CubridActiveRecordTest.php
View file @
dc110a9c
<?php
namespace
yiiunit\framework\db\cubrid
;
use
yiiunit\data\ar\Customer
;
use
yiiunit\framework\db\ActiveRecordTest
;
/**
...
...
tests/unit/framework/db/pgsql/PostgreSQLConnectionTest.php
View file @
dc110a9c
...
...
@@ -13,7 +13,7 @@ class PostgreSQLConnectionTest extends ConnectionTest
public
function
testConnection
()
{
$
connection
=
$
this
->
getConnection
(
true
);
$this
->
getConnection
(
true
);
}
public
function
testQuoteValue
()
...
...
tests/unit/framework/db/sqlite/SqliteActiveRecordTest.php
View file @
dc110a9c
<?php
namespace
yiiunit\framework\db\sqlite
;
use
yiiunit\data\ar\Customer
;
use
yiiunit\framework\db\ActiveRecordTest
;
/**
...
...
tests/unit/framework/log/LoggerTest.php
View file @
dc110a9c
...
...
@@ -6,8 +6,6 @@
namespace
yiiunit\framework\log
;
use
yii\debug\LogTarget
;
use
yii\log\FileTarget
;
use
yii\log\Logger
;
use
yiiunit\TestCase
;
...
...
tests/unit/framework/log/TargetTest.php
View file @
dc110a9c
...
...
@@ -6,8 +6,6 @@
namespace
yiiunit\framework\log
;
use
yii\debug\LogTarget
;
use
yii\log\FileTarget
;
use
yii\log\Logger
;
use
yii\log\Target
;
use
yiiunit\TestCase
;
...
...
tests/unit/framework/validators/CompareValidatorTest.php
View file @
dc110a9c
...
...
@@ -162,7 +162,7 @@ class CompareValidatorTest extends TestCase
$this
->
assertTrue
(
strlen
(
$val
->
message
)
>
1
);
}
try
{
$val
=
new
CompareValidator
([
'operator'
=>
'<>'
]);
new
CompareValidator
([
'operator'
=>
'<>'
]);
}
catch
(
InvalidConfigException
$e
)
{
return
;
}
...
...
tests/unit/framework/validators/ExistValidatorTest.php
View file @
dc110a9c
...
...
@@ -28,7 +28,7 @@ class ExistValidatorTest extends DatabaseTestCase
{
try
{
$val
=
new
ExistValidator
();
$
result
=
$
val
->
validate
(
'ref'
);
$val
->
validate
(
'ref'
);
$this
->
fail
(
'Exception should have been thrown at this time'
);
}
catch
(
Exception
$e
)
{
$this
->
assertInstanceOf
(
'yii\base\InvalidConfigException'
,
$e
);
...
...
tests/unit/framework/validators/FilterValidatorTest.php
View file @
dc110a9c
...
...
@@ -18,7 +18,7 @@ class FilterValidatorTest extends TestCase
public
function
testAssureExceptionOnInit
()
{
$this
->
setExpectedException
(
'yii\base\InvalidConfigException'
);
$val
=
new
FilterValidator
();
new
FilterValidator
();
}
public
function
testValidateAttribute
()
...
...
tests/unit/framework/validators/RangeValidatorTest.php
View file @
dc110a9c
...
...
@@ -18,7 +18,7 @@ class RangeValidatorTest extends TestCase
public
function
testInitException
()
{
$this
->
setExpectedException
(
'yii\base\InvalidConfigException'
,
'The "range" property must be set.'
);
$val
=
new
RangeValidator
([
'range'
=>
'not an array'
]);
new
RangeValidator
([
'range'
=>
'not an array'
]);
}
public
function
testAssureMessageSetOnInit
()
...
...
tests/unit/framework/web/CacheSessionTest.php
View file @
dc110a9c
...
...
@@ -31,6 +31,6 @@ class CacheSessionTest extends \yiiunit\TestCase
public
function
testInvalidCache
()
{
$this
->
setExpectedException
(
'yii\base\InvalidConfigException'
);
$session
=
new
CacheSession
([
'cache'
=>
'invalid'
]);
new
CacheSession
([
'cache'
=>
'invalid'
]);
}
}
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