From 9d041d8cf0da79bf20ecdc69b7d05c373898b980 Mon Sep 17 00:00:00 2001
From: Hiroshi Urabe <urabe@ham.works>
Date: Mon, 11 Mar 2024 16:45:15 +0900
Subject: [PATCH] fix unit testing

---
 .wp-env.json  | 1 +
 composer.json | 2 +-
 package.json  | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/.wp-env.json b/.wp-env.json
index 142ab25..273d228 100644
--- a/.wp-env.json
+++ b/.wp-env.json
@@ -1,6 +1,7 @@
 {
 	"core": "WordPress/WordPress#6.4",
 	"port": 20000,
+	"phpVersion": "8.1",
 	"plugins": [ "." ],
 	"env": {
 		"tests": {
diff --git a/composer.json b/composer.json
index ef9d2b9..47d4422 100644
--- a/composer.json
+++ b/composer.json
@@ -8,7 +8,7 @@
 		}
 	],
 	"require": {
-		"php": ">=7.4"
+		"php": ">=8.1"
 	},
 	"require-dev": {
 		"dealerdirect/phpcodesniffer-composer-installer": "*",
diff --git a/package.json b/package.json
index d10d3ca..0ea88b3 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,7 @@
 	"license": "GPL-2.0+",
 	"scripts": {
 		"wp-env": "wp-env",
-		"test-unit-php": "wp-env run phpunit 'phpunit -c /var/www/html/wp-content/plugins/schedule-terms/phpunit.xml.dist --verbose'",
+		"test-unit-php": "wp-env run cli --env-cwd='/var/www/html/wp-content/plugins/schedule-terms' composer test",
 		"packages-update": "wp-scripts packages-update",
 		"lint-php": "./vendor/bin/phpcs --standard=./phpcs.xml.dist --warning-severity=6",
 		"test": "wp-scripts test-unit-js",