Passed
Push — master ( 8b508b...69c8c9 )
by Alexander
02:00
created

UrlHelperTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testAppend() 0 14 1
1
<?php
2
3
namespace Horat1us\Yii\Tests\Helpers;
4
5
use Horat1us\Yii\Helpers\UrlHelper;
6
use Horat1us\Yii\Tests\AbstractTestCase;
7
8
/**
9
 * Class UrlHelperTest
10
 * @package Horat1us\Yii\Tests\Helpers
11
 * @internal
12
 */
13
class UrlHelperTest extends AbstractTestCase
14
{
15
    public function testAppend()
16
    {
17
        $url = 'https://horatius.pro/abc/c?route=1&multiple%5B0%5D=1';
18
        $processedUrl = UrlHelper::append($url, [
19
            'action' => 'undefined',
20
            'multiple' => [
21
                2
22
            ],
23
        ]);
24
        $this->assertEquals(
25
            'https://horatius.pro/abc/c?route=1&multiple%5B0%5D=2&action=undefined',
26
            $processedUrl
27
        );
28
    }
29
}