Passed
Push — master ( f7d584...3bbc21 )
by Alexander
02:20
created

ArrayHelperTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testPermuting() 0 8 1
1
<?php
2
3
4
namespace Horat1us\Yii\Tests\Helpers;
5
6
7
use Horat1us\Yii\Helpers\ArrayHelper;
8
use Horat1us\Yii\Tests\AbstractTestCase;
9
10
/**
11
 * Class ArrayHelperTest
12
 * @package Horat1us\Yii\Tests\Helpers
13
 *
14
 * @internal
15
 */
16
class ArrayHelperTest extends AbstractTestCase
17
{
18
    public function testPermuting()
19
    {
20
        $input = ['a', 'b',];
21
        $output = ArrayHelper::permute($input);
22
        $this->assertCount(2, $output);
23
        $this->assertEquals(['a', 'b',], $output[0]);
24
        $this->assertEquals(['b', 'a',], $output[1]);
25
    }
26
}