Tests: add minimal `expectError()` compatibility wrapper to one test file
Tests: add minimal `expectError()` compatibility wrapper to one test file

To make the tests PHPUnit cross-version compatible, not that much is needed in terms of compatibility polyfills.

PHPUnit 8.4 introduced a new API to test PHP native errors/warning/notices and use of the `expectException()` method for testing the PHP native notices is deprecated since PHPUnit 9.0 and support will be removed in PHPUnit 10.

As that type of exception testing is only used in one test file, adding a wrapper method which toggles between the "old" method name and the "new" method name fixed cross-version compatibility for this.

Brain-WP/BrainMonkey