<commit_before><?php

/**
 * JulLib ©2015 Julien <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace Jul\Lib\Tests\String\Filter;

use Jul\Lib\String\Filter\Whitespace;

/**
 * @author Julien <<EMAIL>>
 */
class WhitespaceTest extends \PHPUnit_Framework_TestCase
{
    public function testFilterWithoutTrim()
    {
        $whitespace = new Whitespace();
        $this->assertEquals(' foo bar ', $whitespace->filter("\n\n\t   foo\t \n  bar  \n\n \t \r\r  "));
    }

    public function testFilterWithTrim()
    {
        $whitespace = new Whitespace(true);
        $this->assertEquals('foo bar', $whitespace->filter("\n\n\t   foo\t \n  bar  \n\n \t \r\r  "));<commit_msg>Whitespace test typo.<commit_after><?php

/**
 * JulLib ©2015 Julien <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace Jul\Lib\Tests\String\Filter;

use Jul\Lib\String\Filter\Whitespace;

/**
 * @author Julien <<EMAIL>>
 */
class WhitespaceTest extends \PHPUnit_Framework_TestCase
{
    public function testFilter()
    {
        $whitespace = new Whitespace();
        $this->assertEquals(' foo bar ', $whitespace->filter("\n\n\t   foo\t \n  bar  \n\n \t \r\r  "));
    }

    public function testFilterWithTrim()
    {
        $whitespace = new Whitespace(true);
        $this->assertEquals('foo bar', $whitespace->filter("\n\n\t   foo\t \n  bar  \n\n \t \r\r  "));
{'fraction_non_alphanumeric': 0.14692556634304207, 'fraction_numerical': 0.005177993527508091, 'mean_word_length': 2.943877551020408, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 19, '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': '1452100', 'n_tokens_mistral': 519, 'n_tokens_neox': 505, 'n_words': 134}