Skip to content

Commit

Permalink
ensure the mock object is used in testCustomSelector #3
Browse files Browse the repository at this point in the history
  • Loading branch information
gregor-j committed Jul 2, 2024
1 parent 2047aab commit 84942b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Test/Case/Controller/Component/FilterComponentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 84942b0

Please sign in to comment.