REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.39 KB
Close
//opt/cpanel/ea-wappspector/vendor/squizlabs/php_codesniffer/tests/EndToEnd/outofmemory_test.sh
Text
Base64
#!/usr/bin/env bash function tear_down() { rm -f tests/EndToEnd/Fixtures/*.fixed } function test_phpcs_out_of_memory_error_handling() { OUTPUT="$(bin/phpcs -d memory_limit=4M --standard=tests/EndToEnd/Fixtures/endtoend.xml.dist tests/EndToEnd/Fixtures/)" # Exit code may be 255 or 139 depending on the PHP version, but the exact code is not our concern, just that it's non-zero. assert_unsuccessful_code assert_contains "The PHP_CodeSniffer \"phpcs\" command ran out of memory." "$OUTPUT" assert_contains "Either raise the \"memory_limit\" of PHP in the php.ini file or raise the memory limit at runtime" "$OUTPUT" assert_contains "using \"phpcs -d memory_limit=512M\" (replace 512M with the desired memory limit)." "$OUTPUT" } function test_phpcbf_out_of_memory_error_handling() { OUTPUT="$(bin/phpcbf -d memory_limit=4M --standard=tests/EndToEnd/Fixtures/endtoend.xml.dist tests/EndToEnd/Fixtures/ --suffix=.fixed)" # Exit code may be 255 or 139 depending on the PHP version, but the exact code is not our concern, just that it's non-zero. assert_unsuccessful_code assert_contains "The PHP_CodeSniffer \"phpcbf\" command ran out of memory." "$OUTPUT" assert_contains "Either raise the \"memory_limit\" of PHP in the php.ini file or raise the memory limit at runtime" "$OUTPUT" assert_contains "using \"phpcbf -d memory_limit=512M\" (replace 512M with the desired memory limit)." "$OUTPUT" }
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).