When hitting Ctrl+C to interrupt unit test running, the old
configuration was not restored properly.
This fix traps the signal to properly restore the configuration after an
interruption.
error: pathspec 'tests/data/lorem-copy.txt' did not match any file(s) known to git.
error: pathspec 'tests/data/testimage-copy.png' did not match any file(s) known to git.
autotest.sh now checks for the validity of the db config name argument.
If the db config name is not known, it show syntax info.
This should save some time to people to understand how to use this
script. Before this fix, an invalid argument would return a big HTML
page in the output.
The script now checks for config.php existance and backs it up before
running the test, then restores it back at the end. This avoids the
situation where devs lose their manually edited config if they forgot to
back it up before running the unit tests.
The script now also checks for config.php permissions beforehand to
avoid displaying an annoying HTML page output in the console with an
error message.