ArrayFunctionsTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 14
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testArrayValuesRecursive() 0 12 1
1
<?php
2
3
/*
4
 * This file is part of the FabienCrassat\CurriculumVitaeBundle Symfony bundle.
5
 *
6
 * (c) Fabien Crassat <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace FabienCrassat\CurriculumVitaeBundle\Tests\Utility;
13
14
use FabienCrassat\CurriculumVitaeBundle\Utility\ArrayFunctions;
15
16
class ArrayFunctionsTest extends \PHPUnit\Framework\TestCase
17
{
18
    public function testArrayValuesRecursive()
19
    {
20
        $arrayFunction = new ArrayFunctions();
21
22
        $result = $arrayFunction->arrayValuesRecursive([1, 2]);
23
        $this->assertEquals([1, 2], $result);
24
25
        $result = $arrayFunction->arrayValuesRecursive([[1, 2], [3, 4]]);
26
        $this->assertEquals([1, 2, 3, 4], $result);
27
28
        $result = $arrayFunction->arrayValuesRecursive([[[1]]]);
29
        $this->assertEquals([1], $result);
30
    }
31
}
32