Test Failed
Push — master ( 5b1666...3267f8 )
by Jean-Bernard
01:54
created

testKernelInterface()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the Symfony-Util package.
5
 *
6
 * (c) Jean-Bernard Addor
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
use PHPUnit\Framework\TestCase;
13
use Symfony\Bridge\Twig\TwigEngine;
14
use Symfony\Component\HttpFoundation\Request;
15
use Symfony\Component\HttpFoundation\Response;
16
use Symfony\Component\Templating\TemplateNameParser;
17
use SymfonyUtil\Controller\EngineAsArgumentController;
18
19
/**
20
 * @covers \SymfonyUtil\Controller\EngineAsArgumentController
21
 */
22
final class EngineAsArgumentInKernelControllerTest extends TestCase
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
23
{
24
    public function testCanBeCreated()
25
    {
26
        $this->assertInstanceOf(
27
            // ...::class, // 5.4 < php
0 ignored issues
show
Unused Code Comprehensibility introduced by
50% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
28
            'Symfony\Component\HttpKernel\Kernel',
29
            new AppKernel('dev', true)
30
        );
31
    }
32
33
    public function testKernelInterface()
34
    {
35
        $this->assertInstanceOf(
36
            // ...::class, // 5.4 < php
0 ignored issues
show
Unused Code Comprehensibility introduced by
50% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
37
            'Symfony\Component\HttpKernel\KernelInterface',
38
            new AppKernel('dev', true)
39
        );
40
    }
41
42
    public function testReturnsResponse()
43
    {
44
        $this->assertInstanceOf(
45
            // Response::class, // 5.4 < php
46
            'Symfony\Component\HttpFoundation\Response',
47
            (new AppKernel('dev', true))->handle(Request::create('/', 'GET'))
48
        );
49
    }
50
}
51
52
// http://api.symfony.com/3.3/Symfony/Bridge/Twig/TwigEngine.html
53
// http://api.symfony.com/3.3/Symfony/Bundle/TwigBundle/TwigEngine.html
54