X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fconfig_translation%2Ftests%2Fsrc%2FFunctional%2FConfigTranslationOverviewTest.php;h=9ccbb135d2f2804764d745bb3f768af4425fb5a5;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=55b02dca75ebaaee09f9220bb734bfce0da7f741;hpb=bfbba508964731508b9bd6d5835c2edc858db95b;p=yaffs-website diff --git a/web/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php b/web/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php index 55b02dca7..9ccbb135d 100644 --- a/web/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php +++ b/web/core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php @@ -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()); }