Skip to content

Commit

Permalink
Merge pull request #58 from jtpalmer/use-composer-phpunit
Browse files Browse the repository at this point in the history
Ensure use of PHPUnit installed by composer
  • Loading branch information
jtpalmer authored Feb 17, 2017
2 parents 86ee68a + bfb4f33 commit 35f0c9a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
9 changes: 8 additions & 1 deletion classes/UnitTesting/RunTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,11 @@ then
fi

cd $(dirname $0)
phpunit ${PHPUNITARGS} .
phpunit="$(readlink -f ../../vendor/bin/phpunit)"

if [ ! -x "$phpunit" ]; then
echo phpunit not found, run \"composer install\" 1>&2
exit 127
fi

$phpunit ${PHPUNITARGS} .
10 changes: 6 additions & 4 deletions open_xdmod/modules/xdmod/tests/runtests.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#!/bin/sh

if { ! which phpunit >/dev/null 2>&1; } then
echo phpunit not found 1>&2
cd $(dirname $0)
phpunit="$(readlink -f ../../../../vendor/bin/phpunit)"

if [ ! -x "$phpunit" ]; then
echo phpunit not found, run \"composer install\" 1>&2
exit 127
fi

cd $(dirname $0)
phpunit .
$phpunit .
exit $?

0 comments on commit 35f0c9a

Please sign in to comment.