2010年5月5日星期三

[fw-mvc] PHPUnit testing generating Zend_Dom_Exception

Hi,

I'm getting a Zend_Dom_Exception when trying to unit test a controller-:

There was 1 error:

1) UnitControllerTest::testAddAction
Zend_Dom_Exception: Cannot query; no document registered

public function testAddAction(){
$this->dispatch('/unit/add');
$this->assertResponseCode('200');
$this->assertQuery('form-test');
}

This only happens when $this->assertQuery('form-test'); is in the above
method.

The controller & action work fine in a browser !

Googled for days and cant find the answer.

Thanks in advance.
--
View this message in context: http://zend-framework-community.634137.n4.nabble.com/PHPUnit-testing-generating-Zend-Dom-Exception-tp2130849p2130849.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: