Closed Tiskiel closed 8 months ago
Hi there,
I have implemented the dot notation as spoked above.
Here is an example :
it('ensures it work with dot notation', function () {
$nestedDictionary = [
'foo' => [
'bar' => [
'john' => 'doe',
],
],
];
expect($nestedDictionary)
->at('foo.bar.john')->toBe('doe');
});
No plans for this.
What:
Description:
Implementation of the
at
method. This will allow you to target an index or key on an iterable and apply other expectation methods to the value. It provides better readability and works on nested arrays.Example below: