Problem/Motivation
Follow up #2922121: When fetching related resources, getResourceType() in CurrentContext gets the wrong resource type. to remove
$this->markTestIncomplete('This fails and should be fixed by https://www.drupal.org/project/drupal/issues/2922121');
from \Drupal\Tests\jsonapi\Kernel\Normalizer\JsonApiDocumentTopLevelNormalizerTest::testNormalizeRelated.
In comment #8 we concluded this code is extra, and not needed so the test can be removed.
Steps to reproduce
Proposed resolution
Remaining tasks
Patch
Fix test
Review
Commit
User interface changes
API changes
Data model changes
Release notes snippet
Problem/Motivation
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|
Issue fork drupal-3213752
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
quietone CreditAttribution: quietone as a volunteer commentedComment #4
bbralaGuessing this needs some actual work since the parent issue is closed but we cannot just enable this, that seems to fail since the current test doesn't really add include data from the author i think.
Comment #8
bradjones1So I ran into this skipped test while working on another issue and figured, what the heck, I'll see what's up.
For the life of me, I can't even really tell what this is intended to test that isn't already covered by
::testNormalizeUuid()
(not a great name, for what it does...) and::testNormalizeConfig()
.This is very old code so I think this might boil down to, other tests take care of the intent here, and this can be removed?
I've made an MR to clean up this class overall and remove this test.
Comment #9
bradjones1Comment #10
bbralaThe assertions are not really the same although it seems its only the check on
getCacheMaxAge
. But I agree the test does look like it is no longer needed.Did notice a problem while looking at the code, made a new issue to remove some extra arguments that are not used. #3280302: JsonApiDocumentTopLevelNormalizerTest::generateProphecies called with extra arguments
Comment #11
catchphpcs seems to be failing on the MR
Comment #12
bbralaHuh. Did I miss that....?
Comment #13
bradjones1Funny, the errors have nothing to do with these changes but I guess this file hasn't been CS checked since perhaps rules tightened. Whatever, here it is.
Comment #14
bbralaThanks, looking good.
Comment #16
alexpottLet's remove generateProphecies() altogether - it's not doing anything useful.
Comment #17
_pratik_ CreditAttribution: _pratik_ as a volunteer and at Specbee for Drupal India Association commentedComment #18
_pratik_ CreditAttribution: _pratik_ as a volunteer and at Specbee for Drupal India Association commentedPlease check if this works.
Comment #19
_pratik_ CreditAttribution: _pratik_ as a volunteer and at Specbee for Drupal India Association commentedComment #21
Wim LeersPatch did not apply. Let's continue in the merge request?
Comment #23
ravi.shankar CreditAttribution: ravi.shankar at OpenSense Labs commentedRebased the current MR as that was not mergeable, still needs work for reported threads on MR.
Comment #24
bbralaHi, thanks for helping. But this patch needs to be moved to 10.1.x, you currently have rebased on the 9.4.x branch and i dont think it will be merged there.
Comment #26
SpokjeHiding patches, since we're in the MR workflow now.
Comment #28
SpokjeMR !3033 is against
10.1.x
.Comment #29
bbralaI just read the issue summary, got confused, read the comments again (#8) and it made sense again.
Thanks for adressing the feedback spokje. This is RTBC for me.
Note: updated IS so that doesnt happen again xD
Comment #30
alexpottCommitted and pushed 4096338786 to 10.1.x and ebba427c49 to 10.0.x and 4c116a3f35 to 9.5.x. Thanks!
Backported to 9.5.x to keep test coverage aligned.
Comment #35
Wim LeersNice clean-up 😊 Thank you!