Skip to content

Commit

Permalink
修正单元测试
Browse files Browse the repository at this point in the history
  • Loading branch information
yunwuxin committed Jul 13, 2016
1 parent 2b57472 commit 9ad3215
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/InfoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ class InfoTest extends TestCase

public function testOpen()
{
$this->setExpectedException(Exception::class);
$this->setExpectedException("\\think\\image\\Exception");
Image::open('');
}

public function testIllegal()
{
$this->setExpectedException(Exception::class, 'Illegal image file');
$this->setExpectedException("\\think\\image\\Exception", 'Illegal image file');
Image::open(TEST_PATH . 'images/test.bmp');
}

Expand Down
3 changes: 2 additions & 1 deletion tests/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
define('TEST_PATH', __DIR__ . '/');
// 加载框架基础文件
require __DIR__ . '/../thinkphp/base.php';
\think\Loader::addNamespace('tests', TEST_PATH);
\think\Loader::addNamespace('tests', TEST_PATH);
\think\Loader::addNamespace('think\\image', __DIR__ . '/../src/');

0 comments on commit 9ad3215

Please sign in to comment.