Example.php::Does failOnLoggedErrors() exist?
Describe the bug When trying to create a first ExistingSite test by following the ExampleTest.php example, a user implements a improperly working test because failOnLoggedErrors does not appear to be a valid method.
We should construct an example tests that is both easy to understand and can work properly to give the new user confidence that this systems works.
see:
To Reproduce Steps to reproduce the behavior:
- Setup Drupal Test traits by copying and modifying the example phpunit.xml
- Copy the ExampleTest.php verbatim into a folder that phpunit has been configured to listen to.
- Execute phpunit via the command line with a command such as ./vendor/bin/phpunit ./web/modules/custom/{your module}/tests/src/ExistingSite/ExampleTest.php
- See error: Error: Call to undefined method Drupal\Tests{your module}\ExistingSite\ExampleTest::failOnLoggedErrors()
Expected behavior The provided example test should run without any trouble. If there is trouble, I expect the confusion to be resolved with documentation either pointing out what trouble might happen or with better instructions on how to set things up before you run the test.