Completed
Push — master ( fc7027...e72ab1 )
by Philip
24:06
created

BaseIntegrationTest::makeBrowser()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
namespace App\Tests\Integration;
4
5
use Dontdrinkandroot\GitkiBundle\Tests\GitRepositoryTestTrait;
6
use Liip\FunctionalTestBundle\Test\WebTestCase;
7
use Symfony\Component\BrowserKit\AbstractBrowser;
8
9
abstract class BaseIntegrationTest extends WebTestCase
10
{
11
    use GitRepositoryTestTrait;
12
13
    const GIT_REPOSITORY_PATH = '/tmp/gitkirepo/';
14
15
    protected function setUp()
16
    {
17
        $this->setUpRepo();
18
    }
19
20
    public function tearDown(): void
21
    {
22
        $this->tearDownRepo();
23
    }
24
25
    // TODO: Remove, replaces Liip Make Client until fixed for Symfony 4.3
26
    protected function makeBrowser($authentication = false, array $params = []): AbstractBrowser
0 ignored issues
show
Unused Code introduced by
The parameter $authentication is not used and could be removed.

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

Loading history...
27
    {
28
        return static::createClient(['environment' => $this->environment], $params);
29
    }
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    protected function getRepositoryTemplatePath()
35
    {
36
        return realpath(__DIR__ . '/../../vendor/dontdrinkandroot/gitki-bundle/Tests/Data/repo/');
37
    }
38
39
    /**
40
     * {@inheritdoc}
41
     */
42
    protected function getRepositoryTargetPath()
43
    {
44
        return self::GIT_REPOSITORY_PATH;
45
    }
46
}
47