From 95b150e3d30234f6f40ff39a019b3a2109459568 Mon Sep 17 00:00:00 2001 From: William Jacoby Date: Tue, 6 Oct 2026 03:18:51 -0500 Subject: [PATCH] Mock the phpBB 4.0 extension finder class in ext_test phpBB 4.0 moved the finder from \phpbb\finder to \phpbb\finder\finder, so the purge test errored there. Mock whichever class exists. Co-Authored-By: Claude Opus 5.5 --- tests/ext_test.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/ext_test.php b/tests/ext_test.php index 54ddf98..b267945 100644 --- a/tests/ext_test.php +++ b/tests/ext_test.php @@ -80,7 +80,9 @@ public function test_purge_removes_owned_options_and_all_grants_but_disable_pres } $container->setParameter('core.root_path', $root); $container->setParameter('core.php_ext', 'php'); - $extension = new ext($container, $this->createMock(\phpbb\finder::class), + // phpBB 4.0 moved the extension finder from \phpbb\finder to \phpbb\finder\finder. + $finder_class = class_exists(\phpbb\finder\finder::class) ? \phpbb\finder\finder::class : \phpbb\finder::class; + $extension = new ext($container, $this->createMock($finder_class), $this->createMock(\phpbb\db\migrator::class), 'phpbbmodders/documentation', ''); $extension->disable_step(false); $this->assertCount(5, $this->rows($db, ACL_OPTIONS_TABLE));