GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( b864c9...ed9166 )
by butschster
12:41
created

TestCase   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
dl 0
loc 43
c 0
b 0
f 0
rs 10
wmc 4
lcom 0
cbo 4
1
<?php
2
3
use Mockery as m;
4
use Illuminate\Contracts\View\Factory as ViewFactory;
5
use SleepingOwl\Admin\Providers\SleepingOwlServiceProvider;
6
7
class TestCase extends Orchestra\Testbench\TestCase
8
{
9
    protected function getPackageProviders($app)
10
    {
11
        return [
12
            SleepingOwlServiceProvider::class,
13
        ];
14
    }
15
16
    /**
17
     * Define environment setup.
18
     *
19
     * @param  \Illuminate\Foundation\Application $app
20
     *
21
     * @return void
22
     */
23
    protected function getEnvironmentSetUp($app)
24
    {
25
        /** @var \Illuminate\Http\Request $request */
26
        $request = $app['request'];
27
28
        if (! version_compare($app->version(), '5.4', '>=')) {
29
            $request->setSession($session = m::mock(Illuminate\Session\Store::class));
30
        } else {
31
            $request->setLaravelSession($session = m::mock(Illuminate\Session\Store::class));
32
        }
33
    }
34
35
    protected function getPackageAliases($app)
36
    {
37
        return [
38
39
        ];
40
    }
41
42
    /**
43
     * @param string $url
44
     *
45
     * @return \Illuminate\Http\Request
46
     */
47
    public function getRequest($url = 'http://www.foo.com/hello/world')
48
    {
49
        $request = Illuminate\Http\Request::create($url);
50
        $request->headers->set('referer', 'http://www.site.com/hello/world');
51
52
        return $request;
53
    }
54
55
    /**
56
     * @return m\MockInterface|\Illuminate\Translation\Translator
57
     */
58
    public function getTranslatorMock()
59
    {
60
        return $this->app['translator'] = m::mock(\Illuminate\Translation\Translator::class);
61
    }
62
63
    /**
64
     * @return m\MockInterface|\Illuminate\Contracts\Routing\UrlGenerator
65
     */
66
    public function getRouterMock()
67
    {
68
        return $this->app['url'] = m::mock(\Illuminate\Contracts\Routing\UrlGenerator::class);
69
    }
70
71
    /**
72
     * @return m\MockInterface|ViewFactory
73
     */
74
    public function getViewMock()
75
    {
76
        $this->app->instance(ViewFactory::class, $mock = m::mock(ViewFactory::class));
77
78
        return $mock;
79
    }
80
81
    /**
82
     * @return m\MockInterface|Illuminate\Contracts\Cache\Repository
83
     */
84
    public function getCacheMock()
85
    {
86
        return $this->app['cache'] = m::mock(\Illuminate\Cache\CacheManager::class);
87
    }
88
89
    /**
90
     * @return m\MockInterface|\Illuminate\Config\Repository
91
     */
92
    public function getConfigMock()
93
    {
94
        return $this->app['config'] = m::mock(\Illuminate\Config\Repository::class);
95
    }
96
97
    /**
98
     * @return m\MockInterface|\DaveJamesMiller\Breadcrumbs\Manager
99
     */
100
    public function getBreadcrumbsMock()
101
    {
102
        return $this->app['breadcrumbs'] = m::mock(DaveJamesMiller\Breadcrumbs\Manager::class);
103
    }
104
105
    /**
106
     * @return m\MockInterface|\SleepingOwl\Admin\Contracts\TemplateInterface
107
     */
108
    public function getTemplateMock()
109
    {
110
        return $this->app['sleeping_owl.template'] = m::mock(\SleepingOwl\Admin\Contracts\TemplateInterface::class);
111
    }
112
113
    /**
114
     * @return m\MockInterface|\SleepingOwl\Admin\Contracts\TemplateInterface
115
     */
116
    public function getSleepingOwlMock()
117
    {
118
        return $this->app['sleeping_owl'] = m::mock(\SleepingOwl\Admin\Admin::class);
119
    }
120
}
121