8000 DOMXPath::quote(string $str): string by divinity76 · Pull Request #13456 · php/php-src · GitHub
[go: up one dir, main page]

Skip to content

DOMXPath::quote(string $str): string #13456

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Feb 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
emptystring test
  • Loading branch information
divinity76 authored Feb 21, 2024
commit 641f01fba6438cef894073dd7c612ecb57819042
2 changes: 2 additions & 0 deletions ext/dom/tests/DOMXPath_quote.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ function UserlandDOMXPathQuote(string $string): string


$tests = [
'' => "''", // empty string
'foo' => "'foo'", // no quotes
'"foo' => '\'"foo\'', // double quotes only
'\'foo' => '"\'foo"', // single quotes only
Expand Down Expand Up @@ -74,6 +75,7 @@ foreach ($tests as $input => $expected) {
}
?>
--EXPECT--
Pass: => ''
Pass: foo => 'foo'
Pass: "foo => '"foo'
Pass: 'foo => "'foo"
Expand Down
0