UserLoginDecoratedTest.php

Same filename in other branches
  1. 11.x core/modules/user/tests/src/Functional/UserLoginDecoratedTest.php

Namespace

Drupal\Tests\user\Functional

File

core/modules/user/tests/src/Functional/UserLoginDecoratedTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Tests\user\Functional;

use Drupal\user_auth_decorator_test\UserAuthDecorator;

/**
 * Ensure that login works as expected with a decorator.
 *
 * The decorator does not implement UserAuthenticationInterface.
 *
 * @group user
 */
class UserLoginDecoratedTest extends UserLoginTest {
    
    /**
     * {@inheritdoc}
     */
    protected static $modules = [
        'user_auth_decorator_test',
    ];
    
    /**
     * Test that the UserAuthDecorator is providing user.auth.
     */
    public function testServiceDecorated() : void {
        $service = \Drupal::service('user.auth');
        $this->assertInstanceOf(UserAuthDecorator::class, $service);
    }

}

Classes

Title Deprecated Summary
UserLoginDecoratedTest Ensure that login works as expected with a decorator.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.