I have a controller with the following access rules:
array('deny', // deny all users
'users'=>array('*'),
),
I want to test that code (every user authorized or not can't access to 开发者_JAVA百科this controller via the web) and have the following:
public function testShow()
{
$this->open('?r=link');
}
But I get the following error in my console:
1) LinkTest::testShow
PHPUnit_Framework_Exception: Response from Selenium RC server for testComplete(). XHR ERROR: URL = http://127.0.0.1/url/index-test.php/?r=link Response_Code = 403 Error_Message = > CHttpException.
I want to make a test where I can ensure that link controller not visible via web.
Well the 403 response is a permission denied error. So it seems as though it's working correctly. Perhaps you just need to configure Selenium. See this question for some help.
精彩评论