X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fuser%2Ftests%2Fsrc%2FFunctional%2FUserTranslationUITest.php;h=630e58586c5531e2b9922ef6f85042cde0b7a088;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=ae541da83e603f6c8b43b08dee41239bb3e6a589;hpb=af6d1fb995500ae68849458ee10d66abbdcfb252;p=yaffs-website diff --git a/web/core/modules/user/tests/src/Functional/UserTranslationUITest.php b/web/core/modules/user/tests/src/Functional/UserTranslationUITest.php index ae541da83..630e58586 100644 --- a/web/core/modules/user/tests/src/Functional/UserTranslationUITest.php +++ b/web/core/modules/user/tests/src/Functional/UserTranslationUITest.php @@ -75,4 +75,25 @@ class UserTranslationUITest extends ContentTranslationUITestBase { } } + /** + * 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); + } + }