Test Failed
Push — master ( c33ad8...25b8d1 )
by Pavel
17:30 queued 06:24
created

AccessTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 2
dl 0
loc 22
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testEntityRouting() 0 10 1
A doRequest() 0 6 1
1
<?php
2
3
namespace ScayTrase\Api\Cruds\Tests;
4
5
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
6
7
class AccessTest extends WebTestCase
8
{
9
    use CrudsTestCaseTrait;
10
11
    public function testEntityRouting()
12
    {
13
        self::bootKernel();
14
15
        $this->doRequest('/api/entity/my-entity/create', 'POST', []);
16
        $this->doRequest('/api/entity/my-entity/read', 'GET', []);
17
        $this->doRequest('/api/entity/my-entity/update', 'POST', []);
18
        $this->doRequest('/api/entity/my-entity/delete', 'POST', []);
19
        $this->doRequest('/api/entity/my-entity/search', 'GET', []);
20
    }
21
22
    private function doRequest($path, $method, array $args = [])
0 ignored issues
show
Unused Code introduced by
The parameter $args is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
23
    {
24
        $client = self::createClient();
25
        $client->request($method, $path);
26
27
    }
28
}
29