LuckyControllerTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testLuckyNumber() 0 7 1
A testLuckyHello() 0 7 1
1
<?php
2
3
namespace App\Tests\Controller;
4
5
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
6
7
/**
8
 * @group controller
9
 */
10
class LuckyControllerTest extends WebTestCase
11
{
12
    /**
13
     * Test the /lucky/number route.
14
     */
15
    public function testLuckyNumber(): void
16
    {
17
        $client = static::createClient();
18
        $client->request('GET', '/lucky/number');
19
20
        $this->assertResponseIsSuccessful();
21
        $this->assertSelectorTextContains('body', 'Lucky number:');
22
    }
23
24
    /**
25
     * Test the /lucky/hello route.
26
     */
27
    public function testLuckyHello(): void
28
    {
29
        $client = static::createClient();
30
        $client->request('GET', '/lucky/hello');
31
32
        $this->assertResponseIsSuccessful();
33
        $this->assertSelectorTextContains('body', 'Hello to you!');
34
    }
35
}
36