开发者

DomDocument::loadHTML() error during phpunit test execution

I am currently trying to write some unit test against my zend framework controller. When I run the following code I receive this error:

public function testListActionShouldContainListTable()
    {

        $this->loginToSystem();

        $uri = $this->_uriBase . 'campaign/list';
        $_SERVER["REQUEST_URI"] = $uri;

        $this->dispatch('/campaign/list');
        $this->assertController('campaign');
        $this->assertAction('list');
        $this->assertQueryCount('#list',1);
    }


CampaignControllerTests::testListActionShouldContainListTable
DOMDocument::loadHTML(): ID alrt already defined in Entity, line: 36

This occurs using any of the assertQuery and assertQueryContains methods. I have searched around but am not really finding a good answer to why it won't allow me to fi开发者_Python百科nd this html node or how to get around this error.

Thanks in advance for any help!


Make sure the document is valid. You have duplicate IDs in your HMTL document.


The HTML being generated by the dispatch is bad (it looks like it has two ids being assigned to a single tag). This is not an error of your test (it's working fine), it's an error in your html output generated by the test...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