<commit_before><?php namespace Orchestra\Support\Providers\TestCase;

use Mockery as m;
use Illuminate\Container\Container;
use Orchestra\Support\Providers\FilterServiceProvider;

class FilterServiceProviderTest extends \PHPUnit_Framework_TestCase
{
    /**
     * Teardown the test environment.
     */
    public function tearDown()
    {
        m::close();
    }

    /**
     * Test Orchestra\Foundation\Providers\FilterServiceProvider::boot()
     * method.
     *
     * @test
     */
    public function testBootMethod()
    {
        $app = new Container();

        $router = $app['router'] = m::mock('\Illuminate\Routing\Router');

        $router->shouldReceive('before')->once()->with('BeforeFilter')->andReturnNull();
        $router->shouldReceive('after')->once()->with('AfterFilter')->andReturnNull();

        $stub = new StubFilterProvider($app);

        $stub->boot();
    }
}

class StubFilterProvider extends FilterServiceProvider
{
    protected $before = ['BeforeFilter'];
    protected $after  = ['AfterFilter'];
}<commit_msg>Fixes tests.<commit_after><?php namespace Orchestra\Support\Providers\TestCase;

use Mockery as m;
use Illuminate\Container\Container;
use Orchestra\Support\Providers\FilterServiceProvider;

class FilterServiceProviderTest extends \PHPUnit_Framework_TestCase
{
    /**
     * Teardown the test environment.
     */
    public function tearDown()
    {
        m::close();
    }

    /**
     * Test Orchestra\Foundation\Providers\FilterServiceProvider::register()
     * method.
     *
     * @test
     */
    public function testRegisterMethod()
    {
        $stub = new StubFilterProvider(null);

        $this->assertNull($stub->register());
    }

    /**
     * Test Orchestra\Foundation\Providers\FilterServiceProvider::boot()
     * method.
     *
     * @test
     */
    public function testBootMethod()
    {
        $app = new Container();

        $router = m::mock('\Illuminate\Routing\Router');

        $router->shouldReceive('before')->once()->with('BeforeFilter')->andReturnNull()
            ->shouldReceive('after')->once()->with('AfterFilter')->andReturnNull()
            ->shouldReceive('filter')->once()->with('foo', 'FooFilter')->andReturnNull();

        $stub = new StubFilterProvider($app);

        $this->assertNull($stub->boot($router));
    }
}

class StubFilterProvider extends FilterServiceProvider
{
    protected $before = ['BeforeFilter'];
    protected $after  = ['AfterFilter'];
    protected $filters = ['foo' => 'FooFilter'];
}
{'fraction_non_alphanumeric': 0.1495438318127727, 'fraction_numerical': 0.0, 'mean_word_length': 3.141215106732348, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, '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': '1682164', 'n_tokens_mistral': 690, 'n_tokens_neox': 689, 'n_words': 121}