Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / user / tests / src / Kernel / UserServiceProviderFallbackTest.php
diff --git a/web/core/modules/user/tests/src/Kernel/UserServiceProviderFallbackTest.php b/web/core/modules/user/tests/src/Kernel/UserServiceProviderFallbackTest.php
new file mode 100644 (file)
index 0000000..78ab454
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+
+namespace Drupal\Tests\user\Kernel;
+
+use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\KernelTests\KernelTestBase;
+
+/**
+ * Tests \Drupal\user\UserServiceProvider.
+ *
+ * @group user
+ * @group legacy
+ */
+class UserServiceProviderFallbackTest extends KernelTestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = ['user'];
+
+  /**
+   * Tests that user.tempstore.expire equals tempstore.expire if not customized.
+   */
+  public function testUserServiceProvider() {
+    $this->assertEquals(1000, $this->container->getParameter('user.tempstore.expire'));
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function register(ContainerBuilder $container) {
+    $container->setParameter('tempstore.expire', 1000);
+    parent::register($container);
+  }
+
+}