Moving setExpectedException

This commit is contained in:
Vyacheslav Agafonov
2011-12-02 12:25:47 +04:00
parent 1f1551aea1
commit 0fda3de8b5
16 changed files with 38 additions and 29 deletions

View File

@ -42,14 +42,14 @@ class ConfigTest extends PHPUnit_Framework_TestCase
'three' => 3,
4 => 'four'
);
$this->setExpectedException('GeneralException', 'Configuration variable');
Config::set(0, $arr);
$new_arr = Config::get(0);
$this->assertEquals('ConfigArray', get_class($new_arr));
$this->assertEquals('four', $new_arr->offsetGet(4));
$this->assertEquals(1, $new_arr->one);
$this->assertNotEquals(1, $new_arr->offsetGet('two'));
$this->setExpectedException('GeneralException', 'Configuration variable');
$new_arr->some;
}