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 - Explicitly added "RC4" as the value for the algo to appease supported PHP versions. Why RC4? Because that is the default, and has been the default, and ZF has had no option to override it. Such option could be introduced in a separate PR maybe. - Fixed a type related warning in OpenSSL related tests, by casting array keys to strings before the remaining checks that assume a string. - Added an openssl.conf file that enables the legacy provider, in addition to the default, in order to enable the tests to pass in newer OpenSSL versions that even older PHP versions are now being compiled against. 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,265 changed files
with
3,792 additions
and
3,659 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.