/** * 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); }
/** * 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); }