From 037791f298808431aef2f3e6cd0a46cbbbcdce70 Mon Sep 17 00:00:00 2001 From: Justin Frydman Date: Thu, 12 Sep 2024 10:22:31 -0600 Subject: [PATCH 1/2] Set proper return type for factory() method --- src/TestCase/WPTestCase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TestCase/WPTestCase.php b/src/TestCase/WPTestCase.php index 2e8aaa6ce..53a05d5b8 100644 --- a/src/TestCase/WPTestCase.php +++ b/src/TestCase/WPTestCase.php @@ -18,7 +18,7 @@ /** * @method static commit_transaction() * @method static delete_user($user_id) - * @method static factory() + * @method \WP_UnitTest_Factory factory() * @method static flush_cache() * @method static forceTicket($ticket) * @method static get_called_class() From b9dfd0b7492bbc1de79c506a0fa39eb4c8e03f2c Mon Sep 17 00:00:00 2001 From: Justin Frydman Date: Thu, 12 Sep 2024 10:24:28 -0600 Subject: [PATCH 2/2] update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 80469dd99..5c82b0cec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [unreleased] Unreleased +## Fixed + +- Set proper factory() return type in `WPTestCase` class, so IDE autocompletion works (thanks @defunctl). + ## [4.3.3] 2024-09-11; ## Fixed