English 中文(简体)
Zend_Read: Assert Chief Failed
原标题:Zend_Test: Assert Controller Failed

我在泽德框架中利用Zend_试验进行单位测试。 我对boot和测试环境进行了适当配置,然后我从测试单位获得这一错误产出。

Failed asserting last controller used <"error"> was "index"

当我把我的易腐阶级称作行动方法(如行动方法)时,就会出现这一错误。

public function indexAction()
{
    $roleDb = new Model_DbTable_Role;
    $role = $roleDb->getAll();
    $this->_forward( login );
}

如果我排除两条线作用,单位测试是成功的。 这是我的单位测试代码。

public function testIndexActionShouldRedirectToLoginAction()
{
    $this->dispatch( /index );
    $this->assertController( index );
    $this->assertAction( login );
}

这些问题是什么?

How do I know the real error instead of just Failed asserting last controller used <"error">? Thank you

最佳回答

最后,它解决了。

由于PDO pgsql没有被工厂单位发现。 FYI, in XAMPP, there are two file of php.ini.

第一,apache/bin;第二,php>。 XAMPP始终使用第一种(php.ini)器,但实验室单位使用第二种器。 我配置了第一个使用pgsql的php.ini,但忘记了第二个。 答案是,为什么我的申请仍然适用,而后是“基地”单位。

然后,我允许在第二个营地延长Pgsql。

extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll
extension=php_pdo_pgsql.dll <= add it
;extension=php_pdo_oci.dll
;extension=php_pdo_oci8.dll
;extension=php_pdo_odbc.dll
extension=php_pdo_sqlite.dll
;extension=php_perl.dll
extension=php_pgsql.dll <= remove  ; 

最后,感谢你就这一问题提出意见和建议。 真主保.大家:

问题回答

暂无回答




相关问题
Selenium not working with Firefox 3.x on linux

I am using selenium-server , selenium rc for UI testing in my application . My dev box is Windows with FireFox 3.5 and every thing is running fine and cool. But when i try to run selenium tests on my ...

Best browser for testing under Safari Mobile on Linux?

I have an iPhone web app I m producing on a Linux machine. What s the best browser I can use to most closely mimic the feature-limited version of Safari present on the iPhone? (It s a "slimmed down" ...

Code Coverage Tools & Visual Studio 2008 Pro

Just wondering what people are using for code coverage tools when using MS Visual Studio 2008 Pro. We are using the built-in MS test project and unit testing tool (the one that come pre-installed ...

Is there any error checking web app cralwers out there?

Wondering if there was some sort of crawler we could use to test and re-test everything when changes are made to the web app so we know some new change didn t error out any existing pages. Or maybe a ...