Completed
Push — master ( 867576...44cf56 )
by Sander
15:38
created

SymfonyVersionTest::testGetRootWebPath()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 2
nc 1
nop 0
1
<?php
2
3
namespace Kunstmaan\MediaBundle\Tests\Utils;
4
5
use Kunstmaan\MediaBundle\Utils\SymfonyVersion;
6
use Symfony\Component\HttpKernel\Kernel;
7
8
/**
9
 * @covers \Kunstmaan\MediaBundle\Utils\SymfonyVersion
10
 */
11
class SymfonyVersionTest extends \PHPUnit_Framework_TestCase
12
{
13
    public function testGetRootWebPath()
14
    {
15
        $path = SymfonyVersion::getRootWebPath();
16
        $this->assertStringStartsWith('%kernel.project_dir%/', $path);
17
        $this->assertStringEndsWith(Kernel::VERSION_ID < 40000 ? 'web' : 'public', $path);
18
    }
19
20
    public function testIsKernelLessThan()
21
    {
22
        $this->assertTrue(SymfonyVersion::isKernelLessThan(100, 100, 100));
23
        $this->assertFalse(SymfonyVersion::isKernelLessThan(1, 1, 1));
24
    }
25
}
26