Browse Source

Updated test to make sure that the h-card URL property exists even on h-cards with no URL

pull/111/head
Barnaby Walters 1 year ago
parent
commit
4d4ab89ec0
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      tests/LibraryTest.php

+ 2
- 0
tests/LibraryTest.php View File

@ -78,6 +78,8 @@ class LibraryTest extends PHPUnit\Framework\TestCase
$xray = new p3k\XRay();
$data = $xray->parse($url, $html);
$this->assertEquals('card', $data['data']['type']);
// On pages where the h-card is the main data but lacks a URL property, it will be filled with the page URL.
$this->assertEquals($url, $data['data']['url']);
}
public function testDefaultOptionsAreUsed()

Loading…
Cancel
Save