diff --git a/.travis.yml b/.travis.yml index 74340b388..9424d8496 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,59 +2,60 @@ sudo: false language: php -branches: - except: - - /^release-.*$/ - - /^ghgfk-.*$/ - cache: directories: - $HOME/.composer/cache - - $HOME/.local - - zf-mkdoc-theme env: global: - - SITE_URL: https://zendframework.github.io/zend-stdlib - - GH_USER_NAME: "Matthew Weier O'Phinney" - - GH_USER_EMAIL: matthew@weierophinney.net - - GH_REF: github.com/zendframework/zend-stdlib.git - - secure: "l+YU9Igd9IUA60PE+iC4AZt2hHY9hpsSB7S2jck9fjPm0+15UCGk2G1qg5hCi+FlPslXhk6wOLLDPc40BiCrwH+m5CP9cIdkGTuNc9rVF9S5IiRLkOVxeTcdE+JRm7hZ2NBgxEiTuBLs5RlN39o41zPDFllgnJv69UmmUIMHuG3NwJJiRE9NA2EMIhZwx3UT/Zqq94MzAbYXi2xspoQ53Z/rfvVSJK6tdARp31q4NWvlYsc2YVcEWv+j3VY5luMSCMVQVNBIuXdd0hYpGt2o3H6S9azzcKRQB7saoAT/tiAEj5121tv3j3cKNQQMzI4xv7RrtQEiAhumeU3AsVDyqBmqqUQNwpnWH0RZdRry4jUKJgx0TK0yZH8ewdz6DhktBqS+c2a/FzfO3yc+LeuIy3i73NezNwCgwviOBYbWPAo4LqKtJ7gdTbVVdJaUeCtKTZ1b1k4MtaxjZjz0IK5+rxJsZ1DQF5fhJIzkjXqEEON2mHQu/qE+I7ow4Jvfs0T+KYJW6Yf5qFzBkrTUNjV60rmawaEjgxgMvtwN+MvcQ/X2OWkdjdzqzQIDdjssdRu9IBPU/G2uqzS8POL9o1j8H3NE430Tsbg+jiENlqmU+ra5wuRrmTBToli1kpgl9LyhgvjGokxAB+mwwKv7FiIQtBmSgEvsD112eSYl3HVWpdE=" + - COMPOSER_ARGS="--no-interaction --no-plugins" + - COVERAGE_DEPS="satooshi/php-coveralls" matrix: include: - php: 5.6 env: - - TEST_COVERAGE=true - - DEPLOY_DOCS="$(if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo -n 'true' ; else echo -n 'false' ; fi)" - - PATH="$HOME/.local/bin:$PATH" + - DEPS=lowest + - php: 5.6 + env: + - DEPS=latest - php: 7 env: + - DEPS=lowest + - php: 7 + env: + - DEPS=latest + - php: 7.1 + env: + - DEPS=lowest + - php: 7.1 + env: + - DEPS=latest - CS_CHECK=true - - php: hhvm - allow_failures: - - php: hhvm - -notifications: - irc: "irc.freenode.org#zftalk.dev" - email: false + - TEST_COVERAGE=true + - php: 7.2 + env: + - DEPS=lowest + - php: 7.2 + env: + - DEPS=latest before_install: - if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi - - composer self-update - - if [[ $TEST_COVERAGE == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls ; fi install: - - travis_retry composer install --no-interaction --ignore-platform-reqs + - travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs + - if [[ $LEGACY_DEPS != '' ]]; then travis_retry composer update --with-dependencies $COMPOSER_ARGS $LEGACY_DEPS ; fi + - if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi + - if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi + - stty cols 120 && composer show script: - - if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; fi - - if [[ $TEST_COVERAGE != 'true' ]]; then composer test ; fi + - if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi - if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi - - if [[ $DEPLOY_DOCS == "true" && "$TRAVIS_TEST_RESULT" == "0" ]]; then wget -O theme-installer.sh "https://raw.githubusercontent.com/zendframework/zf-mkdoc-theme/master/theme-installer.sh" ; chmod 755 theme-installer.sh ; ./theme-installer.sh ; fi - -after_success: - - if [[ $DEPLOY_DOCS == "true" ]]; then echo "Preparing to build and deploy documentation" ; ./zf-mkdoc-theme/deploy.sh ; echo "Completed deploying documentation" ; fi after_script: - if [[ $TEST_COVERAGE == 'true' ]]; then composer upload-coverage ; fi + +notifications: + email: false diff --git a/composer.json b/composer.json index 679d1f355..93ee0a5bb 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ }, "require-dev": { "athletic/athletic": "~0.1", - "phpunit/PHPUnit": "~4.0", + "phpunit/phpunit": "^5.7.25", "zendframework/zend-coding-standard": "~1.0.0" }, "extra": { diff --git a/test/StringWrapper/CommonStringWrapperTest.php b/test/StringWrapper/CommonStringWrapperTest.php index 9c4cb870e..6060a3419 100644 --- a/test/StringWrapper/CommonStringWrapperTest.php +++ b/test/StringWrapper/CommonStringWrapperTest.php @@ -138,75 +138,47 @@ public function wordWrapProvider() { return [ // Standard cut tests - 'cut-single-line' => - ['utf-8', 'äbüöcß', 2, ' ', true, 'äb üö cß'], - 'cut-multi-line' => - ['utf-8', 'äbüöc ß äbüöcß', 2, ' ', true, 'äb üö c ß äb üö cß'], - 'cut-multi-line-short-words' => - ['utf-8', 'Ä very long wöööööööööööörd.', 8, "\n", true, - "Ä very\nlong\nwööööööö\nööööörd."], - 'cut-multi-line-with-previous-new-lines' => - ['utf-8', "Ä very\nlong wöööööööööööörd.", 8, "\n", false, - "Ä very\nlong\nwöööööööööööörd."], - 'long-break' => - ['utf-8', "Ä very
long wöö
öööööööö
öörd.", 8, '
', false, - "Ä very
long wöö
öööööööö
öörd."], + 'cut-single-line' => ['utf-8', 'äbüöcß', 2, ' ', true, 'äb üö cß'], + 'cut-multi-line' => ['utf-8', 'äbüöc ß äbüöcß', 2, ' ', true, 'äb üö c ß äb üö cß'], + 'cut-multi-line-short-words' => ['utf-8', 'Ä very long wöööööööööööörd.', 8, "\n", true, + "Ä very\nlong\nwööööööö\nööööörd."], + 'cut-multi-line-with-previous-new-lines' => ['utf-8', "Ä very\nlong wöööööööööööörd.", + 8, "\n", false, "Ä very\nlong\nwöööööööööööörd."], + 'long-break' => ['utf-8', "Ä very
long wöö
öööööööö
öörd.", 8, '
', false, + "Ä very
long wöö
öööööööö
öörd."], // Alternative cut tests - 'cut-beginning-single-space' => - ['utf-8', ' äüöäöü', 3, ' ', true, ' äüö äöü'], - 'cut-ending-single-space' => - ['utf-8', 'äüöäöü ', 3, ' ', true, 'äüö äöü '], - 'cut-ending-single-space-with-non-space-divider' => - ['utf-8', 'äöüäöü ', 3, '-', true, 'äöü-äöü-'], - 'cut-ending-two-spaces' => - ['utf-8', 'äüöäöü ', 3, ' ', true, 'äüö äöü '], - 'no-cut-ending-single-space' => - ['utf-8', '12345 ', 5, '-', false, '12345-'], - 'no-cut-ending-two-spaces' => - ['utf-8', '12345 ', 5, '-', false, '12345- '], - 'cut-ending-three-spaces' => - ['utf-8', 'äüöäöü ', 3, ' ', true, 'äüö äöü '], - 'cut-ending-two-breaks' => - ['utf-8', 'äüöäöü--', 3, '-', true, 'äüö-äöü--'], - 'cut-tab' => - ['utf-8', "äbü\töcß", 3, ' ', true, "äbü \töc ß"], - 'cut-new-line-with-space' => - ['utf-8', "äbü\nößt", 3, ' ', true, "äbü \nöß t"], - 'cut-new-line-with-new-line' => - ['utf-8', "äbü\nößte", 3, "\n", true, "äbü\nößt\ne"], + 'cut-beginning-single-space' => ['utf-8', ' äüöäöü', 3, ' ', true, ' äüö äöü'], + 'cut-ending-single-space' => ['utf-8', 'äüöäöü ', 3, ' ', true, 'äüö äöü '], + 'cut-ending-single-space-with-non-space-divider' => ['utf-8', 'äöüäöü ', 3, '-', true, + 'äöü-äöü-'], + 'cut-ending-two-spaces' => ['utf-8', 'äüöäöü ', 3, ' ', true, 'äüö äöü '], + 'no-cut-ending-single-space' => ['utf-8', '12345 ', 5, '-', false, '12345-'], + 'no-cut-ending-two-spaces' => ['utf-8', '12345 ', 5, '-', false, '12345- '], + 'cut-ending-three-spaces' => ['utf-8', 'äüöäöü ', 3, ' ', true, 'äüö äöü '], + 'cut-ending-two-breaks' => ['utf-8', 'äüöäöü--', 3, '-', true, 'äüö-äöü--'], + 'cut-tab' => ['utf-8', "äbü\töcß", 3, ' ', true, "äbü \töc ß"], + 'cut-new-line-with-space' => ['utf-8', "äbü\nößt", 3, ' ', true, "äbü \nöß t"], + 'cut-new-line-with-new-line' => ['utf-8', "äbü\nößte", 3, "\n", true, "äbü\nößt\ne"], // Break cut tests - 'cut-break-before' => - ['ascii', 'foobar-foofoofoo', 8, '-', true, 'foobar-foofoofo-o'], - 'cut-break-with' => - ['ascii', 'foobar-foobar', 6, '-', true, 'foobar-foobar'], - 'cut-break-within' => - ['ascii', 'foobar-foobar', 7, '-', true, 'foobar-foobar'], - 'cut-break-within-end' => - ['ascii', 'foobar-', 7, '-', true, 'foobar-'], - 'cut-break-after' => - ['ascii', 'foobar-foobar', 5, '-', true, 'fooba-r-fooba-r'], + 'cut-break-before' => ['ascii', 'foobar-foofoofoo', 8, '-', true, 'foobar-foofoofo-o'], + 'cut-break-with' => ['ascii', 'foobar-foobar', 6, '-', true, 'foobar-foobar'], + 'cut-break-within' => ['ascii', 'foobar-foobar', 7, '-', true, 'foobar-foobar'], + 'cut-break-within-end' => ['ascii', 'foobar-', 7, '-', true, 'foobar-'], + 'cut-break-after' => ['ascii', 'foobar-foobar', 5, '-', true, 'fooba-r-fooba-r'], // Standard no-cut tests - 'no-cut-single-line' => - ['utf-8', 'äbüöcß', 2, ' ', false, 'äbüöcß'], - 'no-cut-multi-line' => - ['utf-8', 'äbüöc ß äbüöcß', 2, "\n", false, "äbüöc\nß\näbüöcß"], - 'no-cut-multi-word' => - ['utf-8', 'äöü äöü äöü', 5, "\n", false, "äöü\näöü\näöü"], + 'no-cut-single-line' => ['utf-8', 'äbüöcß', 2, ' ', false, 'äbüöcß'], + 'no-cut-multi-line' => ['utf-8', 'äbüöc ß äbüöcß', 2, "\n", false, "äbüöc\nß\näbüöcß"], + 'no-cut-multi-word' => ['utf-8', 'äöü äöü äöü', 5, "\n", false, "äöü\näöü\näöü"], // Break no-cut tests - 'no-cut-break-before' => - ['ascii', 'foobar-foofoofoo', 8, '-', false, 'foobar-foofoofoo'], - 'no-cut-break-with' => - ['ascii', 'foobar-foobar', 6, '-', false, 'foobar-foobar'], - 'no-cut-break-within' => - ['ascii', 'foobar-foobar', 7, '-', false, 'foobar-foobar'], - 'no-cut-break-within-end' => - ['ascii', 'foobar-', 7, '-', false, 'foobar-'], - 'no-cut-break-after' => - ['ascii', 'foobar-foobar', 5, '-', false, 'foobar-foobar'], + 'no-cut-break-before' => ['ascii', 'foobar-foofoofoo', 8, '-', false, 'foobar-foofoofoo'], + 'no-cut-break-with' => ['ascii', 'foobar-foobar', 6, '-', false, 'foobar-foobar'], + 'no-cut-break-within' => ['ascii', 'foobar-foobar', 7, '-', false, 'foobar-foobar'], + 'no-cut-break-within-end' => ['ascii', 'foobar-', 7, '-', false, 'foobar-'], + 'no-cut-break-after' => ['ascii', 'foobar-foobar', 5, '-', false, 'foobar-foobar'], ]; } @@ -248,28 +220,19 @@ public function strPadProvider() { return [ // single-byte - 'left-padding_single-byte' => - ['ascii', 'aaa', 5, 'o', STR_PAD_LEFT, 'ooaaa'], - 'center-padding_single-byte' => - ['ascii', 'aaa', 6, 'o', STR_PAD_BOTH, 'oaaaoo'], - 'right-padding_single-byte' => - ['ascii', 'aaa', 5, 'o', STR_PAD_RIGHT, 'aaaoo'], + 'left-padding_single-byte' => ['ascii', 'aaa', 5, 'o', STR_PAD_LEFT, 'ooaaa'], + 'center-padding_single-byte' => ['ascii', 'aaa', 6, 'o', STR_PAD_BOTH, 'oaaaoo'], + 'right-padding_single-byte' => ['ascii', 'aaa', 5, 'o', STR_PAD_RIGHT, 'aaaoo'], // multi-byte - 'left-padding_multi-byte' => - ['utf-8', 'äää', 5, 'ö', STR_PAD_LEFT, 'ööäää'], - 'center-padding_multi-byte' => - ['utf-8', 'äää', 6, 'ö', STR_PAD_BOTH, 'öäääöö'], - 'right-padding_multi-byte' => - ['utf-8', 'äää', 5, 'ö', STR_PAD_RIGHT, 'äääöö'], + 'left-padding_multi-byte' => ['utf-8', 'äää', 5, 'ö', STR_PAD_LEFT, 'ööäää'], + 'center-padding_multi-byte' => ['utf-8', 'äää', 6, 'ö', STR_PAD_BOTH, 'öäääöö'], + 'right-padding_multi-byte' => ['utf-8', 'äää', 5, 'ö', STR_PAD_RIGHT, 'äääöö'], // ZF-12186 - 'input-longer-than-pad-length' => - ['utf-8', 'äääöö', 2, 'ö', STR_PAD_RIGHT, 'äääöö'], - 'input-same-as-pad-length' => - ['utf-8', 'äääöö', 5, 'ö', STR_PAD_RIGHT, 'äääöö'], - 'negative-pad-length' => - ['utf-8', 'äääöö', -2, 'ö', STR_PAD_RIGHT, 'äääöö'], + 'input-longer-than-pad-length' => ['utf-8', 'äääöö', 2, 'ö', STR_PAD_RIGHT, 'äääöö'], + 'input-same-as-pad-length' => ['utf-8', 'äääöö', 5, 'ö', STR_PAD_RIGHT, 'äääöö'], + 'negative-pad-length' => ['utf-8', 'äääöö', -2, 'ö', STR_PAD_RIGHT, 'äääöö'], ]; } diff --git a/test/TestAsset/ArrayObjectObjectCount.php b/test/TestAsset/ArrayObjectObjectCount.php index 7b40dbeed..fef278f65 100644 --- a/test/TestAsset/ArrayObjectObjectCount.php +++ b/test/TestAsset/ArrayObjectObjectCount.php @@ -11,7 +11,8 @@ class ArrayObjectObjectCount implements \Countable { - public function count() { - return 42; - } + public function count() + { + return 42; + } }