Adds a regex pattern to an internal list that this test will expect to encounter in error or warning logs during its execution. If an expected pattern is not encountered, it will cause this test to fail.