Completed
Push — master ( 0926c2...16eb90 )
by WEBEWEB
01:52
created

LayoutControllerTest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 4
dl 0
loc 54
rs 10
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of the core-bundle package.
5
 *
6
 * (c) 2018 WEBEWEB
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
namespace WBW\Bundle\CoreBundle\Tests\Controller;
13
14
use WBW\Bundle\CoreBundle\Tests\AbstractWebTestCase;
15
16
/**
17
 * Layout controller test.
18
 *
19
 * @author webeweb <https://github.com/webeweb/>
20
 * @package WBW\Bundle\CoreBundle\Tests\Controller
21
 */
22
class LayoutControllerTest extends AbstractWebTestCase {
23
24
    /**
25
     * {@inheritDoc}
26
     */
27
    public static function setUpBeforeClass(): void {
28
        parent::setUpBeforeClass();
29
30
        parent::setUpSchemaTool();
31
        parent::setUpUserFixtures();
32
    }
33
34
    /**
35
     * Tests the Resources/views/email/layout.html.twig template.
36
     *
37
     * @return void
38
     */
39
    public function testEmailAction(): void {
40
41
        $client = $this->client;
42
43
        $client->request("GET", "/email");
44
        $this->assertEquals(200, $client->getResponse()->getStatusCode());
45
        $this->assertEquals("text/html; charset=UTF-8", $client->getResponse()->headers->get("Content-Type"));
46
    }
47
48
    /**
49
     * Tests the Resources/views/layout/javascripts.html.twig template.
50
     *
51
     * @return void
52
     */
53
    public function testJavascriptsAction(): void {
54
55
        $client = $this->client;
56
57
        $client->request("GET", "/javascripts");
58
        $this->assertEquals(200, $client->getResponse()->getStatusCode());
59
        $this->assertEquals("text/html; charset=UTF-8", $client->getResponse()->headers->get("Content-Type"));
60
    }
61
62
    /**
63
     * Tests the Resources/views/layout/stylesheets.html.twig template.
64
     *
65
     * @return void
66
     */
67
    public function testStylesheetsAction(): void {
68
69
        $client = static::createClient();
70
71
        $client->request("GET", "/stylesheets");
72
        $this->assertEquals(200, $client->getResponse()->getStatusCode());
73
        $this->assertEquals("text/html; charset=UTF-8", $client->getResponse()->headers->get("Content-Type"));
74
    }
75
}
76