Re: cakephp 3.0 unit test for plugin component

2014-11-03 Thread Radharadhya Dasa
Thank you. That was helped. public function setUp() { parent::setUp(); $controller = $this->getMock('Cake\Controller\Controller', [ 'redirect']); $this->registry = new ComponentRegistry($controller); $this->component = new RBruteForceComponent($this->registry);

Re: cakephp 3.0 unit test for plugin component

2014-11-02 Thread José Lorenzo
You will need to pass a controller instance to the ComponentRegistry, otherwise there will be none to get in the component's initialise function On Sunday, November 2, 2014 3:12:54 PM UTC+1, Radharadhya Dasa wrote: > > Hi, I am not able to create a test for my plugins component. > > Component: >

cakephp 3.0 unit test for plugin component

2014-11-02 Thread Radharadhya Dasa
Hi, I am not able to create a test for my plugins component. Component: namespace RBruteForce\Controller\Component; use Cake\Controller\Component; use Cake\Routing\Router; use Cake\ORM\TableRegistry; class RBruteForceComponent extends Component { public function initialize(array $config) {