Passed
Pull Request — master (#52)
by Matthieu
04:51
created

AbstractWebTestCase::setUp()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 3
c 1
b 0
f 0
nc 2
nop 0
dl 0
loc 7
rs 10
1
<?php declare(strict_types = 1);
2
3
namespace AtlassianConnectBundle\Tests\Functional;
4
5
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
6
use Symfony\Component\DependencyInjection\ContainerInterface;
7
use Symfony\Component\HttpKernel\Kernel;
8
9
/**
10
 * abstract class AbstractWebTestCase
11
 */
12
abstract class AbstractWebTestCase extends WebTestCase
13
{
14
    /**
15
     * setup method
16
     */
17
    protected function setUp(): void
18
    {
19
        if (Kernel::VERSION_ID >= 50200) {
20
            return;
21
        }
22
23
        $this->markTestSkipped('These tests only run on Symfony 5.2 or higher');
24
    }
25
26
    /**
27
     * @return ContainerInterface
28
     */
29
    public static function getParentContainer(): ContainerInterface
30
    {
31
        if (\method_exists(self::class, 'getContainer')) {
32
            return self::getContainer();
33
        }
34
35
        return self::$container;
36
    }
37
38
    /**
39
     * @return string
40
     */
41
    protected static function getKernelClass()
42
    {
43
        return 'AtlassianConnectBundle\Tests\Functional\App\Kernel';
44
    }
45
}
46