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

tests/Integration/BaseIntegrationTest.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

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
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