diff --git a/tests/ParseTest.php b/tests/ParseTest.php index 1af1491..e793555 100644 --- a/tests/ParseTest.php +++ b/tests/ParseTest.php @@ -1311,4 +1311,14 @@ class ParseTest extends PHPUnit\Framework\TestCase $this->assertEquals('entry', $data['data']['type']); } + public function testMissingContent() { + $url = 'http://source.example.com/bookmark-missing-content'; + $response = $this->parse(['url' => $url]); + $body = $response->getContent(); + $this->assertEquals(200, $response->getStatusCode()); + $data = json_decode($body, true); + + $this->assertArrayNotHasKey('content', $data['data']); + } + } diff --git a/tests/data/source.example.com/bookmark-missing-content b/tests/data/source.example.com/bookmark-missing-content new file mode 100644 index 0000000..5daa795 --- /dev/null +++ b/tests/data/source.example.com/bookmark-missing-content @@ -0,0 +1,73 @@ +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 + + + + A Brief History & Ethos of the Digital Garden + + + + + + + + +
+

svenknebel.de

+ +
+
+ +
+
+ +
+
+ +