Don't hide E_WARNING in unit tests

This commit is contained in:
Kijin Sung 2016-01-08 13:49:22 +09:00
parent f8ca668982
commit afbbc965ab
3 changed files with 4 additions and 3 deletions

View file

@ -8,4 +8,4 @@ settings:
bootstrap: _bootstrap.php bootstrap: _bootstrap.php
colors: true colors: true
memory_limit: 1024M memory_limit: 1024M
error_level: "E_ALL & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED & ~E_NOTICE" error_level: "E_ALL & ~E_STRICT & ~E_DEPRECATED & ~E_NOTICE"

View file

@ -27,7 +27,8 @@ class ContextTest extends \Codeception\TestCase\Test
public function testSetGetVars() public function testSetGetVars()
{ {
$this->assertEquals(Context::get('var1'), null); $this->assertEquals(Context::get('var1'), null);
context::set('var1', 'val1'); Context::getInstance()->context = new stdClass;
Context::set('var1', 'val1');
$this->assertEquals(Context::get('var1'), 'val1'); $this->assertEquals(Context::get('var1'), 'val1');
Context::set('var2', 'val2'); Context::set('var2', 'val2');

View file

@ -10,7 +10,7 @@ class ValidatorTest extends \Codeception\TestCase\Test
public function _before() public function _before()
{ {
global $lang; global $lang;
if(!$lang) $lang = new stdClass();
$lang->filter = new stdClass(); $lang->filter = new stdClass();
$lang->filter->isnull = 'isnull'; $lang->filter->isnull = 'isnull';
$lang->filter->outofrange = 'outofrange'; $lang->filter->outofrange = 'outofrange';