Problem/Motivation

3.0.0 build fails with, here's the report (https://www.drupal.org/pift-ci-job/1702644):

Examples.Drupal\Tests\form_api_example\Functional\MultistepFormTest

Drupal\Tests\form_api_example\Functional\MultistepFormTest

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

Testing Drupal\Tests\form_api_example\Functional\MultistepFormTest
W 1 / 1 (100%)

Time: 14.84 seconds, Memory: 4.00 MB

There was 1 warning:

1) Drupal\Tests\form_api_example\Functional\MultistepFormTest::testWizardForm
Using assertContains() with string haystacks is deprecated and will not be supported in PHPUnit 9. Refactor your test to use assertStringContainsString() or assertStringContainsStringIgnoringCase() instead.

/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:691

WARNINGS!
Tests: 1, Assertions: 16, Warnings: 1.

HTML output was generated
http://php-apache-jenkins-drupal-contrib-204664/subdirectory/sites/simpl...
http://php-apache-jenkins-drupal-contrib-204664/subdirectory/sites/simpl...
http://php-apache-jenkins-drupal-contrib-204664/subdirectory/sites/simpl...
http://php-apache-jenkins-drupal-contrib-204664/subdirectory/sites/simpl...
http://php-apache-jenkins-drupal-contrib-204664/subdirectory/sites/simpl...
http://php-apache-jenkins-drupal-contrib-204664/subdirectory/sites/simpl...

1 Examples.Drupal\Tests\stream_wrapper_example\Unit\SessionHelperTest

Drupal\Tests\stream_wrapper_example\Unit\SessionHelperTest

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

Testing Drupal\Tests\stream_wrapper_example\Unit\SessionHelperTest
W 1 / 1 (100%)

Time: 397 ms, Memory: 8.00 MB

There was 1 warning:

1) Drupal\Tests\stream_wrapper_example\Unit\SessionHelperTest::testWrapper
assertInternalType() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertIsArray(), assertIsBool(), assertIsFloat(), assertIsInt(), assertIsNumeric(), assertIsObject(), assertIsResource(), assertIsString(), assertIsScalar(), assertIsCallable(), or assertIsIterable() instead.

/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:691
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:597
/var/www/html/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:621
/var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:204
/var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:163

WARNINGS!
Tests: 1, Assertions: 13, Warnings: 1.

1 Examples.Drupal\Tests\examples\Kernel\DescriptionTraitTest

Drupal\Tests\examples\Kernel\DescriptionTraitTest

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

Testing Drupal\Tests\examples\Kernel\DescriptionTraitTest
W 1 / 1 (100%)

Time: 1.39 seconds, Memory: 4.00 MB

There was 1 warning:

1) Drupal\Tests\examples\Kernel\DescriptionTraitTest::testTemplateFile
Using assertContains() with string haystacks is deprecated and will not be supported in PHPUnit 9. Refactor your test to use assertStringContainsString() or assertStringContainsStringIgnoringCase() instead.

/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:691

WARNINGS!
Tests: 1, Assertions: 4, Warnings: 1.

Proposed resolution

Follow phpunit recommendations.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

valthebald created an issue. See original summary.

valthebald’s picture

Status: Active » Needs review
FileSize
2.51 KB

Status: Needs review » Needs work

The last submitted patch, 2: 3143204.patch, failed testing. View results

valthebald’s picture

Status: Needs work » Needs review
FileSize
4.22 KB
jungle’s picture

+++ b/form_api_example/tests/src/Functional/MultistepFormTest.php
@@ -30,9 +30,9 @@ class MultistepFormTest extends BrowserTestBase {
+    $this->assertStringContainsString('Multistep form', $h1->getText());

assertStringContainsString() is ported to 8.8.x, so might be inapplicable for porting to 8.x-1.x

See https://www.drupal.org/node/3133050

jungle’s picture

Status: Needs review » Reviewed & tested by the community

LGTM.

valthebald’s picture

Status: Reviewed & tested by the community » Needs review
valthebald’s picture

Status: Needs review » Reviewed & tested by the community

  • valthebald committed bb56eae on 3.x
    Issue #3143204 by valthebald, jungle: Tests fail with PHP7.4 and Drupal...
valthebald’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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