0
我想对组件进行重定向的单元测试。对组件重定向单元测试
redirectComponent.php
public function redirect(){
$controller = $this->_Collection -> getController();
$controller->redirect('https://test.com');
}
但是我写这篇文章的代码,而不是什么都不显示
Welcome to CakePHP v2.5.3 Console
---------------------------------------------------------------
App : portal
Path: **
---------------------------------------------------------------
CakePHP Test Shell
---------------------------------------------------------------
PHPUnit 3.7.37 by Sebastian Bergmann.
如何测试重定向组件?
在此先感谢。
谢谢!我可以用模拟做。 – hoshipeace 2014-09-03 00:39:27