Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
phpunit
Priority:
Minor
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
25 Apr 2014 at 16:51 UTC
Updated:
16 Dec 2014 at 19:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
yesct commentedComment #2
yesct commentedComment #3
cs_shadow commentedReplaced {@inheritdoc} on the two classes with actual documentation.
Comment #4
cs_shadow commentedComment #5
yesct commentedmaybe we should look at the usages of TestOpenDialogCommand to help us know what it does and why. (and/or use git blame or git log -S to help us find the issue that put it there. that might also help with it's summary)
We might actually just be able to delete the {@inheritdoc} (and the newline), if the Wraps .... line is sufficient to tell us a one line summary of what this class is doing.
Although the classes it is extending does more than just provide the drupalAttachLibrary()
Since the class is Test...
I kind of expected the docs to mention Tests or testing.
Comment #6
andriyun commentedComment #7
tetranz commentedComment #8
neclimdulHere's a patch using phpunit's native stubs to null the method.
Comment #9
neclimdulComment #10
tetranz commentedComment #11
neclimdulnice, thanks tetranz. Based on that discussion, documentation on why we are faking those methods.
Comment #12
neclimdulbah, interdiff is correct, patch missing changes though.
Comment #13
yesct commentedthe test says it tests if they can be rendered... but the comment sounds like we are not testing that.
Maybe we should update the comment and open an issue to add render testing?
Comment #14
yesct commentedtagging phpunit
Comment #15
tvn commentedComment #16
jhodgdonThis is no longer a Docs issue.
Comment #17
neclimdulI've struggled with how to document this. The drupal_render() call being nulled here is not really about rendering but passing things into drupal_process_attached(). I'm not familiar enough with the code to say why it isn't relevant to this test or how to document it.
Comment #18
jhedstromMocking methods that call other code is pretty typical. I don't think our unit test here needs to also test rendering.
Replacing these placeholder objects with mocks removes a bunch of code we don't have to maintain. I've added a beta evaluation to the summary.
Comment #19
alexpottThe issue summary and the patch don't agree...
Comment #20
jhedstromIt looks like the summary was never updated after the change in direction in #7. I've updated the summary.
Comment #21
jhedstromComment #22
alexpottCommitted 1f43f1b and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation for to the issue summary.
Comment #23
tim.plunkettThis didn't make it to d.o
Comment #24
webchickLet's try that again...