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

ArrayHelperTest::testPermuting()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

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