Skip to content

Commit

Permalink
add unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
tyoshii committed Aug 30, 2014
1 parent 4a54a6c commit 3f297b8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion fuel/app/classes/controller/top.php
Expand Up @@ -52,6 +52,6 @@ public function action_logout()

public function action_404()
{
return Response::forge(View::forge('errors/404.twig'));
return Response::forge(View::forge('errors/404.twig'), 404);
}
}
13 changes: 13 additions & 0 deletions fuel/app/tests/controller/top.php
Expand Up @@ -111,7 +111,20 @@ public function test_logout処理()
$this->assertFalse(Auth::check());
$this->assertSame(302, $res->status);
}

/**
*
*/
public function test_404ページのテスト()
{
$res = Request::forge('_404_')->execute()->response();

$this->assertSame(404, $res->status);
}

/**
* login_formのテスト
*/
private function _assert_login_form($html)
{
$matcher = array(
Expand Down

0 comments on commit 3f297b8

Please sign in to comment.