In #2750941: Additional BC assertions from WebTestBase to BrowserTestBase a new method buildXPathQuery() was added to the AssertLegacyTrait trait. The method is currently public, but it should be protected to be consistent with the other assertions in these traits.

This is currently causing BrowserTestBase tests to fail in contrib. See for example this test for Organic Groups, it fails with the following error now:

PHP Fatal error: Access level to Drupal\simpletest\AssertContentTrait::buildXPathQuery() must be public (as in class Drupal\Tests\BrowserTestBase) in /home/travis/build/amitaibu/og/og_ui/tests/src/Functional/BundleFormAlterTest.php on line 24

CommentFileSizeAuthor
#2 2757139-2.patch699 bytespfrenssen
Members fund testing for the Drupal project. Drupal Association Learn more

Comments

pfrenssen created an issue. See original summary.

pfrenssen’s picture

Status: Active » Needs review
FileSize
699 bytes

Here is a simple one line fix that corrects the visibility, similar to how this was done before in #2744089: Fix visibility of AssertLegacyTrait::assertLink() and #2752315: Fix visibility of AssertLegacyTrait::assertNoEscaped().

klausi’s picture

Component: simpletest.module » phpunit
Status: Needs review » Reviewed & tested by the community

Makes sense!

  • catch committed ea6a8c3 on 8.2.x
    Issue #2757139 by pfrenssen: Fix visibility of AssertLegacyTrait::...

  • catch committed cf7aeeb on 8.1.x
    Issue #2757139 by pfrenssen: Fix visibility of AssertLegacyTrait::...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to both 8.x branches, thanks! Sorry I missed that in the original issue.

Status: Fixed » Closed (fixed)

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