<commit_before><?php namespace Orchestra\Foundation\TestCase;

use Mockery as m;
use Orchestra\Testing\TestCase;
use Orchestra\Foundation\Providers\ArtisanServiceProvider;
use Orchestra\Foundation\Providers\SupportServiceProvider;
use Orchestra\Foundation\Providers\FoundationServiceProvider;
use Orchestra\Foundation\Providers\ConsoleSupportServiceProvider;

class ServiceProviderTest extends TestCase
{
    /**
     * Test instance of `orchestra.publisher`.
     *
     * @test
     */
    public function testInstanceOfOrchestraPublisher()
    {
        $stub = $this->app->make('orchestra.publisher');
        $this->assertInstanceOf('\Orchestra\Foundation\Publisher\PublisherManager', $stub);
    }

    /**
     * Test instance of eloquents.
     *
     * @test
     */
    public function testInstanceOfEloquents()
    {
        $stub = $this->app->make('orchestra.role');
        $this->assertInstanceOf('\Orchestra\Model\Role', $stub);

        $stub = $this->app->make('orchestra.user');
        $this->assertInstanceOf('\Orchestra\Model\User', $stub);
    }

    /**
     * Test list of provides.
     *
     * @test
     */
    public function testListOfProvides()
    {
        $foundation = new FoundationServiceProvider($this->app);
        $site       = new SupportServiceProvider($this->app);
        $console    = new ConsoleSupportServiceProvider($this->app);
        $artisan    = new ArtisanServiceProvider($this->app);

        $this->assertEquals($this->getFoundationProvides(), $foundation->provides());
        $this->assertFalse($foundation->isDeferred());

        $this->assertEquals($this->getSupportProvides(), $site->provides());
        $this->assertTrue($site->isDeferred());

        $this->assertEquals($this->getConsoleSupportProvides(), $console->provides());
        $this->assertTrue($console->isDeferred());

        $this->assertInstanceOf('\Orchestra\Config\Console\ConfigCacheCommand', $this->app['command.config.cache']);
        $this->assertTrue($artisan->isDeferred());
    }

    /**
     * Get value of Orchestra\Foundation\Providers\FoundationServiceProvider::provides().
     *
     * @return array
     */
    protected function getFoundationProvides()
    {
        return [
            'orchestra.app',
            'orchestra.installed',
            'orchestra.meta',
        ];
    }

    /**
     * Get value of Orchestra\Foundation\Providers\SupportServiceProvider::provides().
     *
     * @return array.
     */
    protected function getSupportProvides()
    {
        return [
            'orchestra.publisher',
            'orchestra.role',
            'orchestra.user',
        ];
    }

    /**
     * Get value of Orchestra\Foundation\Providers\ConsoleSupportServiceProvider::provides().
     *
     * @return array
     */
    protected function getConsoleSupportProvides()
    {
        return [
            'command.auth.resets.clear',
            'Illuminate\Console\Scheduling\ScheduleRunCommand',
            'migrator',
            'migration.repository',
            'command.migrate',
            'command.migrate.rollback',
            'command.migrate.reset',
            'command.migrate.refresh',
            'command.migrate.install',
            'command.migrate.status',
            'migration.creator',
            'command.migrate.make',
            'seeder',
            'command.seed',
            'command.seeder.make',
            'composer',
            'command.queue.table',
            'command.queue.failed',
            'command.queue.retry',
            'command.queue.forget',
            'command.queue.flush',
            'command.queue.failed-table',
            'command.controller.make',
            'command.middleware.make',
            'command.session.database',
            'orchestra.commands.auth',
            'orchestra.commands.extension.activate',
            'orchestra.commands.extension.deactivate',
            'orchestra.commands.extension.detect',
            'orchestra.commands.extension.migrate',
            'orchestra.commands.extension.publish',
            'orchestra.commands.extension.refresh',
            'orchestra.commands.extension.reset',
            'orchestra.commands.memory',
            'orchestra.commands.optimize',
            'orchestra.optimize',
            'command.asset.publish',
            'command.config.publish',
            'command.view.publish',
            'asset.publisher',
            'config.publisher',
            'view.publisher',
            'orchestra.view.command.activate',
            'orchestra.view.command.detect',
            'orchestra.view.command.optimize',
        ];
    }
}<commit_msg>Fixes testcase.<commit_after><?php namespace Orchestra\Foundation\TestCase;

