<commit_before><?php
namespace Rest\Api\Endpoint;

use \Rest\Api\DataObject;

/**
 * Class IndexTest
 *
 * @package Rest\Api\Endpoint
 */
class IndexTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var \Rest\Api\Endpoint\Index
     */
    private $_candidate = null;

    public function setUp()
    {
        parent::setUp();

        $this->_candidate = new Index();
    }

    /**
     * @param array      $data
     * @param DataObject $result
     *
     * @dataProvider getProvider
     */
    public function testGet(array $data, DataObject $result)
    {
        $this->_candidate->setdata($data);

        $actual = $this->_candidate->get();

        $this->assertEquals($result, $actual);
    }

    public function getProvider()
    {
        return array(
            array(
                'data'   => array(
                    array(
                        'name' => 'mockUri1',
                    ),
                    array(
                        'name' => 'mockUri2',
                    ),
                ),
                'result' => new DataObject(
                    array(),
                    array(
                        'welcome' => 'Welcome.',
                    ),
                    array(
                        'mockUri1' => '/mockUri1',
                        'mockUri2' => '/mockUri2',
                    )
                ),
            ),
        );
    }
}
<commit_msg>fix index endpoint unit test<commit_after><?php
namespace Rest\Api\Endpoint;

use \Rest\Api\DataObject;

/**
 * Class IndexTest
 *
 * @package Rest\Api\Endpoint
 */
class IndexTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var \Rest\Api\Endpoint\Index
     */
    private $_candidate = null;

    public function setUp()
    {
        parent::setUp();
    }

    /**
     * @param array      $data
     * @param DataObject $result
     *
     * @dataProvider getProvider
     */
    public function testGet(array $data, DataObject $result)
    {
        $this->_candidate = new Index($data);

        $actual = $this->_candidate->get();

        $this->assertEquals($result, $actual);
    }

    public function getProvider()
    {
        return array(
            array(
                'data'   => array(
                    'mockUri1',
                    'mockUri2',
                ),
                'result' => new DataObject(
                    array(),
                    array(
                        'welcome' => 'Welcome.',
                    ),
                    array(
                        'mockUri1' => '/mockUri1',
                        'mockUri2' => '/mockUri2',
                    )
                ),
            ),
        );
    }
}

{'fraction_non_alphanumeric': 0.12546125461254612, 'fraction_numerical': 0.004428044280442804, 'mean_word_length': 1.1464766429136974, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, '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': '7573540', 'n_tokens_mistral': 743, 'n_tokens_neox': 701, 'n_words': 139}