예제 #1
0
 /**
  * Test mutually referencing components.
  *
  * @return void
  */
 public function testSomethingReferencingCookieComponent()
 {
     $Controller = new ComponentTestController();
     $Controller->loadComponent('SomethingWithCookie');
     $Controller->startupProcess();
     $this->assertInstanceOf('TestApp\\Controller\\Component\\SomethingWithCookieComponent', $Controller->SomethingWithCookie);
     $this->assertInstanceOf('Cake\\Controller\\Component\\CookieComponent', $Controller->SomethingWithCookie->Cookie);
 }
예제 #2
0
 /**
  * Test mutually referencing components.
  *
  * @return void
  */
 public function testSomethingReferencingCookieComponent()
 {
     $Controller = new ComponentTestController();
     $Controller->components = array('SomethingWithCookie');
     $Controller->uses = false;
     $Controller->constructClasses();
     $Controller->startupProcess();
     $this->assertInstanceOf('TestApp\\Controller\\Component\\SomethingWithCookieComponent', $Controller->SomethingWithCookie);
     $this->assertInstanceOf('Cake\\Controller\\Component\\CookieComponent', $Controller->SomethingWithCookie->Cookie);
 }