Completed
Push — master ( b1c6ca...52cd2c )
by Kamil
77:57 queued 60:05
created

it_renders_template_events_blocks()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 18

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 18
rs 9.6666
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
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
declare(strict_types=1);
13
14
namespace Sylius\Bundle\UiBundle\Tests\Functional;
15
16
use PHPUnit\Framework\Assert;
17
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
18
use Twig\Environment;
19
20
final class TemplateEventTest extends KernelTestCase
21
{
22
    /** @test */
23
    public function it_renders_template_events_blocks(): void
24
    {
25
        self::bootKernel();
26
27
        /** @var Environment $twig */
28
        $twig = self::$container->get('twig');
29
30
        // See Kernel.php for the configuration resulting in those lines
31
        $expectedLines = [
32
            'First block',
33
            'Second block',
34
            'Third block',
35
            'The king is dead, long live the king!',
36
        ];
37
        $renderedLines = array_values(array_filter(explode("\n", $twig->render('templateEvents.txt.twig'))));
38
39
        Assert::assertSame($expectedLines, $renderedLines);
40
    }
41
}
42