Commit dc110a9c by Tobias Munk

Merge commit '4a201c7a' into feature/toolbar-ui-2

parents 2f552665 4a201c7a
<?php <?php
namespace common\models; namespace common\models;
use common\models\User;
use yii\base\Model; use yii\base\Model;
use Yii; use Yii;
......
...@@ -13,10 +13,10 @@ class ContactPage extends BasePage ...@@ -13,10 +13,10 @@ class ContactPage extends BasePage
*/ */
public function submit(array $contactData) public function submit(array $contactData)
{ {
$data = []; foreach ($contactData as $field => $value) {
foreach ($contactData as $name => $value) { $inputType = $field === 'body' ? 'textarea' : 'input';
$data["ContactForm[$name]"] = $value; $this->guy->fillField($inputType . '[name="ContactForm[' . $field . ']"]', $value);
} }
$this->guy->submitForm('#contact-form', $data); $this->guy->click('Submit', '#contact-form');
} }
} }
...@@ -14,9 +14,8 @@ class LoginPage extends BasePage ...@@ -14,9 +14,8 @@ class LoginPage extends BasePage
*/ */
public function login($username, $password) public function login($username, $password)
{ {
$this->guy->submitForm('#login-form', [ $this->guy->fillField('input[name="LoginForm[username]"]',$username);
'LoginForm[username]' => $username, $this->guy->fillField('input[name="LoginForm[password]"]',$password);
'LoginForm[password]' => $password, $this->guy->click('Login','#login-form');
]);
} }
} }
...@@ -9,7 +9,6 @@ namespace yii\apidoc\models; ...@@ -9,7 +9,6 @@ namespace yii\apidoc\models;
use phpDocumentor\Reflection\FileReflector; use phpDocumentor\Reflection\FileReflector;
use yii\base\Component; use yii\base\Component;
use yii\base\Exception;
/** /**
* *
......
...@@ -11,7 +11,6 @@ use phpDocumentor\Reflection\DocBlock\Tag\ParamTag; ...@@ -11,7 +11,6 @@ use phpDocumentor\Reflection\DocBlock\Tag\ParamTag;
use phpDocumentor\Reflection\DocBlock\Tag\PropertyTag; use phpDocumentor\Reflection\DocBlock\Tag\PropertyTag;
use phpDocumentor\Reflection\DocBlock\Tag\ReturnTag; use phpDocumentor\Reflection\DocBlock\Tag\ReturnTag;
use phpDocumentor\Reflection\DocBlock\Tag\ThrowsTag; use phpDocumentor\Reflection\DocBlock\Tag\ThrowsTag;
use yii\base\Exception;
/** /**
* Represents API documentation information for a `function`. * Represents API documentation information for a `function`.
......
...@@ -63,7 +63,7 @@ class PropertyDoc extends BaseDoc ...@@ -63,7 +63,7 @@ class PropertyDoc extends BaseDoc
$this->defaultValue = PrettyPrinter::getRepresentationOfValue($reflector->getNode()->default); $this->defaultValue = PrettyPrinter::getRepresentationOfValue($reflector->getNode()->default);
} }
foreach($this->tags as $i => $tag) { foreach($this->tags as $tag) {
if ($tag instanceof VarTag) { if ($tag instanceof VarTag) {
$this->type = $tag->getType(); $this->type = $tag->getType();
$this->types = $tag->getTypes(); $this->types = $tag->getTypes();
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
namespace yii\apidoc\models; namespace yii\apidoc\models;
use phpDocumentor\Reflection\DocBlock\Tag\AuthorTag; use phpDocumentor\Reflection\DocBlock\Tag\AuthorTag;
use yii\base\Exception;
use yii\helpers\StringHelper; use yii\helpers\StringHelper;
/** /**
......
...@@ -11,7 +11,6 @@ use yii\apidoc\models\Context; ...@@ -11,7 +11,6 @@ use yii\apidoc\models\Context;
use yii\console\Controller; use yii\console\Controller;
use Yii; use Yii;
use yii\helpers\Console; use yii\helpers\Console;
use yii\helpers\FileHelper;
/** /**
* *
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
*/ */
namespace yii\apidoc\templates\bootstrap\assets; namespace yii\apidoc\templates\bootstrap\assets;
use yii\web\JqueryAsset;
use yii\web\View; use yii\web\View;
/** /**
......
<?php <?php
use yii\apidoc\templates\bootstrap\SideNavWidget; use yii\apidoc\templates\bootstrap\SideNavWidget;
use yii\helpers\StringHelper;
/** /**
* @var yii\web\View $this * @var yii\web\View $this
......
<?php <?php
use yii\apidoc\templates\bootstrap\SideNavWidget;
use yii\bootstrap\Nav; use yii\bootstrap\Nav;
use yii\bootstrap\NavBar; use yii\bootstrap\NavBar;
use yii\helpers\Html; use yii\helpers\Html;
use yii\helpers\StringHelper;
use yii\widgets\Menu;
/** /**
* @var yii\web\View $this * @var yii\web\View $this
......
...@@ -6,11 +6,7 @@ ...@@ -6,11 +6,7 @@
*/ */
namespace yii\apidoc\templates\offline; namespace yii\apidoc\templates\offline;
use yii\apidoc\models\Context;
use yii\console\Controller;
use Yii; use Yii;
use yii\helpers\Console;
use yii\helpers\FileHelper;
/** /**
* *
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
*/ */
namespace yii\apidoc\templates\offline\assets; namespace yii\apidoc\templates\offline\assets;
use yii\web\JqueryAsset;
use yii\web\View; use yii\web\View;
/** /**
......
...@@ -11,8 +11,6 @@ use yii\apidoc\models\TypeDoc; ...@@ -11,8 +11,6 @@ use yii\apidoc\models\TypeDoc;
use yii\console\Controller; use yii\console\Controller;
use Yii; use Yii;
use yii\helpers\Console; use yii\helpers\Console;
use yii\helpers\FileHelper;
use yii\helpers\StringHelper;
/** /**
* *
......
...@@ -315,7 +315,7 @@ class AuthAction extends Action ...@@ -315,7 +315,7 @@ class AuthAction extends Action
return Yii::$app->getResponse()->redirect($url); return Yii::$app->getResponse()->redirect($url);
} else { } else {
// Upgrade to access token. // Upgrade to access token.
$accessToken = $client->fetchAccessToken(); $client->fetchAccessToken();
return $this->authSuccess($client); return $this->authSuccess($client);
} }
} }
......
...@@ -11,7 +11,6 @@ use Yii; ...@@ -11,7 +11,6 @@ use Yii;
use yii\base\Application; use yii\base\Application;
use yii\web\View; use yii\web\View;
use yii\web\ForbiddenHttpException; use yii\web\ForbiddenHttpException;
use yii\helpers\ArrayHelper;
/** /**
* The Yii Debug Module provides the debug toolbar and debugger * The Yii Debug Module provides the debug toolbar and debugger
...@@ -40,7 +39,8 @@ class Module extends \yii\base\Module ...@@ -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 * @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()]]. * 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 = []; public $panels = [];
/** /**
...@@ -76,7 +76,19 @@ class Module extends \yii\base\Module ...@@ -76,7 +76,19 @@ class Module extends \yii\base\Module
Yii::$app->getView()->on(View::EVENT_END_BODY, [$this, 'renderToolbar']); 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) { foreach ($this->panels as $id => $config) {
$config['module'] = $this; $config['module'] = $this;
$config['id'] = $id; $config['id'] = $id;
......
...@@ -252,7 +252,7 @@ class Generator extends \yii\gii\Generator ...@@ -252,7 +252,7 @@ class Generator extends \yii\gii\Generator
try { try {
$db = $this->getDbConnection(); $db = $this->getDbConnection();
$uniqueIndexes = $db->getSchema()->findUniqueIndexes($table); $uniqueIndexes = $db->getSchema()->findUniqueIndexes($table);
foreach ($uniqueIndexes as $indexName => $uniqueColumns) { foreach ($uniqueIndexes as $uniqueColumns) {
// Avoid validating auto incrementable columns // Avoid validating auto incrementable columns
if (!$this->isUniqueColumnAutoIncrementable($table, $uniqueColumns)) { if (!$this->isUniqueColumnAutoIncrementable($table, $uniqueColumns)) {
$attributesCount = count($uniqueColumns); $attributesCount = count($uniqueColumns);
......
...@@ -8,9 +8,7 @@ ...@@ -8,9 +8,7 @@
namespace yii\mongodb; namespace yii\mongodb;
use yii\base\InvalidConfigException; use yii\base\InvalidConfigException;
use yii\base\InvalidParamException;
use yii\db\BaseActiveRecord; use yii\db\BaseActiveRecord;
use yii\base\UnknownMethodException;
use yii\db\StaleObjectException; use yii\db\StaleObjectException;
use yii\helpers\Inflector; use yii\helpers\Inflector;
use yii\helpers\StringHelper; use yii\helpers\StringHelper;
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
namespace yii\mongodb; namespace yii\mongodb;
use Yii; use Yii;
use yii\mongodb\Connection;
use yii\mongodb\Query;
use yii\base\InvalidConfigException; use yii\base\InvalidConfigException;
/** /**
......
...@@ -288,7 +288,7 @@ class ActiveQuery extends \yii\base\Component implements ActiveQueryInterface ...@@ -288,7 +288,7 @@ class ActiveQuery extends \yii\base\Component implements ActiveQueryInterface
if (count($this->where) == 1) { if (count($this->where) == 1) {
$pks = (array) reset($this->where); $pks = (array) reset($this->where);
} else { } else {
foreach($this->where as $column => $values) { foreach($this->where as $values) {
if (is_array($values)) { if (is_array($values)) {
// TODO support composite IN for composite PK // TODO support composite IN for composite PK
throw new NotSupportedException('Find by composite PK is not supported by redis ActiveRecord.'); throw new NotSupportedException('Find by composite PK is not supported by redis ActiveRecord.');
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
namespace yii\redis; namespace yii\redis;
use yii\base\Component; use yii\base\Component;
use yii\base\InvalidConfigException;
use yii\db\Exception; use yii\db\Exception;
use yii\helpers\Inflector; use yii\helpers\Inflector;
......
...@@ -336,7 +336,7 @@ EOF; ...@@ -336,7 +336,7 @@ EOF;
} }
$columnAlias = $this->addColumn($column, $columns); $columnAlias = $this->addColumn($column, $columns);
$parts = []; $parts = [];
foreach ($values as $i => $value) { foreach ($values as $value) {
if (is_array($value)) { if (is_array($value)) {
$value = isset($value[$column]) ? $value[$column] : null; $value = isset($value[$column]) ? $value[$column] : null;
} }
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
namespace yii\sphinx; namespace yii\sphinx;
use yii\base\Object; use yii\base\Object;
use yii\base\InvalidParamException;
/** /**
* IndexSchema represents the metadata of a Sphinx index. * IndexSchema represents the metadata of a Sphinx index.
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
*/ */
namespace yii\db; namespace yii\db;
use yii\base\InvalidCallException;
/** /**
* ActiveQueryTrait implements the common methods and properties for active record query classes. * ActiveQueryTrait implements the common methods and properties for active record query classes.
......
...@@ -414,7 +414,7 @@ class BaseConsole ...@@ -414,7 +414,7 @@ class BaseConsole
break; break;
case 0: // ansi reset case 0: // ansi reset
$return = ''; $return = '';
for ($n = $tags; $tags > 0; $tags--) { for (; $tags > 0; $tags--) {
$return .= '</span>'; $return .= '</span>';
} }
return $return; return $return;
......
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
namespace yii\helpers; namespace yii\helpers;
use yii\base\InvalidParamException;
/** /**
* BaseStringHelper provides concrete implementation for [[StringHelper]]. * BaseStringHelper provides concrete implementation for [[StringHelper]].
* *
......
<?php <?php
namespace yiiunit\data\ar; namespace yiiunit\data\ar;
use yii\db\ActiveQuery;
use yiiunit\framework\db\ActiveRecordTest; use yiiunit\framework\db\ActiveRecordTest;
/** /**
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
namespace yiiunit\data\ar\mongodb; namespace yiiunit\data\ar\mongodb;
use yii\mongodb\ActiveQuery;
class Customer extends ActiveRecord class Customer extends ActiveRecord
{ {
public static function collectionName() public static function collectionName()
......
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
namespace yiiunit\data\ar\redis; namespace yiiunit\data\ar\redis;
use yii\redis\Connection;
/** /**
* ActiveRecord is ... * ActiveRecord is ...
* *
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
namespace yiiunit\data\ar\redis; namespace yiiunit\data\ar\redis;
use yii\redis\ActiveQuery;
use yiiunit\extensions\redis\ActiveRecordTest; use yiiunit\extensions\redis\ActiveRecordTest;
class Customer extends ActiveRecord class Customer extends ActiveRecord
......
<?php <?php
namespace yiiunit\data\ar\sphinx; namespace yiiunit\data\ar\sphinx;
use yii\sphinx\ActiveQuery;
class ArticleIndex extends ActiveRecord class ArticleIndex extends ActiveRecord
{ {
public $custom_column; public $custom_column;
......
...@@ -4,7 +4,6 @@ namespace yiiunit\extensions\authclient; ...@@ -4,7 +4,6 @@ namespace yiiunit\extensions\authclient;
use yii\authclient\signature\PlainText; use yii\authclient\signature\PlainText;
use yii\authclient\OAuthToken; use yii\authclient\OAuthToken;
use yiiunit\extensions\authclient\TestCase;
use yii\authclient\BaseOAuth; use yii\authclient\BaseOAuth;
class BaseOAuthTest extends TestCase class BaseOAuthTest extends TestCase
......
...@@ -4,7 +4,6 @@ namespace yiiunit\extensions\authclient; ...@@ -4,7 +4,6 @@ namespace yiiunit\extensions\authclient;
use yii\authclient\Collection; use yii\authclient\Collection;
use yii\authclient\BaseClient; use yii\authclient\BaseClient;
use yiiunit\extensions\authclient\TestCase;
class CollectionTest extends TestCase class CollectionTest extends TestCase
{ {
......
...@@ -3,10 +3,8 @@ ...@@ -3,10 +3,8 @@
namespace yiiunit\extensions\elasticsearch; namespace yiiunit\extensions\elasticsearch;
use yii\base\Event; use yii\base\Event;
use yii\base\Exception;
use yii\db\BaseActiveRecord; use yii\db\BaseActiveRecord;
use yii\elasticsearch\Connection; use yii\elasticsearch\Connection;
use yii\helpers\Json;
use yiiunit\framework\ar\ActiveRecordTestTrait; use yiiunit\framework\ar\ActiveRecordTestTrait;
use yiiunit\data\ar\elasticsearch\ActiveRecord; use yiiunit\data\ar\elasticsearch\ActiveRecord;
use yiiunit\data\ar\elasticsearch\Customer; use yiiunit\data\ar\elasticsearch\Customer;
...@@ -381,7 +379,6 @@ class ActiveRecordTest extends ElasticSearchTestCase ...@@ -381,7 +379,6 @@ class ActiveRecordTest extends ElasticSearchTestCase
public function testFindAsArrayFields() public function testFindAsArrayFields()
{ {
$customerClass = $this->getCustomerClass();
/** @var TestCase|ActiveRecordTestTrait $this */ /** @var TestCase|ActiveRecordTestTrait $this */
// indexBy + asArray // indexBy + asArray
$customers = $this->callCustomerFind()->asArray()->fields(['id', 'name'])->all(); $customers = $this->callCustomerFind()->asArray()->fields(['id', 'name'])->all();
...@@ -456,7 +453,6 @@ class ActiveRecordTest extends ElasticSearchTestCase ...@@ -456,7 +453,6 @@ class ActiveRecordTest extends ElasticSearchTestCase
public function testFindIndexByAsArrayFields() public function testFindIndexByAsArrayFields()
{ {
$customerClass = $this->getCustomerClass();
/** @var TestCase|ActiveRecordTestTrait $this */ /** @var TestCase|ActiveRecordTestTrait $this */
// indexBy + asArray // indexBy + asArray
$customers = $this->callCustomerFind()->indexBy('name')->asArray()->fields('id', 'name')->all(); $customers = $this->callCustomerFind()->indexBy('name')->asArray()->fields('id', 'name')->all();
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
namespace yiiunit\extensions\redis; namespace yiiunit\extensions\redis;
use yii\redis\ActiveQuery;
use yiiunit\data\ar\redis\ActiveRecord; use yiiunit\data\ar\redis\ActiveRecord;
use yiiunit\data\ar\redis\Customer; use yiiunit\data\ar\redis\Customer;
use yiiunit\data\ar\redis\OrderItem; use yiiunit\data\ar\redis\OrderItem;
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
namespace yiiunit\extensions\redis; namespace yiiunit\extensions\redis;
use yii\redis\Connection;
/** /**
* @group redis * @group redis
*/ */
......
...@@ -6,7 +6,6 @@ use yiiunit\data\ar\sphinx\ActiveRecord; ...@@ -6,7 +6,6 @@ use yiiunit\data\ar\sphinx\ActiveRecord;
use yiiunit\data\ar\ActiveRecord as ActiveRecordDb; use yiiunit\data\ar\ActiveRecord as ActiveRecordDb;
use yiiunit\data\ar\sphinx\ArticleIndex; use yiiunit\data\ar\sphinx\ArticleIndex;
use yiiunit\data\ar\sphinx\ArticleDb; use yiiunit\data\ar\sphinx\ArticleDb;
use yiiunit\data\ar\sphinx\TagDb;
/** /**
* @group sphinx * @group sphinx
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
namespace yiiunit\extensions\sphinx; namespace yiiunit\extensions\sphinx;
use yii\caching\FileCache; use yii\caching\FileCache;
use yii\sphinx\Schema;
/** /**
* @group sphinx * @group sphinx
......
...@@ -206,7 +206,6 @@ trait ActiveRecordTestTrait ...@@ -206,7 +206,6 @@ trait ActiveRecordTestTrait
public function testfindIndexByAsArray() public function testfindIndexByAsArray()
{ {
$customerClass = $this->getCustomerClass();
/** @var TestCase|ActiveRecordTestTrait $this */ /** @var TestCase|ActiveRecordTestTrait $this */
// indexBy + asArray // indexBy + asArray
$customers = $this->callCustomerFind()->asArray()->indexBy('name')->all(); $customers = $this->callCustomerFind()->asArray()->indexBy('name')->all();
......
<?php <?php
namespace yiiunit\framework\db; namespace yiiunit\framework\db;
use yii\db\ActiveQuery;
use yiiunit\data\ar\ActiveRecord; use yiiunit\data\ar\ActiveRecord;
use yiiunit\data\ar\Customer; use yiiunit\data\ar\Customer;
use yiiunit\data\ar\NullValues; use yiiunit\data\ar\NullValues;
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
namespace yiiunit\framework\db; namespace yiiunit\framework\db;
use yii\db\Query;
use yii\db\QueryBuilder; use yii\db\QueryBuilder;
use yii\db\Schema; use yii\db\Schema;
use yii\db\mysql\QueryBuilder as MysqlQueryBuilder; use yii\db\mysql\QueryBuilder as MysqlQueryBuilder;
......
<?php <?php
namespace yiiunit\framework\db\cubrid; namespace yiiunit\framework\db\cubrid;
use yiiunit\data\ar\Customer;
use yiiunit\framework\db\ActiveRecordTest; use yiiunit\framework\db\ActiveRecordTest;
/** /**
......
...@@ -13,7 +13,7 @@ class PostgreSQLConnectionTest extends ConnectionTest ...@@ -13,7 +13,7 @@ class PostgreSQLConnectionTest extends ConnectionTest
public function testConnection() public function testConnection()
{ {
$connection = $this->getConnection(true); $this->getConnection(true);
} }
public function testQuoteValue() public function testQuoteValue()
......
<?php <?php
namespace yiiunit\framework\db\sqlite; namespace yiiunit\framework\db\sqlite;
use yiiunit\data\ar\Customer;
use yiiunit\framework\db\ActiveRecordTest; use yiiunit\framework\db\ActiveRecordTest;
/** /**
......
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
namespace yiiunit\framework\log; namespace yiiunit\framework\log;
use yii\debug\LogTarget;
use yii\log\FileTarget;
use yii\log\Logger; use yii\log\Logger;
use yiiunit\TestCase; use yiiunit\TestCase;
......
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
namespace yiiunit\framework\log; namespace yiiunit\framework\log;
use yii\debug\LogTarget;
use yii\log\FileTarget;
use yii\log\Logger; use yii\log\Logger;
use yii\log\Target; use yii\log\Target;
use yiiunit\TestCase; use yiiunit\TestCase;
......
...@@ -162,7 +162,7 @@ class CompareValidatorTest extends TestCase ...@@ -162,7 +162,7 @@ class CompareValidatorTest extends TestCase
$this->assertTrue(strlen($val->message) > 1); $this->assertTrue(strlen($val->message) > 1);
} }
try { try {
$val = new CompareValidator(['operator' => '<>']); new CompareValidator(['operator' => '<>']);
} catch (InvalidConfigException $e) { } catch (InvalidConfigException $e) {
return; return;
} }
......
...@@ -28,7 +28,7 @@ class ExistValidatorTest extends DatabaseTestCase ...@@ -28,7 +28,7 @@ class ExistValidatorTest extends DatabaseTestCase
{ {
try { try {
$val = new ExistValidator(); $val = new ExistValidator();
$result = $val->validate('ref'); $val->validate('ref');
$this->fail('Exception should have been thrown at this time'); $this->fail('Exception should have been thrown at this time');
} catch (Exception $e) { } catch (Exception $e) {
$this->assertInstanceOf('yii\base\InvalidConfigException', $e); $this->assertInstanceOf('yii\base\InvalidConfigException', $e);
......
...@@ -18,7 +18,7 @@ class FilterValidatorTest extends TestCase ...@@ -18,7 +18,7 @@ class FilterValidatorTest extends TestCase
public function testAssureExceptionOnInit() public function testAssureExceptionOnInit()
{ {
$this->setExpectedException('yii\base\InvalidConfigException'); $this->setExpectedException('yii\base\InvalidConfigException');
$val = new FilterValidator(); new FilterValidator();
} }
public function testValidateAttribute() public function testValidateAttribute()
......
...@@ -18,7 +18,7 @@ class RangeValidatorTest extends TestCase ...@@ -18,7 +18,7 @@ class RangeValidatorTest extends TestCase
public function testInitException() public function testInitException()
{ {
$this->setExpectedException('yii\base\InvalidConfigException', 'The "range" property must be set.'); $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() public function testAssureMessageSetOnInit()
......
...@@ -31,6 +31,6 @@ class CacheSessionTest extends \yiiunit\TestCase ...@@ -31,6 +31,6 @@ class CacheSessionTest extends \yiiunit\TestCase
public function testInvalidCache() public function testInvalidCache()
{ {
$this->setExpectedException('yii\base\InvalidConfigException'); $this->setExpectedException('yii\base\InvalidConfigException');
$session = new CacheSession(['cache' => 'invalid']); new CacheSession(['cache' => 'invalid']);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment