Comment on page
Command
Use this assertion type to run any free command and verify its output with your expected value.
This is based on "string contains" assertions.
Use this type of assertion to verify against an expected output of the command.
commands:
- name: "NVM can switch Node version"
command: "nvm use 14 && echo SVRUNIT: $(node -v)"
expected: "SVRUNIT: v14."
Use this type if you do not want your output to show the provided value.
commands:
- name: "Xdebug not Corrupted"
command: "php -v"
not_expected: "zend_mm_heap corrupted"
Use this type if you do not want your output to show the provided value.
commands:
- name: "Verify PHP 7.4 and OPcache v7.4"
command: "php -v"
expected_and:
- "PHP 7.4"
- "OPcache v7.4"
Use this type if you do not want your output to show the provided value.
commands
- name: "Verify any of the allowed PHP versions"
command: "php -v"
expected_or:
- "PHP 8.1"
- "PHP 8.0"
- "PHP 7.4"
This test also offers separate command options as setup and teardown routine.
Commands provided with these options, will be run prior and/or after the actual command of this test.
commands:
- name: "..."
command: "...."
expected: "..."
setup: "mkdir -p test_assets"
teardown: "rm -f test_assets"
Last modified 1yr ago