Skip to content

Commit 6b0232b

Browse files
committed
Add broken test for unique and sorted rel values under rel-urls
1 parent e044330 commit 6b0232b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/Mf2/RelTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,4 +176,16 @@ public function testRelURLs() {
176176
$this->assertArrayHasKey('rels', $output['rel-urls']['http://example.com/articles.atom']);
177177
}
178178

179+
/**
180+
* @see https://github.com/microformats/microformats2-parsing/issues/29
181+
* @see https://github.com/microformats/microformats2-parsing/issues/30
182+
*/
183+
public function testRelURLsRelsUniqueAndSorted() {
184+
$input = '<a href="#" rel="me bookmark"></a>
185+
<a href="#" rel="bookmark archived"></a>';
186+
$parser = new Parser($input);
187+
$output = $parser->parse();
188+
$this->assertEquals($output['rel-urls']['#']['rels'], ['archived', 'bookmark', 'me']);
189+
}
190+
179191
}

0 commit comments

Comments
 (0)