Skip to content

Commit

Permalink
Remove dummy method from ControllerHome
Browse files Browse the repository at this point in the history
  • Loading branch information
toopay committed Feb 4, 2013
1 parent e56d959 commit 5b08799
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
15 changes: 2 additions & 13 deletions app/Controller/ControllerHome.php
Expand Up @@ -27,20 +27,9 @@ public function actionIndex()
}
// @codeCoverageIgnoreEnd

return $this->redirect('home/foo');
}

/**
* Handler untuk GET/POST /home/foo
*
* Tips : try access GET /home/foo/<numeric>
*/
public function actionFoo()
{
$id = $this->request->get('id');
$data = array(
'title' => 'PHP Indonesia - Bar',
'content' => 'You are in Bar '.$id,
'title' => 'PHP Indonesia - Bersama Berkarya Berjaya',
'content' => 'Portal PHP Indonesia sedang dalam pembangunan.',
);

return $this->render($data);
Expand Down
13 changes: 0 additions & 13 deletions tests/Controller/ControllerHomeTest.php
Expand Up @@ -33,19 +33,6 @@ public function testCekActionIndexAppControllerHome()
$controllerHome = new ControllerHome($request);
$response = $controllerHome->actionIndex();

$this->assertInstanceOf('\Symfony\Component\HttpFoundation\RedirectResponse', $response);
$this->assertEquals(302, $response->getStatusCode());
}

/**
* Cek action foo
*/
public function testCekActionFooAppControllerHome()
{
$request = Request::create('/home/index');
$controllerHome = new ControllerHome($request);
$response = $controllerHome->actionFoo();

$this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response);
$this->assertEquals(200, $response->getStatusCode());
}
Expand Down

0 comments on commit 5b08799

Please sign in to comment.