Passed
Push — master ( a58ef6...fc3cb3 )
by Alex
10:58 queued 01:08
created

ConsoleRequestParamsUnitTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 19
rs 10
c 0
b 0
f 0
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
class ConsoleRequestParamsUnitTest extends \PHPUnit\Framework\TestCase
8
{
9
10
    /**
11
     * Testing getParam method
12
     */
13
    public function testGetParam(): void
14
    {
15
        // setup
16
        $router = new Router();
17
        $requestParams = new ConsoleRequestParams($router);
18
        global $argv;
19
        $argv['param'] = 'value';
20
21
        // test body
22
        $result = $requestParams->getParam('param');
23
24
        // assertions
25
        $this->assertEquals('value', $result);
26
    }
27
}
28