Completed
Push — master ( 902133...f13570 )
by Philip
23:54
created

BaseIntegrationTest::getRepositoryTargetPath()   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 0
1
<?php
2
3
namespace App\Tests\Integration;
4
5
use Doctrine\Common\DataFixtures\ReferenceRepository;
6
use Dontdrinkandroot\GitkiBundle\Tests\GitRepositoryTestTrait;
7
use Liip\TestFixturesBundle\Test\FixturesTrait;
8
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
9
10
abstract class BaseIntegrationTest extends WebTestCase
11
{
12
    use GitRepositoryTestTrait;
13
    use FixturesTrait;
14
15
    const GIT_REPOSITORY_PATH = '/tmp/gitkirepo/';
16
17
    protected function setUp()
18
    {
19
        $this->setUpRepo();
20
    }
21
22
    public function tearDown(): void
23
    {
24
        $this->tearDownRepo();
25
    }
26
27
    protected function loadKernelAndFixtures(array $classNames = []): ReferenceRepository
28
    {
29
        self::bootKernel();
30
        $referenceRepository = $this->loadFixtures($classNames)->getReferenceRepository();
31
32
        return $referenceRepository;
33
    }
34
35
    /**
36
     * {@inheritdoc}
37
     */
38
    protected function getRepositoryTemplatePath()
39
    {
40
        return realpath(__DIR__ . '/../../vendor/dontdrinkandroot/gitki-bundle/Tests/Data/repo/');
41
    }
42
43
    /**
44
     * {@inheritdoc}
45
     */
46
    protected function getRepositoryTargetPath()
47
    {
48
        return self::GIT_REPOSITORY_PATH;
49
    }
50
}
51