As term loading is now injected into \Drupal\search_api\Plugin\views\argument\SearchApiTerm, thanks to #3065112: Inject the entity type manager in SearchApiTerm views argument, we should now be able to change the accompanying test (\Drupal\Tests\search_api\Kernel\Views\TaxonomyTermArgumentTest) from a kernel to a unit test.

Tentatively tagging with novice as I don’t think it should be that hard to transform – but not 100% sure.

Comments

drunken monkey created an issue. See original summary.

andreyjan’s picture

Status: Active » Needs review
StatusFileSize
new9.04 KB

Here's the patch.

drunken monkey’s picture

Great, thanks a lot!
One minor thing: using Term::class is generally preferrable to putting the classname into a string, as it has beeter findability in an IDE. Otherwise, this looks very good, and also passes fine.
I personally like mocks more than prophecies, but that’s just taste. So, if the patch still looks good to you, I’ll commit. Thanks again in any case!

andreyjan’s picture

Thanks. This change looks good to me.

drunken monkey’s picture

Status: Needs review » Fixed

Good to hear, thanks for reporting back!
Committed.
Thanks again!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.