예제 #1
0
 /**
  * testConstructClassesWithComponents method
  *
  * @return void
  */
 public function testConstructClassesWithComponents()
 {
     Plugin::load('TestPlugin');
     $Controller = new TestPluginController(new Request(), new Response());
     $Controller->loadComponent('TestPlugin.Other');
     $this->assertInstanceOf('TestPlugin\\Controller\\Component\\OtherComponent', $Controller->Other);
 }
예제 #2
0
 /**
  * testConstructClassesWithComponents method
  *
  * @return void
  */
 public function testConstructClassesWithComponents()
 {
     Configure::write('App.namespace', 'TestApp');
     Plugin::load('TestPlugin');
     $Controller = new TestPluginController(new Request(), new Response());
     $Controller->components[] = 'TestPlugin.Other';
     $Controller->constructClasses();
     $this->assertInstanceOf('TestPlugin\\Controller\\Component\\OtherComponent', $Controller->Other);
 }