Passed
Push — master ( 844237...31f093 )
by Fabien
03:30
created

ArrayFunctionsTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testArrayValuesRecursive() 0 13 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(Array(1, 2));
23
        $this->assertEquals(Array(1, 2), $result);
24
25
        $result = $arrayFunction->arrayValuesRecursive(Array(Array(1, 2), Array(3, 4)));
26
        $this->assertEquals(Array(1, 2, 3, 4), $result);
27
28
        $result = $arrayFunction->arrayValuesRecursive(Array(Array(Array(1))));
29
        $this->assertEquals(Array(1), $result);
30
    }
31
}
32