From 79e52b6ad475618ed9fe4d32caafda20fa6d01bf Mon Sep 17 00:00:00 2001 From: Kevin Wenger Date: Tue, 20 Feb 2024 11:52:08 +0100 Subject: [PATCH] fix test BambooTwigRenderTest::testMenu --- tests/src/Functional/BambooTwigRenderTest.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/src/Functional/BambooTwigRenderTest.php b/tests/src/Functional/BambooTwigRenderTest.php index cf124f6..3e3cfde 100644 --- a/tests/src/Functional/BambooTwigRenderTest.php +++ b/tests/src/Functional/BambooTwigRenderTest.php @@ -456,9 +456,13 @@ public function testMenu() { $this->assertSession()->elementExists('css', '.test-render div.render-menu-all'); $this->assertElementCount('ul', 9, '.test-render div.render-menu-all'); - // Since Drupal 10.1.x the default Drupal distribution have 26 menu items. - if (version_compare(\Drupal::VERSION, '10.1', '>=')) { - $this->assertElementCount('li', 28, '.test-render div.render-menu-all'); + // Since Drupal 10.2.x the default Drupal distribution have X menu items. + if (version_compare(\Drupal::VERSION, '10.2', '>=')) { + $this->assertElementCount('li', 24, '.test-render div.render-menu-all'); + } + // Since Drupal 10.1.x the default Drupal distribution have X menu items. + elseif (version_compare(\Drupal::VERSION, '10.1', '>=')) { + $this->assertElementCount('li', 29, '.test-render div.render-menu-all'); } else { $this->assertElementCount('li', 27, '.test-render div.render-menu-all'); @@ -467,9 +471,9 @@ public function testMenu() { $this->assertSession()->elementExists('css', '.test-render div.render-menu-level'); $this->assertElementCount('ul', 8, '.test-render div.render-menu-level'); - // Since Drupal 10.1.x the default Drupal distribution have 25 menu items. + // Since Drupal 10.1.x the default Drupal distribution have X menu items. if (version_compare(\Drupal::VERSION, '10.1', '>=')) { - $this->assertElementCount('li', 27, '.test-render div.render-menu-level'); + $this->assertElementCount('li', 28, '.test-render div.render-menu-level'); } else { $this->assertElementCount('li', 26, '.test-render div.render-menu-level');