<commit_before><?php
namespace PharIo\Phive;

/**
 * @covers PharIo\Phive\Version
 */
class VersionTest extends \PHPUnit_Framework_TestCase {

    /**
     * @dataProvider versionProvider
     *
     * @param string $versionString
     * @param string $expectedMajor
     * @param string $expectedMinor
     * @param string $expectedPatch
     * @param string $expectedLabel
     * @param string $expectedMetadata
     */
    public function testParsesVersionNumbers(
        $versionString, $expectedMajor, $expectedMinor, $expectedPatch, $expectedLabel = '', $expectedMetadata = ''
    ) {
        $version = new Version($versionString);
        $this->assertSame($expectedMajor, $version->getMajor()->getValue());
        $this->assertSame($expectedMinor, $version->getMinor()->getValue());
        $this->assertSame($expectedPatch, $version->getPatch()->getValue());
        $this->assertSame($expectedLabel, $version->getLabel());
        $this->assertSame($expectedMetadata, $version->getBuildMetadata());
        $this->assertSame($versionString, $version->getVersionString());
    }

    public function versionProvider() {
        return [<commit_msg>use correct camelcase writing of methot getBuildMetaDate of Version object<commit_after><?php
namespace PharIo\Phive;

/**
 * @covers PharIo\Phive\Version
 */
class VersionTest extends \PHPUnit_Framework_TestCase {

    /**
     * @dataProvider versionProvider
     *
     * @param string $versionString
     * @param string $expectedMajor
     * @param string $expectedMinor
     * @param string $expectedPatch
     * @param string $expectedLabel
     * @param string $expectedMetadata
     */
    public function testParsesVersionNumbers(
        $versionString, $expectedMajor, $expectedMinor, $expectedPatch, $expectedLabel = '', $expectedMetadata = ''
    ) {
        $version = new Version($versionString);
        $this->assertSame($expectedMajor, $version->getMajor()->getValue());
        $this->assertSame($expectedMinor, $version->getMinor()->getValue());
        $this->assertSame($expectedPatch, $version->getPatch()->getValue());
        $this->assertSame($expectedLabel, $version->getLabel());
        $this->assertSame($expectedMetadata, $version->getBuildMetaData());
        $this->assertSame($versionString, $version->getVersionString());
    }

    public function versionProvider() {
        return [
{'fraction_non_alphanumeric': 0.1385972280554389, 'fraction_numerical': 0.0, 'mean_word_length': 3.764, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 33, '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': '3820724', 'n_tokens_mistral': 634, 'n_tokens_neox': 620, 'n_words': 123}