Skip to content

Commit 4a1cdfd

Browse files
author
Igor Chepurnoy
committed
update PageActionTest
1 parent d8b0b2f commit 4a1cdfd

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/PageActionTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,8 @@ public function testViewPage()
3434

3535
public function testViewNotExistPage()
3636
{
37-
try {
38-
$this->runAction(['pageId' => 'not exist page']);
39-
} catch (NotFoundHttpException $e) {
40-
$this->assertEquals('The requested page does not exist.', $e->getMessage());
41-
}
37+
$this->setExpectedException('yii\web\NotFoundHttpException');
38+
$this->runAction(['pageId' => 'not exist page']);
4239
}
4340

4441
public function testViewPageWithParams()

0 commit comments

Comments
 (0)