Completed
Push — master ( 6a8432...b81c5a )
by Adam
05:46
created

GridBuilderTestCase::tearDown()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
use Orchestra\Testbench\TestCase;
4
use Collective\Html\HtmlBuilder;
5
use Collective\Html\FormBuilder;
6
use Illuminate\Http\Request;
7
use Illuminate\Contracts\Validation\Factory as ValidationFactory;
8
use Illuminate\Contracts\View\Factory as ViewFactory;
9
use Boduch\Grid\GridHelper;
10
11
abstract class GridBuilderTestCase extends TestCase
12
{
13
    /**
14
     * @var ViewFactory
15
     */
16
    protected $view;
17
18
    /**
19
     * @var Request
20
     */
21
    protected $request;
22
23
    /**
24
     * @var GridHelper
25
     */
26
    protected $gridHelper;
27
28
    /**
29
     * @var ValidationFactory
30
     */
31
    protected $validator;
32
33
    /**
34
     * @var HtmlBuilder
35
     */
36
    protected $htmlBuilder;
37
38
    /**
39
     * @var FormBuilder
40
     */
41
    protected $formBuilder;
42
43
    public function setUp()
44
    {
45
        parent::setUp();
46
47
        $this->view = $this->app['view'];
48
        $this->request = $this->app['request'];
49
        $this->request->setSession($this->app['session.store']);
50
        $this->validator = $this->app['validator'];
51
        $this->htmlBuilder = new HtmlBuilder($this->app['url'], $this->view);
52
        $this->formBuilder = new FormBuilder($this->htmlBuilder, $this->app['url'], $this->view, $this->request->session()->getToken());
53
54
        $this->gridHelper = new GridHelper($this->request, $this->validator, $this->view, $this->htmlBuilder, $this->formBuilder);
55
    }
56
57
    public function tearDown()
58
    {
59
        parent::tearDown();
60
    }
61
}
62