diff --git a/tests/MicrodataParserTest.php b/tests/MicrodataParserTest.php index 3d9727b..d9c4480 100644 --- a/tests/MicrodataParserTest.php +++ b/tests/MicrodataParserTest.php @@ -96,6 +96,9 @@ class MicrodataParserTest extends \PHPUnit\Framework\TestCase 'Object & Data tags' => [ $this->getTestData('Object & Data', 'source.html', 'result.json') ], + 'Itemid & Content attributes' => [ + $this->getTestData('Itemid & Content', 'source.html', 'result.json') + ], ]; } diff --git a/tests/data/Itemid & Content/result.json b/tests/data/Itemid & Content/result.json new file mode 100644 index 0000000..f667910 --- /dev/null +++ b/tests/data/Itemid & Content/result.json @@ -0,0 +1,14 @@ +{ + "items": [ + { + "id": "urn:isbn:0-330-34032-8", + "type": [ "https://vocab.example.net/book" ], + "properties": { + "title": [ "The Reality Dysfunction" ], + "author": [ "Peter F. Hamilton" ], + "date": [ "1996-01-26" ], + "publisher": [ "Macmillan Publishers Limited" ] + } + } + ] +} diff --git a/tests/data/Itemid & Content/source.html b/tests/data/Itemid & Content/source.html new file mode 100644 index 0000000..9a9c6dc --- /dev/null +++ b/tests/data/Itemid & Content/source.html @@ -0,0 +1,15 @@ + + + + + The Reality Dysfunction + + +
+
Title: The Reality Dysfunction
+
Author:
+
Publication date:
+ +
+ +