Completed
Push — master ( e32202...083db4 )
by Alex
08:17
created

RequestTestTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 10
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * This file is part of the PierstovalCharacterManagerBundle package.
5
 *
6
 * (c) Alexandre Rock Ancelet <[email protected]>
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 Pierstoval\Bundle\CharacterManagerBundle\Tests;
13
14
use Symfony\Component\HttpFoundation\Request;
15
use Symfony\Component\HttpFoundation\Session\Session;
16
use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
17
18
trait RequestTestTrait
19
{
20
    protected function createRequest(): Request
21
    {
22
        $request = new Request();
23
        $request->setSession(new Session(new MockArraySessionStorage()));
24
25
        return $request;
26
    }
27
}
28