Skip to content

Commit

Permalink
PHPUnit 10 compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
demiankatz committed Jan 25, 2024
1 parent 789121c commit c1f58ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/VuFind/src/VuFind/Search/Base/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,7 @@ public function getSearchClassId()
// Special case: if there's an unexpected number of parts, we may be testing
// with a mock object; if so, that's okay, but anything else is unexpected.
if (count($class) !== 4) {
if (str_starts_with($className, 'Mock_')) {
if (str_starts_with($className, 'Mock_') || str_starts_with($className, 'MockObject_')) {
return 'Mock';
}
throw new \Exception("Unexpected class name: {$className}");
Expand Down

0 comments on commit c1f58ae

Please sign in to comment.