tags:

views:

41

answers:

1

I have controller with access rules: array('deny', // deny all users 'users'=>array('*'), ),

Then i want to test that code (every user authorized or not cant access to this controller via WEB).

public function testShow()
{
  $this->open('?r=link');
}

And i have error in my console: There was 1 error:

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.

Want to make a test where i can ensure that link controller not visible via web.

A: 

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.

Blair McMillan