Passed
Pull Request — master (#57)
by Kyle
06:09
created

BaseTestCase   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 38
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 3 1
A getPackageProviders() 0 5 1
A getEnvironmentSetUp() 0 13 1
1
<?php
2
3
namespace KyleMassacre\Menus\Tests;
4
5
use Collective\Html\HtmlServiceProvider;
6
use KyleMassacre\Menus\MenusServiceProvider;
7
use Orchestra\Testbench\TestCase as OrchestraTestCase;
8
9
abstract class BaseTestCase extends OrchestraTestCase
10
{
11
    public function setUp() : void
12
    {
13
        parent::setUp();
14
15
        // $this->setUpDatabase();
16
    }
17
18
    protected function getPackageProviders($app)
0 ignored issues
show
Unused Code introduced by
The parameter $app is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

18
    protected function getPackageProviders(/** @scrutinizer ignore-unused */ $app)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
19
    {
20
        return [
21
            HtmlServiceProvider::class,
22
            MenusServiceProvider::class,
23
        ];
24
    }
25
26
    /**
27
     * Set up the environment.
28
     *
29
     * @param \Illuminate\Foundation\Application $app
30
     */
31
    protected function getEnvironmentSetUp($app)
32
    {
33
        $app['config']->set('menus', [
34
            'styles' => [
35
                'navbar' => \KyleMassacre\Menus\Presenters\Bootstrap\NavbarPresenter::class,
36
                'navbar-right' => \KyleMassacre\Menus\Presenters\Bootstrap\NavbarRightPresenter::class,
37
                'nav-pills' => \KyleMassacre\Menus\Presenters\Bootstrap\NavPillsPresenter::class,
38
                'nav-tab' => \KyleMassacre\Menus\Presenters\Bootstrap\NavTabPresenter::class,
39
                'sidebar' => \KyleMassacre\Menus\Presenters\Bootstrap\SidebarMenuPresenter::class,
40
                'navmenu' => \KyleMassacre\Menus\Presenters\Bootstrap\NavMenuPresenter::class,
41
            ],
42
43
            'ordering' => false,
44
        ]);
45
    }
46
}
47