ConsoleRequestParamsUnitTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 7
c 1
b 1
f 0
dl 0
loc 19
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testGetParam() 0 13 1
1
<?php
2
namespace Mezon\Service\Tests;
3
4
use Mezon\Router\Router;
5
use Mezon\Service\ServiceConsoleTransport\ConsoleRequestParams;
6
7
/**
8
 *
9
 * @psalm-suppress PropertyNotSetInConstructor
10
 */
11
class ConsoleRequestParamsUnitTest extends \PHPUnit\Framework\TestCase
12
{
13
14
    /**
15
     * Testing getParam method
16
     */
17
    public function testGetParam(): void
18
    {
19
        // setup
20
        $router = new Router();
21
        $requestParams = new ConsoleRequestParams($router);
22
        global $argv;
23
        $argv[0] = './vendor/phpunit/phpunit/phpunit';
24
25
        // test body
26
        $result = $requestParams->getParam(0);
27
28
        // assertions
29
        $this->assertEquals('./vendor/phpunit/phpunit/phpunit', $result);
30
    }
31
}
32