Skip to content

Commit

Permalink
Move App::uses() again
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienbarre committed Nov 22, 2014
1 parent d7b353d commit 50e5b5e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/AuthComponent.php
Expand Up @@ -26,6 +26,7 @@
App::uses('CakeSession', 'Model/Datasource');
App::uses('BaseAuthorize', 'Controller/Component/Auth');
App::uses('BaseAuthenticate', 'Controller/Component/Auth');
App::uses('CakeEvent', 'Event');

/**
* Authentication control component class
Expand Down Expand Up @@ -608,7 +609,6 @@ public function login($user = null) {
if ($user) {
$this->Session->renew();
$this->Session->write(self::$sessionKey, $user);
App::uses('CakeEvent', 'Event');
$event = new CakeEvent('Auth.afterIdentify', $this, array('user' => $user));
$this->_Collection->getController()->getEventManager()->dispatch($event);
}
Expand Down
Expand Up @@ -20,7 +20,6 @@
App::uses('AuthComponent', 'Controller/Component');
App::uses('AclComponent', 'Controller/Component');
App::uses('FormAuthenticate', 'Controller/Component/Auth');
App::uses('CakeEvent', 'Event');

/**
* TestAuthComponent class
Expand Down Expand Up @@ -429,6 +428,7 @@ public function testLogin() {
$manager = $this->Controller->getEventManager();
$listener = $this->getMock('AuthEventTestListener');
$manager->attach(array($listener, 'listenerFunction'), 'Auth.afterIdentify');
App::uses('CakeEvent', 'Event');
$event = new CakeEvent('Auth.afterIdentify', $this->Auth, array('user' => $user));
$listener->expects($this->once())->method('listenerFunction')->with($event);

Expand Down

0 comments on commit 50e5b5e

Please sign in to comment.