mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Move App::uses() again
This commit is contained in:
parent
4c59ab6eca
commit
f78e6c0621
2 changed files with 2 additions and 2 deletions
|
@ -26,6 +26,7 @@ App::uses('Hash', 'Utility');
|
|||
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
|
||||
|
@ -608,7 +609,6 @@ class AuthComponent extends Component {
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ App::uses('Controller', 'Controller');
|
|||
App::uses('AuthComponent', 'Controller/Component');
|
||||
App::uses('AclComponent', 'Controller/Component');
|
||||
App::uses('FormAuthenticate', 'Controller/Component/Auth');
|
||||
App::uses('CakeEvent', 'Event');
|
||||
|
||||
/**
|
||||
* TestAuthComponent class
|
||||
|
@ -429,6 +428,7 @@ class AuthComponentTest extends CakeTestCase {
|
|||
$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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue