38f1af1d4817f11253f1e73b960dcd728646d707
[yaffs-website] / web / core / modules / user / tests / src / Kernel / UserServiceProviderTest.php
1 <?php
2
3 namespace Drupal\Tests\user\Kernel;
4
5 use Drupal\Core\DependencyInjection\ContainerBuilder;
6 use Drupal\KernelTests\KernelTestBase;
7
8 /**
9  * Tests \Drupal\user\UserServiceProvider.
10  *
11  * @group user
12  * @group legacy
13  */
14 class UserServiceProviderTest extends KernelTestBase {
15
16   /**
17    * Modules to enable.
18    *
19    * @var array
20    */
21   public static $modules = ['user'];
22
23   /**
24    * Tests that tempstore.expire is set to user.tempstore.expire.
25    *
26    * @expectedDeprecation The container parameter "user.tempstore.expire" is deprecated. Use "tempstore.expire" instead. See https://www.drupal.org/node/2935639.
27    */
28   public function testUserServiceProvider() {
29     $this->assertEquals(1000, $this->container->getParameter('tempstore.expire'));
30   }
31
32   /**
33    * {@inheritdoc}
34    */
35   public function register(ContainerBuilder $container) {
36     $container->setParameter('user.tempstore.expire', 1000);
37     parent::register($container);
38   }
39
40 }