ConsoleRequestParamsUnitTest::testGetParam()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

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