<commit_before><?php

namespace Bunsen;

/**
 * Controller Test Case
 */
abstract class ControllerTestCase extends \PHPUnit_Framework_TestCase
{
    /**
     * @var \CI_Controller
     */
    protected static $ci;

    /**
     * Fetch and instantiate the controller to test
     *
     * Wrap instantiation in an output buffer to catch errors.
     *
     * @param string $controller Namespaced controller to load
     */
    protected static function loadController($controller)
    {
        ob_start();
        static::$ci = new $controller;
        ob_clean();
    }

    /**
     * Make a request to the controller
     *
     * @params string[] $requestParams Request URI
     */
    public function makeRequest(array $requestParams)
    {
        ob_start();

        self::$ci->router->_set_request($requestParams);
        call_user_func_array([static::$ci, static::$ci->uri->rsegments[1]], array_slice(static::$ci->uri->rsegments, 2));

        echo ob_get_clean();
    }
}<commit_msg>Clean up ControllerTestCase namespacing and comments<commit_after><?php

namespace Bunsen;

use PHPUnit_Framework_TestCase;

/**
 * Controller Test Case
 */
abstract class ControllerTestCase extends PHPUnit_Framework_TestCase
{
    /**
     * @var \CI_Controller
     */
    protected static $ci;

    /**
     * Fetch and instantiate the controller to test
     *
     * Wrap instantiation in an output buffer to catch errors.
     *
     * @param string $controller Controller to load
     */
    protected static function loadController($controller)
    {
        ob_start();
        static::$ci = new $controller;
        ob_clean();
    }

    /**
     * Make a request to the controller
     *
     * @param string[] $requestParams Request URI
     */
    public function makeRequest(array $requestParams)
    {
        ob_start();

        self::$ci->router->_set_request($requestParams);
        call_user_func_array([static::$ci, static::$ci->uri->rsegments[1]], array_slice(static::$ci->uri->rsegments, 2));

        echo ob_get_clean();
    }
}
{'fraction_non_alphanumeric': 0.11506582155046319, 'fraction_numerical': 0.0019502681618722574, 'mean_word_length': 2.670840787119857, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4595605', 'n_tokens_mistral': 577, 'n_tokens_neox': 576, 'n_words': 148}