|
@ -460,6 +460,18 @@ class ParseTest extends PHPUnit_Framework_TestCase { |
|
|
$this->assertEquals('Hello World', $data['data']['content']['text']); |
|
|
$this->assertEquals('Hello World', $data['data']['content']['text']); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function testHEntryWithTwoHCardsBeforeIt() { |
|
|
|
|
|
$url = 'http://source.example.com/h-entry-with-two-h-cards-before-it'; |
|
|
|
|
|
$response = $this->parse(['url' => $url]); |
|
|
|
|
|
|
|
|
|
|
|
$body = $response->getContent(); |
|
|
|
|
|
$this->assertEquals(200, $response->getStatusCode()); |
|
|
|
|
|
$data = json_decode($body, true); |
|
|
|
|
|
$this->assertEquals('mf2+html', $data['source-format']); |
|
|
|
|
|
$this->assertEquals('entry', $data['data']['type']); |
|
|
|
|
|
$this->assertEquals('Hello World', $data['data']['content']['text']); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public function testHEntryRedirectWithHCardSibling() { |
|
|
public function testHEntryRedirectWithHCardSibling() { |
|
|
$url = 'http://source.example.com/h-entry-redirect-with-h-card-sibling'; |
|
|
$url = 'http://source.example.com/h-entry-redirect-with-h-card-sibling'; |
|
|
$response = $this->parse(['url' => $url]); |
|
|
$response = $this->parse(['url' => $url]); |
|
|