Added test data for <object> and <data> tags
This commit is contained in:
parent
c87b49408a
commit
5c694a7e4c
@ -70,6 +70,9 @@ class MicrodataParserTest extends \PHPUnit\Framework\TestCase
|
|||||||
'Itemref & src based tags' => [
|
'Itemref & src based tags' => [
|
||||||
$this->getTestData('Itemref', 'source.html', 'result.json')
|
$this->getTestData('Itemref', 'source.html', 'result.json')
|
||||||
],
|
],
|
||||||
|
'Object & Data tags' => [
|
||||||
|
$this->getTestData('Object & Data', 'source.html', 'result.json')
|
||||||
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
21
tests/data/Object & Data/result.json
Normal file
21
tests/data/Object & Data/result.json
Normal 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" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
18
tests/data/Object & Data/source.html
Normal file
18
tests/data/Object & Data/source.html
Normal 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>
|
Loading…
Reference in New Issue
Block a user