Mock HTTP requests in Drupal functional tests

When you are writing functional tests in Drupal (BrowserTestBase or FunctionalJavascript), you sometimes execute some code that makes external requests. Because of tests should be stable and predictable, they shouldn’t depend on external services. So this article will describe how we can mock all external requests. [Read More]