<commit_before><?php

namespace BoomCMS\Tests\ServiceProviders;

use BoomCMS\Database\Models;
use BoomCMS\Routing\Router as BoomCMSRouter;
use BoomCMS\ServiceProviders\RouteServiceProvider;
use BoomCMS\Tests\AbstractTestCase;
use Illuminate\Routing\Router;
use Illuminate\Support\Facades\App;
use Mockery as m;

class RouteServiceProviderTest extends AbstractTestCase
{
    public function testModelBidings()
    {
        $router = m::mock(Router::class);

        foreach ([
            Models\Group::class,
            Models\Asset::class,
            Models\Page::class,
            Models\Person::class,
            Models\Site::class,
            Models\Template::class,
            Models\URL::class,
        ] as $model) {
            $binding = strtolower(class_basename($model));

            $router->shouldReceive('model')->once()->with($binding, $model);
        }

        $route->shouldReceive('model')->once()->with('related', Models\Page::class);

        $sp = m::mock(RouteServiceProvider::class)->makePartial();
        $sp->boot($router);
    }

    public function testRouterIsRegistered()
    {
        $app = App::getFacadeRoot();

        $this->assertInstanceOf(BoomCMSRouter::class, $app[BoomCMSRouter::class]);<commit_msg>Fixed typo in variable name<commit_after><?php

namespace BoomCMS\Tests\ServiceProviders;

use BoomCMS\Database\Models;
use BoomCMS\Routing\Router as BoomCMSRouter;
use BoomCMS\ServiceProviders\RouteServiceProvider;
use BoomCMS\Tests\AbstractTestCase;
use Illuminate\Routing\Router;
use Illuminate\Support\Facades\App;
use Mockery as m;

class RouteServiceProviderTest extends AbstractTestCase
{
    public function testModelBidings()
    {
        $router = m::mock(Router::class);

        foreach ([
            Models\Group::class,
            Models\Asset::class,
            Models\Page::class,
            Models\Person::class,
            Models\Site::class,
            Models\Template::class,
            Models\URL::class,
        ] as $model) {
            $binding = strtolower(class_basename($model));

            $router->shouldReceive('model')->once()->with($binding, $model);
        }

        $router->shouldReceive('model')->once()->with('related', Models\Page::class);

        $sp = m::mock(RouteServiceProvider::class)->makePartial();
        $sp->boot($router);
    }

    public function testRouterIsRegistered()
    {
        $app = App::getFacadeRoot();

        $this->assertInstanceOf(BoomCMSRouter::class, $app[BoomCMSRouter::class]);
{'fraction_non_alphanumeric': 0.13518886679920478, 'fraction_numerical': 0.0, 'mean_word_length': 3.0515297906602252, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2885868', 'n_tokens_mistral': 748, 'n_tokens_neox': 711, 'n_words': 115}