Extract by key
public extractByKey ( Traversable $iterator, string $key ) : mixed | ||
$iterator | Traversable | |
$key | string | |
Résultat | mixed | NULL or whatever we found at $key |
/** * @test * @dataProvider simpleStructures */ public function extractByKeyExtractsKeyByPath($structure, $key, $expected) { $this->assertSame($expected, $this->fixture->extractByKey($structure, $key)); }