<commit_before><?php

use NewUp\Configuration\Parsers\YAMLParser;

class YAMLParserTest extends PHPUnit_Framework_TestCase
{

    private $expectedValueFromYAMLString = [
        'foo' => 'bar',
        'bar' => [
            'foo' => 'bar',
            'bar' => 'baz'
        ]
    ];

    private function getYAMLParser()
    {
        return new YAMLParser;
    }

    public function testYAMLParserParsesStrings()
    {
        $p = $this->getYAMLParser();
        $yamlString = loadFixtureContent('Configuration/Parsers/yaml_string.yaml');
        $parsedValue = $p->parseString($yamlString);
        $this->assertEquals($this->expectedValueFromYAMLString, $parsedValue);
    }

    public function testYAMLParserParsesFiles()
    {

    }

    public function testParserCreatesYAMLFromArray()
    {

    }

}<commit_msg>Added remaining two YAML tests<commit_after><?php

use NewUp\Configuration\Parsers\YAMLParser;

class YAMLParserTest extends PHPUnit_Framework_TestCase
{

    private $expectedValueFromYAMLString = [
        'foo' => 'bar',
        'bar' => [
            'foo' => 'bar',
            'bar' => 'baz'
        ]
    ];

    private function getYAMLParser()
    {
        return new YAMLParser;
    }

    public function testYAMLParserParsesStrings()
    {
        $p = $this->getYAMLParser();
        $yamlString = loadFixtureContent('Configuration/Parsers/yaml_string.yaml');
        $parsedValue = $p->parseString($yamlString);
        $this->assertEquals($this->expectedValueFromYAMLString, $parsedValue);
    }

    public function testYAMLParserParsesFiles()
    {
        $p = $this->getYAMLParser();
        $parsedValue = $p->parseFile(getFixturePath('Configuration/Parsers/yaml_string.yaml'));
        $this->assertEquals($this->expectedValueFromYAMLString, $parsedValue);
    }

    public function testParserCreatesYAMLFromArray()
    {
        $p = $this->getYAMLParser();
        $this->assertEquals(loadFixtureContent('Configuration/Parsers/yaml_string.yaml'),
            $p->toYaml($this->expectedValueFromYAMLString));
    }

}
{'fraction_non_alphanumeric': 0.12481857764876633, 'fraction_numerical': 0.0, 'mean_word_length': 2.90188679245283, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, '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': '245724', 'n_tokens_mistral': 646, 'n_tokens_neox': 629, 'n_words': 92}