Problem/Motivation
Drupal\Tests\taxonomy\Functional\EfqTest doesn't make any HTTP request.
Proposed resolution
- Convert it to a kernel test.
- Move
TaxonomyTestTraitfromtests/src/Functionaltotests/src/Traitsas is used by all kind of tests. - Rename it to a more meaningful name.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Data model changes
None.
Release notes snippet
N/A
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | 3041030-17.patch | 13.65 KB | krzysztof domański |
| #17 | interdiff-13-17.txt | 648 bytes | krzysztof domański |
| #13 | 3041030-13.patch | 13.02 KB | krzysztof domański |
| #13 | interdiff-10-13.txt | 2.73 KB | krzysztof domański |
| #10 | 3041030-10.patch | 13.47 KB | claudiu.cristea |
Comments
Comment #2
claudiu.cristeaPatch.
Comment #3
jibranI'm pretty sure we can't do that without a BC layer.
Comment #4
claudiu.cristeaComment #5
claudiu.cristea@jibran, you're right. Here's the BC layer.
Comment #6
claudiu.cristeaFixed coding standards.
Comment #7
lendudeJust some notes, nothing blocking I think.
Not strictly necessary since it's updating a class that is deprecated itself.
See #3024461: Adopt consistent deprecation format for core and contrib deprecation messages for the new way of writing these, since this has not been officially approved, not setting it back now (but might have to update this is that lands first)
Went through the conversion and everything checks out.
The only part I'm missing that is mentioned in the IS is: "Rename it to a more meaningful name", which I think is worth doing.
Comment #8
claudiu.cristea#71, 2: Fixed.
The test class has been renamed from
EfqTesttoTaxonomyTermEfqTest:Comment #9
lendudeAh ok, I was looking for hopefully getting rid of 'Efq', why not just say TaxonomyTermEntityFieldQueryTest. No need to wrack my brain thinking what 'Efq' would stand for.
Comment #10
claudiu.cristeaGot it. In fact the "entity field query" is an antiquity from D7. It's simply "entity query" now.
Comment #11
krzysztof domańskiCan we also change the name of the method
testTaxonomyEfq()totestTaxonomyEntityQuery()?core/modules/taxonomy/tests/src/Kernel/TaxonomyTermEntityQueryTest.php:31:Comment #12
berdirI'd suggest testTermEntityQuery then, possibly for the class name also leave out the Taxonomy.
Comment #13
krzysztof domański1. I changed trigger_error() message. Drupal core deprecation policy.
According to #12:
2. I changed the class name from
TaxonomyTermEntityQueryTesttoTermEntityQueryTest.3. I changed the name of the method
testTaxonomyEfq()totestTermEntityQuery()Comment #14
lendudeThanks for all the feedback, this reads much better now.
Nice conversion, no loss of coverage that I can see.
Comment #16
lendudeNew deprecation introduced due to #3042640: Convert TaxonomyFieldTidTest to a kernel test.
Comment #17
krzysztof domańskiComment #18
claudiu.cristeaThe patch has been RTBCed in #14. I'm doing it only for the change from #17.
Comment #19
catchCommitted 6874218 and pushed to 8.8.x. Thanks!
Comment #22
dwwFYI: The change record for this was never published. I just did so.
I also figured out how to get my contrib tests that were trying to use this trait to work on 8.7.x and 8.8.x and above, so I added that wisdom to the CR:
https://www.drupal.org/node/3041703/revisions/view/11349728/11635421
Enjoy,
-Derek