Closed (fixed)
Project:
Drupal core
Version:
8.6.x-dev
Component:
simpletest.module
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Oct 2009 at 15:32 UTC
Updated:
9 Feb 2019 at 16:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
amitaibuOn the other hand I can use drupalPost(), but thougt it might be a nice addition. Not sure, anyway, I'll set it to minor.
Comment #2
jhodgdonThis seems like a reasonable addition to the testing framework, but you need slightly better documentation -- the variable that is being saved is key_typename, and this is not documented in your proposed documentation header for the $vars parameter.
Comment #3
amitaibuThanks jhodgdon, I've added:
"The variables are saved in the form of [variable]_[content type name]."
Comment #4
jhodgdonHow about instead of using "bar" for the variable value, you use "value"? I think it is clearer. Also, we normally just continue the doc on the same line, rather than having a return in the middle of something like this:
Comment #5
jhodgdonOne other thing. I think you will need to add a test to your patch for this behavior -- test whether this new addition works within the testing framework.
Comment #6
amitaibuPatch includes simpleTest.
Comment #8
jhodgdonOne minor thing in a doc header; other than that, I like the patch in #6:
How about making 'var' agree with [variable] here? So change this to:
Comment #9
jhodgdonWhoops, the test bot came through while I was posting that... looks like maybe the test bot is having trouble, so I have requested a retest.
Comment #10
amitaibuOk, I've also changed also the function signature to be "variables".
Comment #12
jhodgdonOK, I like your patch now. Apparently the Drupal 7 testing engine is not so happy with it, either that or the Drupal 7 testing engine is having trouble itself...
Comment #13
amitaibuBetter function names for the testing. Lets see if testbot likes this one better.
Comment #14
amitaibu@jhodgdon,
Testbot seems to be ok with latest patch :)
Comment #15
jhodgdonOK, I am happy with the patch -- I think it is clearly written and the documentation headers are good.
I will leave it to someone else to figure out whether this feature should be added to the SimpleTest module.
Comment #16
MichaelCole commented#13: 607828-content-type-save-vars-13.patch queued for re-testing.
Comment #17
thedavidmeister commentedPatch did not apply.
Add a space between @param and @return.
This test looks like it could be better named and documented than simple "SimpleTestAssertUnitTest". Have a look at other tests in that file for examples.
I'm trialling something a bit different at #2094585: [policy, no patch] Core review bonus, I'd like to use this review for a bonus at #1987396: Refactor & Clean-up comment.module theme functions.
Comment #18
thedavidmeister commentedoh, additionally, new features should be filed against latest version of core and back-ported after commit.
Comment #25
dawehnerThis got fixed in the meantime, mostly by moving to config entity types..