zendframework/zf2 — pull request #5110 by TheFrozenFire (2013-09-13 23:43:04+00:00)
Title: Allow the I18n tests to run without the i18n extension loaded

Presently, without the i18n extension loaded (e.g. [on HHVM](http://www.hhvm.com/blog/?p=875#fn7)), the entire test suite crashes with fatal errors if the I18n component tests are run. This is largely because data providers are executed outside of the isolation of a given test, so errors affect the greater process.

Additionally, even with @requires extension intl as an annotation to each given test, this is not resolved. Because data providers are executed before the test itself executes, this will cause the same errors.

As such, I've added both the annotation for the extension requirement (covering the tests without data providers), and I've added an extension_loaded check to each applicable data provider. This has also resulted in having to make the data providers non-static, so as to be able to skip the test.

If someone knows of a more elegant solution to this problem, I would be glad to revise my PR to use that method. It just seems that this is the only effective method.