在Debian VM上运行PHPUnit

I'm working with Magento 2.2.4 installed on a Vagrant Debian VM. I've installed phpunit 6.2.4 using composer. When I follow the Magento 2 docs to run the tests, my CLI simply prints out the text in the phpunit file:

dir=$(cd "${0%[/\\]*}" > /dev/null; cd '../phpunit/phpunit' && pwd)

     if [ -d /proc/cygdrive ] && [[ $(which php) == $(readlink -n /proc/cygdrive)/* ]]; then
        # We are in Cgywin using Windows php, so the path must be translated
        dir=$(cygpath -m "$dir");
     fi

"${dir}/phpunit" "$@"

How can I get phpunit to run correctly in this case?