diff core/modules/user/tests/src/Functional/UserTranslationUITest.php @ 16:c2387f117808

Routine composer update
author Chris Cannam
date Tue, 10 Jul 2018 15:07:59 +0100
parents 1fec387a4317
children af1871eacc83
line wrap: on
line diff
--- a/core/modules/user/tests/src/Functional/UserTranslationUITest.php	Thu Apr 26 11:26:54 2018 +0100
+++ b/core/modules/user/tests/src/Functional/UserTranslationUITest.php	Tue Jul 10 15:07:59 2018 +0100
@@ -75,4 +75,25 @@
     }
   }
 
+  /**
+   * Test translated user deletion.
+   */
+  public function testTranslatedUserDeletion() {
+    $this->drupalLogin($this->administrator);
+    $entity_id = $this->createEntity($this->getNewEntityValues('en'), 'en');
+
+    $entity = $this->container->get('entity_type.manager')
+      ->getStorage($this->entityTypeId)
+      ->load($entity_id);
+    $translated_entity = $entity->addTranslation('fr');
+    $translated_entity->save();
+
+    $url = $entity->toUrl(
+      'edit-form',
+      ['language' => $this->container->get('language_manager')->getLanguage('en')]
+    );
+    $this->drupalPostForm($url, [], t('Cancel account'));
+    $this->assertSession()->statusCodeEquals(200);
+  }
+
 }