forked from zendframework/zf1
-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made tests be able to run on all supported PHP versions, and run succ…
…essfully. As part of accomplishing this, the following was done: - Added "yoast/phpunit-polyfills" as a dev dependency. - Modified fixtures to use the polyfilled methods (as they are cross version compatible). - Added a custom test runner (that is compatible across PHPUnit versions). - Modified PHPUnit version to be "^7|^8|^9", since each is supported by different PHP versions. - Modified the rector version to "^0.12.19", as that is the last one still supporting PHP 7.1. - Changed expectNotice() and expectError() to expecting the equivalent PHPUnit exception, to avoid deprecation notice and support PHPUnit 7, where this feature is absent. - Removed the requires annotation in Zend_Filter_Encrypt_OpensslTest, and explicitly added "RC4" as the value for the algo to appease supported PHP versions, but also commented out that test from the set of tests, as all PHP versions fail, likely because even older PHP versions are built with a newer OpenSSL version that has long removed support for RC4. NOTE: After the fix, the test still works if ran on Windows with the pre-built binaries of the supported PHP versions. Also provided higher test coverage overall. To accomplish that part: - Added "symfony/polyfill-ctype" as a runtime dependency, as it can be disabled (while the test tooling does not require it), but is required by many components. - Made PHPUnit run twice - once with the bare minimum of extensions needed to get it going, and a second time with all extensions that can be enabled for the given PHP version. Zend_Barcode_AllTests in particular benefits of this, as it has both tests that work only if GD is disabled, as well as tests that run only if GD is enabled. - Moved the PHP extensions from the env into a matrix, and adjusted the set of extensions to be one that the PHP version would support. - Adjusted the JSON encoder and decoder to explicitly use "UTF-16BE" instead of just "UTF-16", as the mbstring polyfill uses iconv, which in turn aliases "UTF-16" to "UTF-16LE", while the true mbstring extension aliases "UTF-16" to "UTF-16BE". The explicit notation works with both. - Adjusted the testDisablingTryCommonMagicFilesIgnoresCommonLocations() test to call setMagicFile(false) when the environment is not good, i.e. when fileinfo is not present. - Added some requires annotations where PDO was assumed to be present.
- Loading branch information
Showing
1,264 changed files
with
3,767 additions
and
3,660 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.