2012-07-03 30 views
1

有沒有可能測試CakePHP插件?單元測試CakePHP插件

我所有的核心控制器和模型試驗,工作正常,但是當我嘗試測試我的插件的控制器,它給我的錯誤:

Trying to get property of non-object

見下面我的代碼:

public function testTest() { 
     $result = $this->testAction("/MyPluginController/trst",array("return"=>"vars")); 
     debug($result); 
} 

有什麼建議嗎?
感謝您提前

回答

0

您是否在頂部添加App::uses

App::uses('ControllerNameController', 'MyPlugin.Controller');