Completed
Push — master ( 298f36...c6c82d )
by Mihail
06:19 queued 10s
created

ArrayDataFIlterTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 22
rs 10
wmc 2
1
<?php
2
3
namespace Koded\Stdlib;
4
5
use PHPUnit\Framework\TestCase;
6
7
class ArrayDataFIlterTest extends TestCase
8
{
9
10
    /**
11
     * @dataProvider iterableData
12
     */
13
    public function test_iterable_data($data)
14
    {
15
        $object = new Arguments;
16
17
        $this->assertEquals(['key0' => 'val0'], $object->filter($data, 'prefix.'));
18
    }
19
20
    public function iterableData()
21
    {
22
        $gen = function() {
23
            yield 'prefix.key0' => 'val0';
24
        };
25
26
        return [
27
            [['prefix.key0' => 'val0']],
28
            [$gen()],
29
        ];
30
    }
31
}
32