Reputation: 496
When running PHPUnit, some tests are skipped with the message 'Test skipped because of an error in hook method'. What is causing this and how do I prevent the tests from being skipped?
Upvotes: 3
Views: 723
Reputation: 496
Tests in PHPUnit can have certain magic methods called hooks. These are called by PHPUnit automatically. The methods are:
An error in any of these methods will cause the test to be skipped with the error 'Test skipped because of an error in hook method'. To prevent the test being skipped, check each of these methods to find the error and fix it.
Upvotes: 4