Abstract Class Misago\ActionController\TestCase

Functional tests for ActionControllers.

<?php
class Test_StoriesController extends ActionControllerTest
{
  function test_index()
  {
    $this->run_action(stories_path());
    $this->assert_response(200);
    $this->assert_select('.stories li', 4);
  }
}
new Test_StoriesController();
?>

IMPROVE: Use TestRequest instead of calling a test server.

Inheritence

Extends:
Misago

Methods

Public instance methods

__construct()

Protected instance methods

run_action($method, $uri=null, $postfields=null, $files=null)

Executes an action on test server.

$this->run_action('GET', '/accounts');
$this->run_action('PUT', '/accounts',
  array('account' => array('user_name' => 'azeroth'));

$this->run_action(new_account_path());
$this->run_action(delete_account_path());