Tests are getting failed

Created on 19 September 2023, about 1 year ago

Problem/Motivation

Drupal version 10.1.4

Tests are getting failed, getting following error.

PHPUnit 9.6.11 by Sebastian Bergmann and contributors.

Testing
E 1 / 1 (100%)R

Time: 00:13.787, Memory: 142.00 MB

There was 1 error:

1) Drupal\Tests\block_in_page_not_found\Functional\LoadTest::testLoad
Exception: Drupal\Tests\BrowserTestBase::$defaultTheme is required. See https://www.drupal.org/node/3083055 , which includes recommendations on which theme to use.

/var/www/html/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php:427
/var/www/html/core/tests/Drupal/Tests/BrowserTestBase.php:556
/var/www/html/core/tests/Drupal/Tests/BrowserTestBase.php:367
/var/www/html/modules/contrib/block_in_page_not_found/tests/src/Functional/LoadTest.php:33
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:728

--

There was 1 risky test:

1) Drupal\Tests\block_in_page_not_found\Functional\LoadTest::testLoad
This test did not perform any assertions

/var/www/html/core/tests/Drupal/Tests/Listeners/DrupalListener.php:65
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:452
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:684
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:684
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:684
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:684
/var/www/html/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:651
/var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:144
/var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:97

ERRORS!
Tests: 1, Assertions: 0, Errors: 1, Risky: 1.

Remaining self deprecation notices (1)

1x: The Drupal\Tests\block_in_page_not_found\Functional\LoadTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
1x in DrupalListener::startTest from Drupal\Tests\Listeners

Steps to reproduce

Run following command

./vendor/bin/phpunit -c core/ --group block_in_page_not_found

Proposed resolution

Need to fix above failed cases.

🐛 Bug report
Status

Needs review

Version

4.0

Component

Code

Created by

🇮🇳India samit.310@gmail.com

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024