Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Cannot Reproduce
-
Affects Version/s: 1.9.1
-
Fix Version/s: None
-
Component/s: Zend_Dom_Query, Zend_Test_PHPUnit
-
Labels:None
Description
The following test fails:
class MyTest extends Zend_Test_PHPUnit_ControllerTestCase { public function testFoo() { $this->dispatch('/'); $this->assertQuery('form#foo'); } }
when requested document begins with XML declaration:
<?xml version="1.0" encoding="UTF-8" ?>
and passes if there is no such declaration.
What is more interesing
$this->assertQuery('#foo');
passes. Same applies to corresponding XPath queries (CSS queries are translated into XPath queries):
$this->assertXpath('//form[@id="foo"]');
fails, but the following passes
$this->assertXpath('//*[@id="foo"]');
Issue Links
| This issue is duplicated by: | ||||
| ZF-11376 | XHTML document detection fails when beginning with XML declaration |
|
|
|
Could you maybe investigate if this is a problem with Zend_Dom_Query instead?