From 84942b03614cbb1a0335f0c5dfc1a0bef90ef499 Mon Sep 17 00:00:00 2001 From: Gregor Date: Tue, 2 Jul 2024 12:15:47 +0200 Subject: [PATCH] ensure the mock object is used in testCustomSelector #3 --- Test/Case/Controller/Component/FilterComponentTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Test/Case/Controller/Component/FilterComponentTest.php b/Test/Case/Controller/Component/FilterComponentTest.php index 8b9f2b3..c4c88c5 100644 --- a/Test/Case/Controller/Component/FilterComponentTest.php +++ b/Test/Case/Controller/Component/FilterComponentTest.php @@ -439,8 +439,9 @@ public function testCustomSelector(): void * ClassRegistry::init('DocumentCategory'); * in * FilterComponent.php:216 - * This line adds the mock object as model class for DocumentCategory. + * The following two lines adds the mock object as model class for DocumentCategory. */ + App::uses('DocumentCategory', 'Filter.Test/Case/MockObjects'); ClassRegistry::addObject('document_category', new DocumentCategory()); $this->Controller->filters = $testSettings;