diff --git a/tests/src/Util/JSonLDTest.php b/tests/src/Util/JSonLDTest.php index 1cb1bb1f9b..617e771f49 100644 --- a/tests/src/Util/JSonLDTest.php +++ b/tests/src/Util/JSonLDTest.php @@ -37,6 +37,15 @@ class JsonLDTest extends TestCase $this->assertNull($data); } + public function testFetchElementArrayFoundID() + { + $object = ['field' => ['value1', ['@id' => 'value2'], ['@id' => 'value3']]]; + + $data = JsonLD::fetchElementArray($object, 'field', '@id'); + $this->assertSame(['value1', 'value2', 'value3'], $data); + } + + public function testFetchElementNotFound() { $object = [];