summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2021-06-27 14:51:01 +0200
committerHarald Eilertsen <haraldei@anduin.net>2021-06-27 14:51:01 +0200
commit349ce7054ac8caccdc3d370365461931ff7a7b96 (patch)
treeb8d4c6414d854b7474e59aa7e6b367adf71a5045
parent82c4a8f2c4e5acd80b813829cecc40f621da3b21 (diff)
downloadgigologadmin-349ce7054ac8caccdc3d370365461931ff7a7b96.tar.gz
gigologadmin-349ce7054ac8caccdc3d370365461931ff7a7b96.tar.bz2
gigologadmin-349ce7054ac8caccdc3d370365461931ff7a7b96.zip
Clean tests env before running tests
Since we're using our own database tables, these are not cleaned by the default WP_PHPUnit setup. To ensure that we start on a clean slate when running the tests, clean the env before the tests are run.
-rwxr-xr-xrun-tests1
-rw-r--r--run-tests-windoze.bat1
2 files changed, 2 insertions, 0 deletions
diff --git a/run-tests b/run-tests
index 9f881d6..8c1eeb5 100755
--- a/run-tests
+++ b/run-tests
@@ -5,4 +5,5 @@
#
# SPDX-License-Identifier: CC0-1.0
+npm run wp-env clean
npm run wp-env run phpunit "phpunit -c /var/www/html/wp-content/plugins/giglogadmin/phpunit.xml $*"
diff --git a/run-tests-windoze.bat b/run-tests-windoze.bat
index 107f943..8654d40 100644
--- a/run-tests-windoze.bat
+++ b/run-tests-windoze.bat
@@ -5,4 +5,5 @@ REM SPDX-FileCopyrightText: 2021 Harald Eilertsen <haraldei@anduin.net>
REM
REM SPDX-License-Identifier: CC0-1.0
+npm run wp-env clean
npm run wp-env run phpunit "phpunit -c /var/www/html/wp-content/plugins/giglogadmin/phpunit.xml"