<commit_before><?php

    namespace Test;

    require_once('TemplateEngine.php');
    use Landscape\TemplateEngine;

    class TemplateEngineTest extends \PHPUnit_Framework_TestCase
    {
        public function testGetSet()
        {
            $temp = new TemplateEngine("file2", array("a" => "b2", "x" => "y2"));

            $temp->setFile("file");
            $temp->setContext(array("a" => "b", "x" => "y"));

            $file = $temp->getFile();
            $cont = $temp->getContext();

            $this->assertTrue($file == "file");
            $this->assertTrue($cont['a'] == "b");
            $this->assertTrue($cont['x'] == "y");
        }

        public function testConstructor()
        {
            $temp = new TemplateEngine("file2", array("a" => "b2", "x" => "y2"));

            $file = $temp->getFile();
            $cont = $temp->getContext();

            $this->assertTrue($file == "file2");
            $this->assertTrue($cont['a'] == "b2");
            $this->assertTrue($cont['x'] == "y2");
        }

        public function testRender()
        {
            $temp = new TemplateEngine("Test/test.html", array("valid" => true, 'var' => 'Hello World'));
            $expected = implode('', file("Test/expected.html"));

            $x = $temp->renderStart();
            $this->assertTrue($x == $expected);
        }
    }

?><commit_msg>Fixed tests<commit_after><?php

    namespace Test;

    require_once('TemplateEngine.php');
    use Landscape\TemplateEngine;

    class TemplateEngineTest extends \PHPUnit_Framework_TestCase
    {
        public function testGetSet()
        {
            $temp = new TemplateEngine("file2", array("a" => "b2", "x" => "y2"));

            $temp->setFile("file");
            $temp->setContext(array("a" => "b", "x" => "y"));

            $file = $temp->getFile();
            $cont = $temp->getContext();

            $this->assertTrue($file == "file");
            $this->assertTrue($cont['a'] == "b");
            $this->assertTrue($cont['x'] == "y");
        }

        public function testConstructor()
        {
            $temp = new TemplateEngine("file2", array("a" => "b2", "x" => "y2"));

            $file = $temp->getFile();
            $cont = $temp->getContext();

            $this->assertTrue($file == "file2");
            $this->assertTrue($cont['a'] == "b2");
            $this->assertTrue($cont['x'] == "y2");
        }

        public function testRender()
        {
            $temp = new TemplateEngine("Test/test.html", array("valid" => true, 'var' => 'Hello World', 'var2' => '!!'));
            $expected = implode('', file("Test/expected.html"));

            $x = $temp->renderStart();
            $this->assertTrue($x == $expected);
        }
    }

?>
{'fraction_non_alphanumeric': 0.2028301886792453, 'fraction_numerical': 0.006894049346879536, 'mean_word_length': 2.0464088397790055, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 50, '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': '4862800', 'n_tokens_mistral': 806, 'n_tokens_neox': 801, 'n_words': 148}