<commit_before><?php
/*
 * This file is part of the {{ }} package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 */

class LoggerTest extends PHPUnit_Framework_TestCase 
{
    function test()
    {
        $logger = new \CLIFramework\Logger;
        $this->assertNotEmpty( $logger );

        ob_start();
        $logger->info('test');
        $logger->debug('test');
        ob_clean();
    }


}<commit_msg>add test for Logger::preferRawOutput #10 fix test for Logger colored output<commit_after><?php
/*
 * This file is part of the {{ }} package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 */

class LoggerTest extends PHPUnit_Framework_TestCase 
{
    function testColoredOutput()
    {
        $logger = new \CLIFramework\Logger;
        $logger->info('test');
        $logger->debug('test');

        $this->expectOutputString("\033[2mtest\033[0m\n");
    }

    function testRawOutput()
    {
        $logger = new \CLIFramework\Logger;
        $logger->getFormatter()->preferRawOutput();
        $logger->info('test');
        $logger->debug('test');

        $this->expectOutputString("test\n");
    }


}
{'fraction_non_alphanumeric': 0.1403118040089087, 'fraction_numerical': 0.007423904974016332, 'mean_word_length': 2.8079096045197742, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 20, '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': '3498223', 'n_tokens_mistral': 403, 'n_tokens_neox': 395, 'n_words': 106}