CakePHP에서 urer에 쿼리 문자열을 두어도 컨트롤러가 직접 호출되었을 때처럼 자동으로 구문 분석되고 분할되지 않습니다. 예를 들어CakePHP 1.2에서 querystring을 testAction에 전달하는 방법은 무엇입니까?
:에서 웹 브라우저를 결과를 통해 직접 URL을 호출하는 동안
[url] => /testing/post?company=utCompany
:
$this->testAction('/testing/post?company=utCompany', array('return' => 'vars')) ;
가 발생합니다 CakePHP의 소스를 편집하지 않고
[url] => Array
(
[url] => testing/post
[company] => utCompany
)
, 유닛 테스트를 실행할 때 쿼리 스트링을 분할 할 수있는 방법이 있습니까?
. testAction 호출 전에 다음을 설정해야합니다 :'$ this -> __ savedGetData [ 'company'] = 'utcompany';' –