From 7be47953a38bd0889003a6f781795f9cd721e41c Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 2 Sep 2023 14:17:07 +0200 Subject: [PATCH] Add XPath tests for basic types --- ext/dom/tests/xpath_evaluate_basic_types.phpt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 ext/dom/tests/xpath_evaluate_basic_types.phpt diff --git a/ext/dom/tests/xpath_evaluate_basic_types.phpt b/ext/dom/tests/xpath_evaluate_basic_types.phpt new file mode 100644 index 00000000000..fcb07d5949c --- /dev/null +++ b/ext/dom/tests/xpath_evaluate_basic_types.phpt @@ -0,0 +1,17 @@ +--TEST-- +XPath: basic types evaluation +--EXTENSIONS-- +dom +--FILE-- +loadHTML('
foo
'); +$xpath = new DOMXpath($dom); +var_dump($xpath->evaluate("count(//p) > 0")); +var_dump($xpath->evaluate("string(//p/@align)")); + +?> +--EXPECT-- +bool(true) +string(6) "center"