<commit_before><?php
/*
 * citeproc-php
 *
 * @link        http://github.com/seboettg/citeproc-php for the source repository
 * @copyright   Copyright (c) 2017 <NAME>.
 * @license     https://opensource.org/licenses/MIT
 */

namespace src\Seboettg\CiteProc;

use PHPUnit\Framework\TestCase;
use Seboettg\CiteProc\StyleSheet;

class StyleSheetTest extends TestCase
{

    /**
     * @coversNothing
     */
    public function testLoadStyleSheet()
    {

        $style = StyleSheet::loadStyleSheet("DIN-1505-2");
        $xmlStyle = new \SimpleXMLElement($style);
        foreach ($xmlStyle as $child) {
            if ($child->getName() === "info") {
                foreach ($child as $subChild) {
                    if ($subChild->getName() === "id") {
                        $this->assertEquals("http://www.zotero.org/styles/din-1505-2", (string) $subChild);
                        break;
                    }
                }
                break;
            }
        }

    }

    /**
     * @coversNothing
     */
    public function testLoadLocales()
    {

        $locales = StyleSheet::loadLocales("de-DE");
        $xmlLocales = new \SimpleXMLElement($locales);
        foreach ($xmlLocales as $child) {
            if ($child->getName() === "terms") {
                foreach ($child as $term) {
                    echo $term["name"];
                    if ("and" === (string) $term["name"]) {
                        $this->assertEquals("und", (string) $term);
                        break;
                    }
                }
                break;
            }
        }

    }
}
<commit_msg>typo in stylesheet test<commit_after><?php
/*
 * citeproc-php
 *
 * @link        http://github.com/seboettg/citeproc-php for the source repository
 * @copyright   Copyright (c) 2017 <NAME>.
 * @license     https://opensource.org/licenses/MIT
 */

namespace src\Seboettg\CiteProc;

use PHPUnit\Framework\TestCase;
use Seboettg\CiteProc\StyleSheet;

class StyleSheetTest extends TestCase
{

    /**
     * @coversNothing
     */
    public function testLoadStyleSheet()
    {

        $style = StyleSheet::loadStyleSheet("din-1505-2");
        $xmlStyle = new \SimpleXMLElement($style);
        foreach ($xmlStyle as $child) {
            if ($child->getName() === "info") {
                foreach ($child as $subChild) {
                    if ($subChild->getName() === "id") {
                        $this->assertEquals("http://www.zotero.org/styles/din-1505-2", (string) $subChild);
                        break;
                    }
                }
                break;
            }
        }

    }

    /**
     * @coversNothing
     */
    public function testLoadLocales()
    {

        $locales = StyleSheet::loadLocales("de-DE");
        $xmlLocales = new \SimpleXMLElement($locales);
        foreach ($xmlLocales as $child) {
            if ($child->getName() === "terms") {
                foreach ($child as $term) {
                    echo $term["name"];
                    if ("and" === (string) $term["name"]) {
                        $this->assertEquals("und", (string) $term);
                        break;
                    }
                }
                break;
            }
        }

    }
}

{'fraction_non_alphanumeric': 0.14066339066339067, 'fraction_numerical': 0.0085995085995086, 'mean_word_length': 1.482469512195122, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 8}, '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': '7383388', 'n_tokens_mistral': 964, 'n_tokens_neox': 904, 'n_words': 171}