Browse Source
* 'master' of github.com:yiisoft/yii2: Make code coverage work Note about embedded documents added to mongodb extension readme yii\mongodb\file\Collection::ensureMongoId() fixed to suppress exception on invalid _id format. yii\mongodb\file\ActiveRecord::update() fixed to save the attributes while updating file. Fixes #2661: Added boolean column type support for SQLite Refactored controller creation process. Added back some toArray() implementations. Fixed test break. Update console-migrate.md Fixes #2655: Arrayable and ArrayableTrait are incompatible for some PHP versions. Fixes #2659 Minor code style fixes for apidoc Changed assertions fix teststags/2.0.0-beta
Carsten Brandt
11 years ago
39 changed files with 308 additions and 250 deletions
@ -1,23 +0,0 @@
|
||||
<?php |
||||
namespace yiiunit\framework\base; |
||||
|
||||
use yiiunit\TestCase; |
||||
use yii\base\UserException; |
||||
use yii\base\InvalidCallException; |
||||
|
||||
|
||||
class ExceptionTest extends TestCase |
||||
{ |
||||
public function testToArrayWithPrevious() |
||||
{ |
||||
$e = new InvalidCallException('bar', 0 ,new InvalidCallException('foo')); |
||||
$array = $e->toArray(); |
||||
$this->assertEquals('bar', $array['message']); |
||||
$this->assertEquals('foo', $array['previous']['message']); |
||||
|
||||
$e = new InvalidCallException('bar', 0, new UserException('foo')); |
||||
$array = $e->toArray(); |
||||
$this->assertEquals('bar', $array['message']); |
||||
$this->assertEquals('foo', $array['previous']['message']); |
||||
} |
||||
} |
Loading…
Reference in new issue