use Mockery as m;
use Orchestra\Testing\TestCase;
use Orchestra\Foundation\Providers\ArtisanServiceProvider;
use Orchestra\Foundation\Providers\SupportServiceProvider;
use Orchestra\Foundation\Providers\FoundationServiceProvider;
use Orchestra\Foundation\Providers\ConsoleSupportServiceProvider;

class ServiceProviderTest extends TestCase
{
    /**
     * Test instance of `orchestra.publisher`.
     *
     * @test
     */
    public function testInstanceOfOrchestraPublisher()
    {
        $stub = $this->app->make('orchestra.publisher');
        $this->assertInstanceOf('\Orchestra\Foundation\Publisher\PublisherManager', $stub);
    }

    /**
     * Test instance of eloquents.
     *
     * @test
     */
    public function testInstanceOfEloquents()
    {
        $stub = $this->app->make('orchestra.role');
        $this->assertInstanceOf('\Orchestra\Model\Role', $stub);

        $stub = $this->app->make('orchestra.user');
        $this->assertInstanceOf('\Orchestra\Model\User', $stub);
    }

    /**
     * Test list of provides.
     *
     * @test
     */
    public function testListOfProvides()
    {
        $foundation = new FoundationServiceProvider($this->app);
        $site       = new SupportServiceProvider($this->app);
        $console    = new ConsoleSupportServiceProvider($this->app);
        $artisan    = new ArtisanServiceProvider($this->app);

        $this->assertEquals($this->getFoundationProvides(), $foundation->provides());
        $this->assertFalse($foundation->isDeferred());

        $this->assertEquals($this->getSupportProvides(), $site->provides());
        $this->assertTrue($site->isDeferred());

        $this->assertEquals($this->getConsoleSupportProvides(), $console->provides());
        $this->assertTrue($console->isDeferred());

        $this->assertInstanceOf('\Orchestra\Config\Console\ConfigCacheCommand', $this->app['command.config.cache']);
        $this->assertTrue($artisan->isDeferred());
    }

    /**
     * Get value of Orchestra\Foundation\Providers\FoundationServiceProvider::provides().
     *
     * @return array
     */
    protected function getFoundationProvides()
    {
        return [
            'orchestra.app',
            'orchestra.installed',
            'orchestra.meta',
        ];
    }

    /**
     * Get value of Orchestra\Foundation\Providers\SupportServiceProvider::provides().
     *
     * @return array.
     */
    protected function getSupportProvides()
    {
        return [
            'orchestra.publisher',
            'orchestra.role',
            'orchestra.user',
        ];
    }

    /**
     * Get value of Orchestra\Foundation\Providers\ConsoleSupportServiceProvider::provides().
     *
     * @return array
     */
    protected function getConsoleSupportProvides()
    {
        return [
            'command.auth.resets.clear',
            'Illuminate\Console\Scheduling\ScheduleRunCommand',
            'migrator',
            'migration.repository',
            'command.migrate',
            'command.migrate.rollback',
            'command.migrate.reset',
            'command.migrate.refresh',
            'command.migrate.install',
            'command.migrate.status',
            'migration.creator',
            'command.migrate.make',
            'seeder',
            'command.seed',
            'command.seeder.make',
            'composer',
            'command.queue.table',
            'command.queue.failed',
            'command.queue.retry',
            'command.queue.forget',
            'command.queue.flush',
            'command.queue.failed-table',
            'command.controller.make',
            'command.middleware.make',
            'command.session.database',
            'orchestra.commands.auth',
            'orchestra.commands.extension.activate',
            'orchestra.commands.extension.deactivate',
            'orchestra.commands.extension.detect',
            'orchestra.commands.extension.migrate',
            'orchestra.commands.extension.publish',
            'orchestra.commands.extension.refresh',
            'orchestra.commands.extension.reset',
            'orchestra.commands.memory',
            'orchestra.command.refresh',
            'orchestra.commands.optimize',
            'orchestra.optimize',
            'command.asset.publish',
            'command.config.publish',
            'command.view.publish',
            'asset.publisher',
            'config.publisher',
            'view.publisher',
            'orchestra.view.command.activate',
            'orchestra.view.command.detect',
            'orchestra.view.command.optimize',
        ];
    }
}
{'fraction_non_alphanumeric': 0.13384566122318284, 'fraction_numerical': 0.0, 'mean_word_length': 2.204514363885089, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 67, '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': '399550', 'n_tokens_mistral': 2482, 'n_tokens_neox': 2545, 'n_words': 326}