Closed (fixed)
Project:
Drupal core
Version:
8.8.x-dev
Component:
taxonomy.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Apr 2015 at 06:49 UTC
Updated:
17 Jun 2019 at 19:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #7
mile23Comment #8
manuel garcia commentedHere we go
Comment #9
manuel garcia commentedoops
Comment #10
manuel garcia commentedI noticed that the tests still pass if we take out field and text from here, should we?
Comment #11
naveenvalechawe can remove the field, but don't have a strong opinion because I found that in the core there are mixed examples available.
The reasons why the tests are passing without field because field_test module has a dependency on the entity_test module which has a dependency on the field module.
Changes look good to me.
Comment #12
manuel garcia commentedThanks @naveenvalecha for the feedback. I did notice that we do need
fieldandtexton the list of modules to enable. Its only the configuration installation that seems not to be required for the test. Perhaps its being installed like you said via dependencies.Comment #13
claudiu.cristeas/public/protected
This module is not used.
This vocab is used only in 2 tests. The other tests are deleting the vocab prior running their tets logic. Let's remove it as class property and create it as local var only in the tests that are requiring it. Then we can drop also the vocabs removal from the other tests.
Re #10, #11, #12: It seems that we don't need any config to be installed. Drop the whole
$this->installConfig().In simpletest, the assert custom message has described the success. Contrary, the PHPUnit tests are describing the failure. We have to either recreate all messages to describe the failure or to, simply, remove them. I would go with the later. We should do the same for all test occurrences.
I don't understand what this test is testing. All these tests should be covered by generic config entities testing. I would remove the whole test.
The method starts with an empty line.
entity_load_multiple()is deprecated and should be replaced in the comment.This method is deprecated.
The naming: s/$controller/$storage
Comment #14
manuel garcia commentedRe #13:
Thanks so much for the review!
1. Done
2.Nice, removed.
3. We actually use the vocabulary on
testTaxonomyVocabularyDeleteWithTermsapparently, but I generally like this approach too, so I've moved it out of setUp().4. Brilliant, removed.
5. Done.
6. I honestly don't know but I'd assume so, if they are not covered by generic entity testing, we should move it over there. Removing it here in any case for now.
7. Fixed.
8. Done.
9. Done.
10. Done.
Comment #15
claudiu.cristeaGreat. Thank you. I'm still seeing few issues.
The order was correct before. In PHPUnit first come the expectation and that is 0 (or 5).
It looks that
$vocabulary1->id()is the expectation here. So it should be the first parameter.What is the reason for this file inclusion? I guess the test doesn't need it.
This docblock needs some love. The words "connected to this" could go one line up and the rest of lines could be reorganized to honour the coding standards rule from https://www.drupal.org/docs/develop/standards/api-documentation-and-comm...
This can be chained as
$vocabulary->enforceIsNew()->save();Comment #16
manuel garcia commentedThanks again @claudiu.cristea for the review!
Re #15:
Some stats on the new kernel test:
Time: 57.26 seconds, Memory: 6.00MB(on an Intel® Core™ i5-7200U CPU @ 2.50GHz × 4) - I would imagine the savings to be significant on this one, since it was 4 functional tests before, though I haven’t run them locally to measure the difference.Comment #17
claudiu.cristeaThank you!
Comment #19
claudiu.cristeaUnrelated DB server failure.
Comment #21
yogeshmpawarAll looks good so setting back to RTBC! Tests failure is not related (see #3055648: Frequent random fail in \Drupal\Tests\media_library\FunctionalJavascript\MediaLibraryTest).
Comment #23
claudiu.cristeaComment #24
claudiu.cristeaThe patch doesn't apply anymore.
Comment #25
yogeshmpawarComment #26
yogeshmpawarRe-rolled #16 patch.
Comment #27
claudiu.cristeaThank you. Back to RTBC
Comment #28
catchCommitted 202ad58 and pushed to 8.8.x. Thanks!