Skip to content

Instantly share code, notes, and snippets.

@agentrickard
Created October 24, 2017 21:32
Show Gist options
  • Save agentrickard/888f9730d3cc0496b9846137c449bd53 to your computer and use it in GitHub Desktop.
Save agentrickard/888f9730d3cc0496b9846137c449bd53 to your computer and use it in GitHub Desktop.
#!/bin/bash
#####
# Copy to yopur home directory or web root and make executable.
#
# Run all tests for a module:
# > ./test.sh [name_of_module]
#
# Run a specific test class.
# > ./test.sh node Drupal\\Tests\\node\\Functional\\NodeAccessLanguageFallbackTest
#
# To clean up the test environment:
# > ./test.sh --clean
####
# Be in the right directory
cd /Applications/MAMP/htdocs/drupal8/core/scripts
tests=$1
class=$2
v='--verbose --browser --color'
# Change example.com to your local dev URL.
if [ $class ]
then
v='--verbose --browser --color --class'
php run-tests.sh $v --url http://example.com $class
else
if [ $tests ]
then
php run-tests.sh $v --url http://example.com $tests $class
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment