diff --git a/tests/ParseTest.php b/tests/ParseTest.php index 5714dd5..9104cdb 100644 --- a/tests/ParseTest.php +++ b/tests/ParseTest.php @@ -235,4 +235,15 @@ class ParseTest extends PHPUnit_Framework_TestCase { $this->assertEquals('Hello World', $data['data']['content']['text']); } + public function testSingleHEntryHasNoPermalink() { + $url = 'http://source.example.com/single-h-entry-has-no-permalink'; + $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('Hello World', $data['data']['content']['text']); + } + } diff --git a/tests/data/author.example.com/h-entry-author-is-url-to-h-card-on-page b/tests/data/author.example.com/h-entry-author-is-url-to-h-card-on-page index fd61e9d..a932372 100644 --- a/tests/data/author.example.com/h-entry-author-is-url-to-h-card-on-page +++ b/tests/data/author.example.com/h-entry-author-is-url-to-h-card-on-page @@ -14,6 +14,7 @@ Content-Type: text/html; charset=utf-8
Hello World
+diff --git a/tests/data/author.example.com/h-entry-has-h-card-and-url-author b/tests/data/author.example.com/h-entry-has-h-card-and-url-author index 28dbeb0..21fc7e1 100644 --- a/tests/data/author.example.com/h-entry-has-h-card-and-url-author +++ b/tests/data/author.example.com/h-entry-has-h-card-and-url-author @@ -23,7 +23,8 @@ Content-Type: text/html; charset=utf-8
Hello World
- + + permalink diff --git a/tests/data/source.example.com/single-h-entry-has-no-permalink b/tests/data/source.example.com/single-h-entry-has-no-permalink new file mode 100644 index 0000000..9584094 --- /dev/null +++ b/tests/data/source.example.com/single-h-entry-has-no-permalink @@ -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 + + +
+
+ +
+