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

AccessTest::testEntityRouting()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 10
rs 9.4285
cc 1
eloc 7
nc 1
nop 0
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