Skip to content

Commit 7dbe03d

Browse files
committed
Fix three tests that failed with the new algorithm
1 parent e1de3ea commit 7dbe03d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/Mf2/ParseImpliedTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ public function testParsesImpliedNameConsistentWithPName() {
193193
$inner = "Name \nand more";
194194
$test = '<span class="h-card"> ' . $inner .' </span><span class="h-card"><span class="p-name"> ' . $inner . ' </span></span>';
195195
$result = Mf2\parse($test);
196-
$this->assertEquals($inner, $result['items'][0]['properties']['name'][0]);
197-
$this->assertEquals($inner, $result['items'][1]['properties']['name'][0]);
196+
$this->assertEquals('Name and more', $result['items'][0]['properties']['name'][0]);
197+
$this->assertEquals('Name and more', $result['items'][1]['properties']['name'][0]);
198198
}
199199

200200

tests/Mf2/ParserTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function testParseEResolvesRelativeLinks() {
9393
$output = $parser->parse();
9494

9595
$this->assertEquals('Blah blah <a href="http://example.com/a-url">thing</a>. <object data="http://example.com/object"></object> <img src="http://example.com/img">', $output['items'][0]['properties']['content'][0]['html']);
96-
$this->assertEquals('Blah blah thing. http://example.com/img', $output['items'][0]['properties']['content'][0]['value']);
96+
$this->assertEquals('Blah blah thing. http://example.com/img', $output['items'][0]['properties']['content'][0]['value']);
9797
}
9898

9999
public function testParseEWithBR() {
@@ -156,7 +156,7 @@ public function testHtmlEncodesNonEProperties() {
156156

157157

158158
public function testHtmlEncodesImpliedProperties() {
159-
$input = '<a class="h-card" href="&lt;url&gt;"><img src="&lt;img&gt;" />&lt;name&gt;</a>';
159+
$input = '<a class="h-card" href="&lt;url&gt;"><img src="&lt;img&gt;" alt="" />&lt;name&gt;</a>';
160160
$parser = new Parser($input);
161161
$output = $parser->parse();
162162

0 commit comments

Comments
 (0)