<commit_before><?php

/*
 * This file is part of Psy Shell
 *
 * (c) 2013 <NAME>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Psy\Test\Presenter;

use Psy\Presenter\ClosurePresenter;

class ClosurePresenterTest extends \PHPUnit_Framework_TestCase
{
    public function setUp()
    {
        $this->presenter = new ClosurePresenter;
    }

    /**
     * @dataProvider presentData
     */
    public function testPresent($closure, $expect)
    {
        $this->assertEquals($expect, $this->presenter->present($closure));
    }

    /**
     * @dataProvider presentData
     */
    public function testPresentRef($closure, $expect)
    {
        $this->assertEquals($expect, $this->presenter->presentRef($closure));
    }

    public function presentData()
    {
        $eol = version_compare(PHP_VERSION, '5.4.3', '>=') ? 'PHP_EOL' : '"\n';

        return array(
            array(function() {},                  'function() { ... }'                 ),
            array(function($foo) {},              'function($foo) { ... }'             ),
            array(function($foo, $bar = null) {}, 'function($foo, $bar = null) { ... }'),
            array(function($foo = "bar") {},      'function($foo = "bar") { ... }'     ),
            array(function($foo = \PHP_EOL) {},   'function($foo = ' . $eol . ') { ... }'   ),
        );
    }
}<commit_msg>One more one more one last fix<commit_after><?php

/*
 * This file is part of Psy Shell
 *
 * (c) 2013 <NAME>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Psy\Test\Presenter;

use Psy\Presenter\ClosurePresenter;

class ClosurePresenterTest extends \PHPUnit_Framework_TestCase
{
    public function setUp()
    {
        $this->presenter = new ClosurePresenter;
    }

    /**
     * @dataProvider presentData
     */
    public function testPresent($closure, $expect)
    {
        $this->assertEquals($expect, $this->presenter->present($closure));
    }

    /**
     * @dataProvider presentData
     */
    public function testPresentRef($closure, $expect)
    {
        $this->assertEquals($expect, $this->presenter->presentRef($closure));
    }

    public function presentData()
    {
        $eol = version_compare(PHP_VERSION, '5.4.3', '>=') ? 'PHP_EOL' : '"\n"';

        return array(
            array(function() {},                  'function() { ... }'                 ),
            array(function($foo) {},              'function($foo) { ... }'             ),
            array(function($foo, $bar = null) {}, 'function($foo, $bar = null) { ... }'),
            array(function($foo = "bar") {},      'function($foo = "bar") { ... }'     ),
            array(function($foo = \PHP_EOL) {},   'function($foo = ' . $eol . ') { ... }'   ),
        );
    }
}
{'fraction_non_alphanumeric': 0.16632373113854595, 'fraction_numerical': 0.004801097393689987, 'mean_word_length': 2.139935414424112, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 21, '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': '4895356', 'n_tokens_mistral': 870, 'n_tokens_neox': 852, 'n_words': 182}