Skip to content
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

PHPUnit_Util_XML::cssSelect() does not populate $isHtml correctly #20

Closed
tobyS opened this issue Sep 11, 2010 · 2 comments
Closed

PHPUnit_Util_XML::cssSelect() does not populate $isHtml correctly #20

tobyS opened this issue Sep 11, 2010 · 2 comments

Comments

@tobyS
Copy link
Contributor

tobyS commented Sep 11, 2010

Due to this, assertion of XML is impossible using PHPUnit_Framework_Assert::assertSelect*().

Here is a patch:

diff --git a/PHPUnit/Util/XML.php b/PHPUnit/Util/XML.php
index 3e73b76..d369fba 100644
--- a/PHPUnit/Util/XML.php
+++ b/PHPUnit/Util/XML.php
@@ -522,12 +522,13 @@ class PHPUnit_Util_XML
      * @since  Method available since Release 3.3.0
      * @author Mike Naberezny <mike@maintainable.com>
      * @author Derek DeVries <derek@maintainable.com>
+     * @author Tobias Schlitt <toby@php.net>
      */
     public static function cssSelect($selector, $content, $actual, $isHtml = TRUE)
     {
         $matcher = self::convertSelectToTag($selector, $content);
         $dom     = self::load($actual, $isHtml);
-        $tags    = self::findNodes($dom, $matcher);
+        $tags    = self::findNodes($dom, $matcher, $isHtml);

         return $tags;
     }
@sebastianbergmann
Copy link
Owner

Hello Tobias,

please fork PHPUnit, apply the patch, and then send me a pull request.

Thanks!
Sebastian

@sebastianbergmann
Copy link
Owner

Closed by 95255f0 and #21.

t-sasaki pushed a commit to t-sasaki/phpunit that referenced this issue Sep 28, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants