REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.95 KB
Close
//opt/cpanel/ea-wappspector/vendor/squizlabs/php_codesniffer/tests/EndToEnd/phpcbf_test.sh
Text
Base64
#!/usr/bin/env bash function tear_down() { rm -rf tests/EndToEnd/Fixtures/*.fixed } 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)" 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)" 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 assert_contains "F 1 / 1 (100%)" "$OUTPUT" assert_contains "A TOTAL OF 1 ERROR WERE FIXED IN 1 FILE" "$OUTPUT" } function test_phpcbf_bug_1112() { # See https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/1112 if [[ "$(uname)" == "Darwin" ]]; then # Perform some magic with `& fg` to prevent the processes from turning into a background job. assert_successful_code "$(bash -ic 'bash --init-file <(echo "echo \"Subprocess\"") -c "bin/phpcbf --no-cache --parallel=2 --standard=tests/EndToEnd/Fixtures/endtoend.xml.dist tests/EndToEnd/Fixtures/ClassOneWithoutStyleError.inc tests/EndToEnd/Fixtures/ClassTwoWithoutStyleError.inc" & fg')" else # This is not needed on Linux / GitHub Actions assert_successful_code "$(bash -ic 'bash --init-file <(echo "echo \"Subprocess\"") -c "bin/phpcbf --no-cache --parallel=2 --standard=tests/EndToEnd/Fixtures/endtoend.xml.dist tests/EndToEnd/Fixtures/ClassOneWithoutStyleError.inc tests/EndToEnd/Fixtures/ClassTwoWithoutStyleError.inc"')" fi }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 3
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Fixtures
DIR
-
drwxr-xr-x
2025-11-04 16:30:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
outofmemory_test.sh
1.39 KB
lrw-r--r--
2025-11-04 16:30:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
phpcbf_test.sh
1.95 KB
lrw-r--r--
2025-11-04 16:30:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
phpcs_test.sh
1.74 KB
lrw-r--r--
2025-11-04 16:30:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).