"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/framework/filters/auth/BasicAuthTest.php" between
yii2-2.0.36.tar.gz and yii2-2.0.37.tar.gz

About: Yii 2 is a high-performance component-based PHP framework for developing large-scale Web applications (source).

BasicAuthTest.php  (yii2-2.0.36):BasicAuthTest.php  (yii2-2.0.37)
skipping to change at line 13 skipping to change at line 13
* @link http://www.yiiframework.com/ * @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC * @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/ * @license http://www.yiiframework.com/license/
*/ */
namespace yiiunit\framework\filters\auth; namespace yiiunit\framework\filters\auth;
use Yii; use Yii;
use yii\filters\auth\HttpBasicAuth; use yii\filters\auth\HttpBasicAuth;
use yiiunit\framework\filters\stubs\UserIdentity; use yiiunit\framework\filters\stubs\UserIdentity;
use yii\base\Event;
use yii\web\User;
/** /**
* @group filters * @group filters
* @author Dmitry Naumenko <d.naumenko.a@gmail.com> * @author Dmitry Naumenko <d.naumenko.a@gmail.com>
* @since 2.0.7 * @since 2.0.7
*/ */
class BasicAuthTest extends AuthTest class BasicAuthTest extends AuthTest
{ {
/** /**
* @dataProvider tokenProvider * @dataProvider tokenProvider
skipping to change at line 125 skipping to change at line 127
$this->assertSame($idValue, $session->get($idParam)); $this->assertSame($idValue, $session->get($idParam));
$session->destroy(); $session->destroy();
} }
public function authMethodProvider() public function authMethodProvider()
{ {
return [ return [
['yii\filters\auth\HttpBasicAuth'], ['yii\filters\auth\HttpBasicAuth'],
]; ];
} }
/**
* @dataProvider tokenProvider
* @param string|null $token
* @param string|null $login
*/
public function testAfterLoginEventIsTriggered18031($token, $login)
{
$triggered = false;
Event::on('\yii\web\User', User::EVENT_AFTER_LOGIN, function ($event) us
e (&$triggered) {
$triggered = true;
$this->assertTrue($triggered);
});
$this->testHttpBasicAuthCustom($token, $login);
Event::off('\yii\web\User', User::EVENT_AFTER_LOGIN); // required becaus
e this method runs in foreach loop. See @dataProvider tokenProvider
}
} }
 End of changes. 2 change blocks. 
0 lines changed or deleted 20 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)