<commit_before><?php

class InflectorTest extends \PHPUnit\Framework\TestCase
{
    /** @var  \GreenCape\CodeGen\Inflector */
    private $inflector;

    private $testData = [
        'title' => 'Test Data',
        'variable' => 'testData',
        'class' => 'TestData',
        'table' => 'test_data',
        'dash' => 'test-data',
    ];

    public function setUp()
    {
        $this->inflector = new GreenCape\CodeGen\Inflector();
    }

    public function inflectionData()
    {
        $cases = [];
        foreach ($this->testData as $key => $value) {
            $cases[$key] = [$key, $value];
        }
        return $cases;
    }

    /**
     * @dataProvider inflectionData
     * @param $filter
     * @param $expected
     */
    public function testConvertFromTitleTo($filter, $expected)
    {
        $this->assertEquals($expected, $this->inflector->apply($filter, $this->testData['title']));
    }

    /**
     * @dataProvider inflectionData
     * @param $filter
     * @param $expected
     */
    public function testConvertFromVariableTo($filter, $expected)
    {
        $this->assertEquals($expected, $this->inflector->apply($filter, $this->testData['variable']));
    }

    /**
     * @dataProvider inflectionData
     * @param $filter
     * @param $expected
     */
    public function testConvertFromClassTo($filter, $expected)
    {
        $this->assertEquals($expected, $this->inflector->apply($filter, $this->testData['class']));
    }

    /**
     * @dataProvider inflectionData
     * @param $filter
     * @param $expected
     */
    public function testConvertFromTableTo($filter, $expected)
    {
        $this->assertEquals($expected, $this->inflector->apply($filter, $this->testData['table']));
    }

    public function numerationData()
    {
        return [
            ['person', 'people'],
            ['test', 'tests'],
            ['entity', 'entities'],
        ];
    }
<commit_msg>Added tests for conversion from dash format<commit_after><?php

class InflectorTest extends \PHPUnit\Framework\TestCase
{
    /** @var  \GreenCape\CodeGen\Inflector */
    private $inflector;

    private $testData = [
        'title' => 'Test Data',
        'variable' => 'testData',
        'class' => 'TestData',
        'table' => 'test_data',
        'dash' => 'test-data',
    ];

    public function setUp()
    {
        $this->inflector = new GreenCape\CodeGen\Inflector();
    }

    public function inflectionData()
    {
        $cases = [];
        foreach ($this->testData as $key => $value) {
            $cases[$key] = [$key, $value];
        }
        return $cases;
    }

    /**
     * @dataProvider inflectionData
     * @param $filter
     * @param $expected
     */
    public function testConvertFromTitleTo($filter, $expected)
    {
        $this->assertEquals($expected, $this->inflector->apply($filter, $this->testData['title']));
    }

    /**
     * @dataProvider inflectionData
     * @param $filter
     * @param $expected
     */
    public function testConvertFromVariableTo($filter, $expected)
    {
        $this->assertEquals($expected, $this->inflector->apply($filter, $this->testData['variable']));
    }

    /**
     * @dataProvider inflectionData
     * @param $filter
     * @param $expected
     */
    public function testConvertFromClassTo($filter, $expected)
    {
        $this->assertEquals($expected, $this->inflector->apply($filter, $this->testData['class']));
    }

    /**
     * @dataProvider inflectionData
     * @param $filter
     * @param $expected
     */
    public function testConvertFromTableTo($filter, $expected)
    {
        $this->assertEquals($expected, $this->inflector->apply($filter, $this->testData['table']));
    }

    /**
     * @dataProvider inflectionData
     * @param $filter
     * @param $expected
     */
    public function testConvertFromDashTo($filter, $expected)
    {
        $this->assertEquals($expected, $this->inflector->apply($filter, $this->testData['dash']));
    }

    public function numerationData()
    {
        return [
            ['person', 'people'],
            ['test', 'tests'],
            ['entity', 'entities'],
        ];
    }

{'fraction_non_alphanumeric': 0.16061185468451242, 'fraction_numerical': 0.0, 'mean_word_length': 2.3969155844155843, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 55, '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': '749017', 'n_tokens_mistral': 1227, 'n_tokens_neox': 1230, 'n_words': 227}