Completed
Pull Request — master (#14)
by Fabien
08:10 queued 03:47
created

ArrayFunctionsTest::testArrayValuesRecursive()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

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