diff --git a/tests/ParseTest.php b/tests/ParseTest.php index bff8e27..f9cc794 100644 --- a/tests/ParseTest.php +++ b/tests/ParseTest.php @@ -190,4 +190,16 @@ class ParseTest extends PHPUnit_Framework_TestCase { $this->assertEquals('Hello World', $data['data']['content']['text']); } + public function testHEntryRSVP() { + $url = 'http://source.example.com/h-entry-rsvp'; + $response = $this->parse(['url' => $url]); + + $body = $response->getContent(); + $this->assertEquals(200, $response->getStatusCode()); + $data = json_decode($body, true); + $this->assertEquals('entry', $data['data']['type']); + $this->assertEquals('I\'ll be there!', $data['data']['name']); + $this->assertEquals('yes', $data['data']['rsvp']); + } + } diff --git a/tests/data/source.example.com/h-entry-rsvp b/tests/data/source.example.com/h-entry-rsvp new file mode 100644 index 0000000..edbe224 --- /dev/null +++ b/tests/data/source.example.com/h-entry-rsvp @@ -0,0 +1,16 @@ +HTTP/1.1 200 OK +Server: Apache +Date: Wed, 09 Dec 2015 03:29:14 GMT +Content-Type: text/html; charset=utf-8 +Connection: keep-alive + + + + Test + + +
+ I'll be there! +
+ +