<commit_before><?php
/**
 * Template data unit test.
 *
 * @version 1.0
 * @author MPI
 * */
include '../../app/TemplateData.class.php';
class TemplateDataTest extends PHPUnit_Framework_TestCase {
    private $data;

    protected function setUp() {
        $this->data = null;
    }
    
    public function testEmptyConstructor() {
        $this->data = new TemplateData();
        $this->assertEmpty($this->data->get());
    }
}
?><commit_msg>added testSimpleDataStore();<commit_after><?php
/**
 * Template data unit test.
 *
 * @version 1.1
 * @author MPI
 * */
include '../../app/TemplateData.class.php';
class TemplateDataTest extends PHPUnit_Framework_TestCase {
    private $data;

    protected function setUp() {
        $this->data = null;
    }

    public function testEmptyConstructor() {
        $this->data = new TemplateData();
        $this->assertEmpty($this->data->get());
        $this->assertEmpty($this->data->getAll());
    }

    public function testSimpleDataStore() {
        $a = array (
                        "key" => "value",
                        "key2" => "value2",
                        "key3" => "value3" 
        );
        $this->data = new TemplateData($a);
        $this->assertEquals("value", $this->data->get("key"));
        $this->assertEquals("value2", $this->data->get("key2"));
        $this->assertEquals("value3", $this->data->get("key3"));
        $this->assertSame($a, $this->data->getAll());
        
    }
}
?>
{'fraction_non_alphanumeric': 0.17859577368779822, 'fraction_numerical': 0.0081799591002045, 'mean_word_length': 2.3747126436781607, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 34, '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': '6250689', 'n_tokens_mistral': 434, 'n_tokens_neox': 425, 'n_words': 82}