Completed
Push — master ( 71dd86...39d07c )
by
unknown
12:25 queued 11s
created

TruncateControllerTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testTruncate() 0 8 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Sonata Project package.
7
 *
8
 * (c) Thomas Rabaix <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Sonata\NewsBundle\Tests\Functional\Controller;
15
16
use PHPUnit\Framework\TestCase;
17
use Sonata\NewsBundle\Tests\App\AppKernel;
18
use Symfony\Bundle\FrameworkBundle\Client;
19
use Symfony\Component\HttpFoundation\Request;
20
use Symfony\Component\HttpFoundation\Response;
21
22
final class TruncateControllerTest extends TestCase
23
{
24
    public function testTruncate(): void
25
    {
26
        $client = new Client(new AppKernel());
0 ignored issues
show
Deprecated Code introduced by
The class Symfony\Bundle\FrameworkBundle\Client has been deprecated with message: since Symfony 4.3, use KernelBrowser instead.

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
27
        $client->request(Request::METHOD_GET, '/u_truncate_test');
28
29
        $this->assertSame(Response::HTTP_OK, $client->getResponse()->getStatusCode());
30
        $this->assertSame('test', $client->getResponse()->getContent());
31
    }
32
}
33