ViewsControllerTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 9
c 1
b 0
f 0
dl 0
loc 28
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testAssetsStylesheetsAction() 0 7 1
A testAssetsJavascriptsAction() 0 7 1
1
<?php
2
3
/*
4
 * This file is part of the jquery-datatables-bundle package.
5
 *
6
 * (c) 2022 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\JQuery\DataTablesBundle\Tests\Controller;
13
14
use WBW\Bundle\JQuery\DataTablesBundle\Tests\AbstractWebTestCase;
15
16
/**
17
 * Views controller test.
18
 *
19
 * @author webeweb <https://github.com/webeweb>
20
 * @package WBW\Bundle\JQuery\DataTablesBundle\Tests\Controller
21
 */
22
class ViewsControllerTest extends AbstractWebTestCase {
23
24
    /**
25
     * Test Resources/views/assets/_javascripts.html.twig
26
     *
27
     * @return void
28
     */
29
    public function testAssetsJavascriptsAction(): void {
30
31
        $client = $this->client;
32
33
        $client->request("GET", "/assets/javascripts");
34
        $this->assertEquals(200, $client->getResponse()->getStatusCode());
35
        $this->assertEquals("text/html; charset=UTF-8", $client->getResponse()->headers->get("Content-Type"));
36
    }
37
38
    /**
39
     * Test Resources/views/assets/_stylesheets.html.twig
40
     *
41
     * @return void
42
     */
43
    public function testAssetsStylesheetsAction(): void {
44
45
        $client = $this->client;
46
47
        $client->request("GET", "/assets/stylesheets");
48
        $this->assertEquals(200, $client->getResponse()->getStatusCode());
49
        $this->assertEquals("text/html; charset=UTF-8", $client->getResponse()->headers->get("Content-Type"));
50
    }
51
}
52