Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / config_translation / tests / src / Functional / ConfigTranslationOverviewTest.php
index 55b02dca75ebaaee09f9220bb734bfce0da7f741..9ccbb135d2f2804764d745bb3f768af4425fb5a5 100644 (file)
@@ -77,7 +77,7 @@ class ConfigTranslationOverviewTest extends BrowserTestBase {
     // Make sure there is only a single operation for each dropbutton, either
     // 'List' or 'Translate'.
     foreach ($this->cssSelect('ul.dropbutton') as $i => $dropbutton) {
-      $this->assertIdentical(1, count($dropbutton->find('xpath', 'li')));
+      $this->assertIdentical(1, count($dropbutton->findAll('xpath', 'li')));
       $this->assertTrue(($dropbutton->getText() === 'Translate') || ($dropbutton->getText() === 'List'));
     }
 
@@ -87,8 +87,9 @@ class ConfigTranslationOverviewTest extends BrowserTestBase {
       $this->randomString(),
     ];
 
+    $storage = \Drupal::entityTypeManager()->getStorage('config_test');
     foreach ($labels as $label) {
-      $test_entity = entity_create('config_test', [
+      $test_entity = $storage->create([
         'id' => $this->randomMachineName(),
         'label' => $label,
       ]);
@@ -102,7 +103,7 @@ class ConfigTranslationOverviewTest extends BrowserTestBase {
       // Make sure there is only a single 'Translate' operation for each
       // dropbutton.
       foreach ($this->cssSelect('ul.dropbutton') as $i => $dropbutton) {
-        $this->assertIdentical(1, count($dropbutton->find('xpath', 'li')));
+        $this->assertIdentical(1, count($dropbutton->findAll('xpath', 'li')));
         $this->assertIdentical('Translate', $dropbutton->getText());
       }