See #2066993-57: Use \Drupal consistently in tests: Apparently, it is a bad idea to use $this->container in Functional tests.
We have a few instances of that in our code base which we should therefore probably get rid off:

modules/search_api_db/search_api_db_defaults/tests/src/Functional/IntegrationTest.php
tests/src/Functional/CacheabilityTest.php
tests/src/Functional/SearchApiBrowserTestBase.php
tests/src/Functional/ViewsTest.php
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drunken monkey created an issue. See original summary.

drunken monkey’s picture

Issue tags: +Novice

Since all we need to do (probably) is replace all those instances with \Drupal::getContainer(), this is definitely Novice level stuff.

Rajesh Kairamkonda’s picture

Assigned: Unassigned » Rajesh Kairamkonda
Rajesh Kairamkonda’s picture

Rajesh Kairamkonda’s picture

Status: Active » Needs review
drunken monkey’s picture

Status: Needs review » Fixed

Looks great, thanks!
Committed.

Status: Fixed » Closed (fixed)

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