<commit_before><?php
/*
 * This file is part of the Onema ClassyFile Package.
 * For the full copyright and license information, 
 * please view the LICENSE file that was distributed 
 * with this source code.
 */

namespace Onema\Test;
use Onema\ClassyFile\Template\BasicClassTemplate;

/**
 * BasicClassTemplateTest - Description. 
 *
 * @author <NAME> <<EMAIL>>
 * @copyright (c) 2015, Onema
 * @group template
 */
class BasicClassTemplateTest extends \PHPUnit_Framework_TestCase
{

    public function testDefaultTest ()
    {
        $date = new \DateTime();
        $templateClass = new BasicClassTemplate();
        $template = $templateClass->getTemplate('foo', 'bar', 'blah', 'lala');
        $this->assertRegExp(sprintf('/%s/', $date->format('Y')), $template);
        $this->assertRegExp(sprintf('/%s/', '<NAME>'), $template);
    }

    public function testCustomTest ()
    {
        $expectedTemplate = sprintf('<?php%s%s%s%s%s%s%s%s%s', '', 'foo', PHP_EOL, 'bar', PHP_EOL, 'blah', PHP_EOL, 'lala', PHP_EOL);
        $templateClass = new BasicClassTemplate('');
        $template = $templateClass->getTemplate('foo', 'bar', 'blah', 'lala');

        $this->assertEquals($expectedTemplate, $template);
    }
}<commit_msg>Update unit test to test for latest updates in the basic class template class.<commit_after><?php
/*
 * This file is part of the Onema ClassyFile Package.
 * For the full copyright and license information, 
 * please view the LICENSE file that was distributed 
 * with this source code.
 */

namespace Onema\Test;
use Onema\ClassyFile\Template\BasicClassTemplate;

/**
 * BasicClassTemplateTest - Description. 
 *
 * @author <NAME> <<EMAIL>>
 * @copyright (c) 2015, Onema
 * @group template
 */
class BasicClassTemplateTest extends \PHPUnit_Framework_TestCase
{

    public function testDefaultTest ()
    {
        $date = new \DateTime();
        $templateClass = new BasicClassTemplate();
        $template = $templateClass->getTemplate('foo', 'bar', 'blah', 'lala');
        $this->assertRegExp(sprintf('/%s/', $date->format('Y')), $template);
        $this->assertRegExp(sprintf('/%s/', '<NAME>'), $template);
    }

    public function testCustomTest ()
    {
        $expectedTemplate = sprintf('<?php%s%s%s%s%s%s%s%s%s%s', PHP_EOL, 'foo', PHP_EOL, 'bar', PHP_EOL, PHP_EOL, 'blah', PHP_EOL, 'lala', PHP_EOL);
        $templateClass = new BasicClassTemplate('');
        $template = $templateClass->getTemplate('foo', 'bar', 'blah', 'lala');

        $this->assertEquals($expectedTemplate, $template);
    }
}
{'fraction_non_alphanumeric': 0.15888583758336602, 'fraction_numerical': 0.003138485680659082, 'mean_word_length': 3.793233082706767, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 23, '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': '906881', 'n_tokens_mistral': 793, 'n_tokens_neox': 779, 'n_words': 197}