Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6188041

Browse filesBrowse files
Merge branch '6.4' into 7.0
* 6.4: [PhpUnitBridge] Kill the last concurrent process when it stales for more than 60s [Intl] fix test [Intl] Use VarExporter::export() in PhpBundleWriter [Console] The application also catch `\Throwable` exceptions FrameworkBundle] Fix tests [Mailer] Fix Brevo transport factory registration Simplify tests [Notifier] Fix Esendex messages serialization Use triggering class to generate baseline for deprecation messages from DebugClassLoader [Security] Fix false-string handling in RememberMeAuthenticator [CssSelector] Tests on Xpath translator will always pass [Serializer] Fix Normalizer not utilizing converted name for index variadic param [DepdencyInjection] Fix costly logic when checking errored definitions Fix merge fix children cond [DoctrineBridge] Load refreshed user proxy [DependencyInjection] Don't ignore attributes on the actual decorator [FrameworkBundle] Prevent `cache:clear` to lose files on subsequent runs
2 parents c9ffa75 + 883d961 commit 6188041
Copy full SHA for 6188041

File tree

Expand file treeCollapse file tree

2 files changed

+11
-7
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+11
-7
lines changed

‎Tests/XPath/Fixtures/ids.html

Copy file name to clipboardExpand all lines: Tests/XPath/Fixtures/ids.html
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,8 @@
4545
</div>
4646
<div id="foobar-div" foobar="ab bc
4747
cde"><span id="foobar-span"></span></div>
48-
</body></html>
48+
<section>
49+
<span id="no-siblings-of-any-type"></span>
50+
</section>
51+
</body>
52+
</html>

‎Tests/XPath/TranslatorTest.php

Copy file name to clipboardExpand all lines: Tests/XPath/TranslatorTest.php
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function testHtmlIds($css, array $elementsId)
114114
$document->loadHTMLFile(__DIR__.'/Fixtures/ids.html');
115115
$document = simplexml_import_dom($document);
116116
$elements = $document->xpath($translator->cssToXPath($css));
117-
$this->assertCount(\count($elementsId), $elementsId);
117+
$this->assertCount(\count($elementsId), $elements);
118118
foreach ($elements as $element) {
119119
if (null !== $element->attributes()->id) {
120120
$this->assertContains((string) $element->attributes()->id, $elementsId);
@@ -304,14 +304,14 @@ public static function getHtmlIdsTestData()
304304
['li:nth-last-child(-n+1)', ['seventh-li']],
305305
['li:nth-last-child(-n+3)', ['fifth-li', 'sixth-li', 'seventh-li']],
306306
['ol:first-of-type', ['first-ol']],
307-
['ol:nth-child(1)', ['first-ol']],
307+
['ol:nth-child(4)', ['first-ol']],
308308
['ol:nth-of-type(2)', ['second-ol']],
309309
['ol:nth-last-of-type(1)', ['second-ol']],
310-
['span:only-child', ['foobar-span']],
310+
['span:only-child', ['foobar-span', 'no-siblings-of-any-type']],
311311
['li div:only-child', ['li-div']],
312312
['div *:only-child', ['li-div', 'foobar-span']],
313313
['p:only-of-type', ['paragraph']],
314-
[':only-of-type', ['html', 'li-div', 'foobar-span', 'paragraph']],
314+
[':only-of-type', ['html', 'li-div', 'foobar-span', 'no-siblings-of-any-type']],
315315
['div#foobar-div :only-of-type', ['foobar-span']],
316316
['a:empty', ['name-anchor']],
317317
['a:EMpty', ['name-anchor']],
@@ -320,8 +320,8 @@ public static function getHtmlIdsTestData()
320320
['html:root', ['html']],
321321
['li:root', []],
322322
['* :root', []],
323-
['*:contains("link")', ['html', 'outer-div', 'tag-anchor', 'nofollow-anchor']],
324-
[':CONtains("link")', ['html', 'outer-div', 'tag-anchor', 'nofollow-anchor']],
323+
['*:contains("link")', ['html', 'nil', 'outer-div', 'tag-anchor', 'nofollow-anchor']],
324+
[':CONtains("link")', ['html', 'nil', 'outer-div', 'tag-anchor', 'nofollow-anchor']],
325325
['*:contains("LInk")', []], // case sensitive
326326
['*:contains("e")', ['html', 'nil', 'outer-div', 'first-ol', 'first-li', 'paragraph', 'p-em']],
327327
['*:contains("E")', []], // case-sensitive

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.