Problem/Motivation

Unit tests are failing:

	✗	
Drupal\Tests\ohdear_integration\Functional\OhdearIntegrationEndpointTest

fail: [Other] Line 0 of sites/default/files/simpletest/phpunit-1.xml:
PHPUnit Test failed to complete; Error: PHPUnit 9.5.28 by Sebastian Bergmann and contributors.

Warning:       Your XML configuration validates against a deprecated schema.
Suggestion:    Migrate your XML configuration using "--migrate-configuration"!

Testing Drupal\Tests\ohdear_integration\Functional\OhdearIntegrationEndpointTest
F                                                                   1 / 1 (100%)

Time: 00:01.435, Memory: 6.00 MB

There was 1 failure:

1) Drupal\Tests\ohdear_integration\Functional\OhdearIntegrationEndpointTest::testApiResponseData
Unable to install modules: module 'ohdear_integration' is incompatible with this version of Drupal core.

/var/www/html/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php:479
/var/www/html/core/tests/Drupal/Tests/BrowserTestBase.php:547
/var/www/html/core/tests/Drupal/Tests/BrowserTestBase.php:366
/var/www/html/modules/contrib/ohdear_integration/tests/src/Functional/OhdearIntegrationEndpointTest.php:51
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:728

FAILURES!
Tests: 1, Assertions: 1, Failures: 1.

Steps to reproduce

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

useernamee created an issue. See original summary.

roderik’s picture

FWIW: tried this in a ddev container where I have just installed this module:

roderik@lupus-decoupled-web:/var/www/html$ vendor/bin/phpunit  web/modules/contrib/ohdear_integration/tests/src/Functional/OhdearIntegrationEndpointTest.php

PHPUnit 9.6.15 by Sebastian Bergmann and contributors.

Testing Drupal\Tests\ohdear_integration\Functional\OhdearIntegrationEndpointTest
.                                                                   1 / 1 (100%)

Time: 00:03.885, Memory: 4.00 MB

OK (1 test, 15 assertions)

Remaining self deprecation notices (3)

  2x: watchdog_exception() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use \Drupal\Core\Utility\Error::logException() instead. See https://www.drupal.org/node/2932520
    2x in OhdearIntegrationEndpointTest::testApiResponseData from Drupal\Tests\ohdear_integration\Functional

  1x: format_size() is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use \Drupal\Core\StringTranslation\ByteSizeMarkup::create($size, $langcode) instead. See https://www.drupal.org/node/2999981
    1x in OhdearIntegrationEndpointTest::testApiResponseData from Drupal\Tests\ohdear_integration\Functional

The deprecation notices are not failures. (Edit: and also they aren't triggered by code inside the ohdear_integration module.)

Guessing: is it maybe your local(ly copied some time ago) phpunit.xml that is older and needs updating?

useernamee’s picture

ankitv18’s picture

No more deprecations are reported as per phpstan pipeline: https://git.drupalcode.org/project/ohdear_integration/-/jobs/2519000 for both 1.x and 2.x branch
I guess we can close this one.

  • useernamee committed e22ff103 on 2.x
    Issue #3404331 by useernamee, roderik: Unit tests are failing - Your XML...
useernamee’s picture

Status: Active » Fixed

Tests are now green but they will need to be revised and take caching into account more.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.