diff --git a/tests/MicrodataParserTest.php b/tests/MicrodataParserTest.php index 27cef6f..46e87b0 100644 --- a/tests/MicrodataParserTest.php +++ b/tests/MicrodataParserTest.php @@ -70,6 +70,9 @@ class MicrodataParserTest extends \PHPUnit\Framework\TestCase 'Itemref & src based tags' => [ $this->getTestData('Itemref', 'source.html', 'result.json') ], + 'Object & Data tags' => [ + $this->getTestData('Object & Data', 'source.html', 'result.json') + ], ]; } diff --git a/tests/data/Object & Data/result.json b/tests/data/Object & Data/result.json new file mode 100644 index 0000000..7234ac4 --- /dev/null +++ b/tests/data/Object & Data/result.json @@ -0,0 +1,21 @@ +{ + "items": [ + { + "type": [ "http://schema.org/Ticket" ], + "properties": { + "ticketNumber": [ "abc123" ], + "ticketToken": [ "http://tickets.example.com/my-tickets/barcode_abc123.pdf" ], + "ticketedSeat": [ + { + "type": [ "http://schema.org/Seat" ], + "properties": { + "seatRow": [ "A" ], + "seatNumber": [ "12" ], + "seatSection": [ "101" ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/tests/data/Object & Data/source.html b/tests/data/Object & Data/source.html new file mode 100644 index 0000000..f8ec16e --- /dev/null +++ b/tests/data/Object & Data/source.html @@ -0,0 +1,18 @@ + + + + + My Tickets + + +

My Tickets

+
+ Ticket Number: abc123 + Ticket Token: + Ticketed Seat:
+ Row-Number: A - 12 + Location: Orchestra +
+
+ +