From 4c61222474317858444ca17d5d18920eb40b70e6 Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Sun, 25 Mar 2018 09:11:25 -0700 Subject: [PATCH] add failing test for excluding the generated data element in rel tag backcompat for PR #164 --- tests/Mf2/ClassicMicroformatsTest.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/Mf2/ClassicMicroformatsTest.php b/tests/Mf2/ClassicMicroformatsTest.php index e6c7921..444331e 100644 --- a/tests/Mf2/ClassicMicroformatsTest.php +++ b/tests/Mf2/ClassicMicroformatsTest.php @@ -888,6 +888,25 @@ public function testHEntryRelTag() { $this->assertContains('wordpress', $output['items'][0]['properties']['category']); } + public function testHEntryRelTagInContent() { + $input = <<< END +
+
+ Entry content should not include the generated data element for rel tag backcompat + +
+
+END; + + $parser = new Parser($input); + $output = $parser->parse(); + $item = $output['items'][0]; + + $this->assertEquals(['test'], $item['properties']['category']); + $this->assertEquals('Entry content should not include the generated data element for rel tag backcompat', $item['properties']['content'][0]['value']); + $this->assertEquals('Entry content should not include the generated data element for rel tag backcompat', $item['properties']['content'][0]['html']); + } + /** * @see https://github.com/indieweb/php-mf2/issues/157 * @see source: http://jg.typepad.com/ciel/2006/02/daniel_bouluds_.html