From 2ae4c24db5168850d83a1422b401036c17f9cb2b Mon Sep 17 00:00:00 2001
From: Colin Stewart <79332690+costdev@users.noreply.github.com>
Date: Sun, 1 Dec 2024 10:03:40 +0000
Subject: [PATCH] Introduce and implement `AdminSettings_UnitTestCase` (#213)
---
phpcs.xml.dist | 8 ++++++
tests/phpunit/bootstrap.php | 3 +++
.../includes/AdminSettings_UnitTestCase.php | 25 +++++++++++++++++++
.../AdminSettings_GetSettingTest.php | 2 +-
4 files changed, 37 insertions(+), 1 deletion(-)
create mode 100644 tests/phpunit/includes/AdminSettings_UnitTestCase.php
diff --git a/phpcs.xml.dist b/phpcs.xml.dist
index af33bc2..081e4b7 100644
--- a/phpcs.xml.dist
+++ b/phpcs.xml.dist
@@ -58,4 +58,12 @@
+
+
+
+ /tests/phpunit/tests/*
+
+
+ /tests/phpunit/tests/*
+
diff --git a/tests/phpunit/bootstrap.php b/tests/phpunit/bootstrap.php
index 2a947de..3899953 100644
--- a/tests/phpunit/bootstrap.php
+++ b/tests/phpunit/bootstrap.php
@@ -39,3 +39,6 @@ function _manually_load_plugin() {
// Start up the WP testing environment.
require "{$_tests_dir}/includes/bootstrap.php";
+
+// Load unit test abstract classes.
+require __DIR__ . '/includes/AdminSettings_UnitTestCase.php';
diff --git a/tests/phpunit/includes/AdminSettings_UnitTestCase.php b/tests/phpunit/includes/AdminSettings_UnitTestCase.php
new file mode 100644
index 0000000..b9824ac
--- /dev/null
+++ b/tests/phpunit/includes/AdminSettings_UnitTestCase.php
@@ -0,0 +1,25 @@
+