Added test data for <object> and <data> tags

This commit is contained in:
Yusuf Kandemir 2018-11-13 19:54:01 +03:00
parent c87b49408a
commit 5c694a7e4c
3 changed files with 42 additions and 0 deletions

View File

@ -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')
],
];
}

View File

@ -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" ]
}
}
]
}
}
]
}

View File

@ -0,0 +1,18 @@
<!-- URI: http://tickets.example.com/my-tickets/ -->
<!DOCTYPE HTML>
<html>
<head>
<title>My Tickets</title>
</head>
<body>
<h1>My Tickets</h1>
<div itemscope itemtype="http://schema.org/Ticket">
Ticket Number: <span itemprop="ticketNumber">abc123</span>
Ticket Token: <object itemprop="ticketToken" width="50" height="50" data="barcode_abc123.pdf"></object>
Ticketed Seat: <div itemprop="ticketedSeat" itemscope itemtype="http://schema.org/Seat">
Row-Number: <span itemprop="seatRow">A</span> - <span itemprop="seatNumber">12</span>
Location: <data itemprop="seatSection" value="101">Orchestra</data>
</div>
</div>
</body>
</html>