comparison core/modules/comment/tests/src/Functional/CommentThreadingTest.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents a9cd425dd02b
children
comparison
equal deleted inserted replaced
4:a9cd425dd02b 5:12f9dff5fda9
133 // <article> 133 // <article>
134 // <p class="parent"> 134 // <p class="parent">
135 // <a href="...comment-1"></a> 135 // <a href="...comment-1"></a>
136 // </p> 136 // </p>
137 // </article> 137 // </article>
138 $pattern = "//a[@id='comment-$cid']/following-sibling::article//p[contains(@class, 'parent')]//a[contains(@href, 'comment-$pid')]"; 138 $pattern = "//article[@id='comment-$cid']//p[contains(@class, 'parent')]//a[contains(@href, 'comment-$pid')]";
139 139
140 $this->assertFieldByXpath($pattern, NULL, format_string( 140 $this->assertFieldByXpath($pattern, NULL, format_string(
141 'Comment %cid has a link to parent %pid.', 141 'Comment %cid has a link to parent %pid.',
142 [ 142 [
143 '%cid' => $cid, 143 '%cid' => $cid,
157 // <a id="comment-2"></a> 157 // <a id="comment-2"></a>
158 // <article> 158 // <article>
159 // <p class="parent"></p> 159 // <p class="parent"></p>
160 // </article> 160 // </article>
161 161
162 $pattern = "//a[@id='comment-$cid']/following-sibling::article//p[contains(@class, 'parent')]"; 162 $pattern = "//article[@id='comment-$cid']//p[contains(@class, 'parent')]";
163 $this->assertNoFieldByXpath($pattern, NULL, format_string( 163 $this->assertNoFieldByXpath($pattern, NULL, format_string(
164 'Comment %cid does not have a link to a parent.', 164 'Comment %cid does not have a link to a parent.',
165 [ 165 [
166 '%cid' => $cid, 166 '%cid' => $cid,
167 ] 167 ]