diff --git a/.github/workflows/end-to-end-tests.yml b/.github/workflows/end-to-end-tests.yml index ff9efd3729..ad05b65b90 100644 --- a/.github/workflows/end-to-end-tests.yml +++ b/.github/workflows/end-to-end-tests.yml @@ -6,7 +6,7 @@ on: push: branches: - master - - 4.0 + - 4.x tags: - '**' paths-ignore: @@ -27,7 +27,7 @@ jobs: strategy: matrix: - php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] + php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] # yamllint disable-line rule:line-length name: "E2E PHP: ${{ matrix.php }}" diff --git a/tests/EndToEnd/phpcbf_test.sh b/tests/EndToEnd/phpcbf_test.sh index 3886832342..d8eeae0462 100644 --- a/tests/EndToEnd/phpcbf_test.sh +++ b/tests/EndToEnd/phpcbf_test.sh @@ -5,22 +5,22 @@ function tear_down() { } function test_phpcbf_is_working() { - OUTPUT="$(bin/phpcbf --no-cache --standard=tests/EndToEnd/Fixtures/endtoend.xml.dist tests/EndToEnd/Fixtures/ClassOneWithoutStyleError.inc tests/EndToEnd/Fixtures/ClassTwoWithoutStyleError.inc)" + OUTPUT="$( { bin/phpcbf --no-cache --standard=tests/EndToEnd/Fixtures/endtoend.xml.dist tests/EndToEnd/Fixtures/ClassOneWithoutStyleError.inc tests/EndToEnd/Fixtures/ClassTwoWithoutStyleError.inc; } 2>&1 )" assert_successful_code assert_contains "No violations were found" "$OUTPUT" } function test_phpcbf_is_working_in_parallel() { - OUTPUT="$(bin/phpcbf --no-cache --parallel=2 --standard=tests/EndToEnd/Fixtures/endtoend.xml.dist tests/EndToEnd/Fixtures/ClassOneWithoutStyleError.inc tests/EndToEnd/Fixtures/ClassTwoWithoutStyleError.inc)" + OUTPUT="$( { bin/phpcbf --no-cache --parallel=2 --standard=tests/EndToEnd/Fixtures/endtoend.xml.dist tests/EndToEnd/Fixtures/ClassOneWithoutStyleError.inc tests/EndToEnd/Fixtures/ClassTwoWithoutStyleError.inc; } 2>&1 )" assert_successful_code assert_contains "No violations were found" "$OUTPUT" } function test_phpcbf_returns_error_on_issues() { - OUTPUT="$(bin/phpcbf --no-colors --no-cache --suffix=.fixed --standard=tests/EndToEnd/Fixtures/endtoend.xml.dist tests/EndToEnd/Fixtures/ClassWithStyleError.inc)" - assert_exit_code 1 + OUTPUT="$( { bin/phpcbf --no-colors --parallel=1 --no-cache --suffix=.fixed --standard=tests/EndToEnd/Fixtures/endtoend.xml.dist tests/EndToEnd/Fixtures/ClassWithStyleError.inc; } 2>&1 )" + assert_successful_code assert_contains "F 1 / 1 (100%)" "$OUTPUT" assert_contains "A TOTAL OF 1 ERROR WERE FIXED IN 1 FILE" "$OUTPUT" diff --git a/tests/EndToEnd/phpcs_test.sh b/tests/EndToEnd/phpcs_test.sh index 3bdf41708d..dcc643b03b 100644 --- a/tests/EndToEnd/phpcs_test.sh +++ b/tests/EndToEnd/phpcs_test.sh @@ -9,8 +9,8 @@ function test_phpcs_is_working_in_parallel() { } function test_phpcs_returns_error_on_issues() { - OUTPUT="$(bin/phpcs --no-colors --no-cache --standard=tests/EndToEnd/Fixtures/endtoend.xml.dist tests/EndToEnd/Fixtures/ClassWithStyleError.inc)" - assert_exit_code 2 + OUTPUT="$( { bin/phpcs --no-colors --no-cache --standard=tests/EndToEnd/Fixtures/endtoend.xml.dist tests/EndToEnd/Fixtures/ClassWithStyleError.inc; } 2>&1 )" + assert_exit_code 1 assert_contains "E 1 / 1 (100%)" "$OUTPUT" assert_contains "FOUND 1 ERROR AFFECTING 1 LINE" "$OUTPUT"