Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
node system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Oct 2009 at 06:55 UTC
Updated:
3 Jan 2014 at 00:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sfyn commentedIs this path test-covered?
Yes - NodeTitleTestCase tests this at line 1251 of node.test
However it fails if the markup surrounding node title is changed in anyway form an anchor inside of an h2 tag. This means it could potentially fail on any number of themes overriding node.tpl.php.
Which brings us to garland - because themes overide system default node.tpl.php, it is absolutely possible for simpletest to not test the contents of the default system template.
I am looking at rewriting the test to be more responsive to changes in theme templates.
sfyn @D7csmtl
Comment #2
sfyn commented@D7csmtl
For starters, lets add a pass to check for clickable links via /node
Comment #3
sfyn commented@D7csmtl
Fun fact - this test passes at times when the previous pass (testing for a title in an <a&rt; within an <h2&rt;) fails.
Comment #4
sfyn commented@D7csmtl
These tests were originally introduced in http://drupal.org/node/557292#comment-2134726
Comment #5
sfyn commented@D7csmtl
Maybe the best way of getting around this problem and ensuring we test the default system .tpl.phps instead of garlands is to have simpletest use stark as its testing theme.
Therefore, new issue: Simpletest does not test system default templates (like node.tpl.php)
Comment #6
sfyn commentedgo testbot go
Comment #8
sfyn commentedreroll
Comment #9
sfyn commentedComment #10
pcarman commented@drupalcon
Test code has been reviewed and all test pass. Looks like the changes to the test fulfill the requirement.
By the way this is my first issue reviewed. Let me know if you have suggestions.
Comment #11
webchickAhhh first patch review. :) That means I get to be extra picky! :D Thanks for helping out!
Actually the patch looks pretty fine, and for the most part these are all minor comments, related to the coding standards.
Let's move those comments above the $settings = array( ... ) line, since coding standards dictate that we don't use comments to the side. Also, they should begin with a space between the // and the first letter (like the "Create "Basic page" content..." one does above) and should end in a period.
"node" should be in single quotes, since there's no variable in it.
I'm not sure if there is a security problem with this line. Probably not, but check other clickLink() calls in other tests and just make sure that we don't have to wrap that in check_plain() first.
Trailing whitespace is introduced.
112 critical left. Go review some!
Comment #12
webchickComment #13
gowriabhaya commentedCode sprint tag
Comment #14
pcarman commentedUpdated the patch based on webchick's comments. The patch has also been rerolled against HEAD.
Comment #15
fending commentedRTBC #14, which includes most of @webchick suggestions. I don't think check_plain() actually adds any value here as it's done elsewhere; I agree with patch author @pcarman on this one. Works great, less filling.
Comment #16
mtiftI tested this, too, and did not encounter any errors.
Comment #17
afreeman commented+1 tested, all tests pass and code style looks good.
Comment #18
dries commentedCommitted to CVS HEAD. Thanks for your contribution! :)