testDrupalPreRenderLinks() uses DOMDocument().
Anything using assertThemeOutput uses assertIdentical() on check_plain(var_export($output, TRUE))

And now #1038932-43: theme_image_formatter() assumes that title, alt, and options are always set is creating a menu callback and using xpath.

Ideally you would know the EXACT expected output, but in D7 any theme function that generates a link will need a workaround for clean URLs.

Files: 
CommentFileSizeAuthor
#13 drupal-1706878-13.patch2.04 KBtim.plunkett
PASSED: [[SimpleTest]]: [MySQL] 39,555 pass(es).
[ View ]
#8 drupal-1706878-8.patch1.03 KBlazysoundsystem
PASSED: [[SimpleTest]]: [MySQL] 41,988 pass(es).
[ View ]
#6 drupal-1706878-6.patch1.02 KBlazysoundsystem
PASSED: [[SimpleTest]]: [MySQL] 40,629 pass(es).
[ View ]
#2 drupal-1706878-2.patch3.1 KBtim.plunkett
PASSED: [[SimpleTest]]: [MySQL] 39,749 pass(es).
[ View ]
#1 drupal-1706878-1.patch3.09 KBtim.plunkett
PASSED: [[SimpleTest]]: [MySQL] 39,742 pass(es).
[ View ]

Comments

Title:Standardize on a method of testing theme function outputAllow all modules to use the method for testing theme function output
Priority:Major» Normal
Status:Active» Needs review
StatusFileSize
new3.09 KB
PASSED: [[SimpleTest]]: [MySQL] 39,742 pass(es).
[ View ]

This would certainly be a start.

StatusFileSize
new3.1 KB
PASSED: [[SimpleTest]]: [MySQL] 39,749 pass(es).
[ View ]

Change the t() to format_string() to match our code standards.

Title:Allow all modules to use the method for testing theme function outputAdd WebTestBase::assertThemeOutput() to allow modules to test theme function output
Status:Needs review» Reviewed & tested by the community

Thanks! Clarifying title.

Issue tags:+needs backport to D7

Might as well backport this.

Version:8.x-dev» 7.x-dev
Status:Reviewed & tested by the community» Patch (to be ported)

Looks good to me. Committed/pushed to 8.x.

Some other tests may have copied assertThemeOutput() already but I think it's probably safe to backport, up to David and Angie anyway.

Version:7.x-dev» 8.x-dev
Status:Patch (to be ported)» Needs review
StatusFileSize
new1.02 KB
PASSED: [[SimpleTest]]: [MySQL] 40,629 pass(es).
[ View ]

While updating #983528: support $group and $message parameters in all assert() functions for D8, I noticed that this test doesn't return anything.

I've added that in a patch against the already committed version.

Status:Needs review» Needs work

+++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.phpundefined
@@ -2320,6 +2320,8 @@ abstract class WebTestBase extends TestBase {
    *   (optional) An assertion message.
+   * @return
+   *   TRUE on pass, FALSE on fail.

There should be a blank line before @return

Status:Needs work» Needs review
StatusFileSize
new1.03 KB
PASSED: [[SimpleTest]]: [MySQL] 41,988 pass(es).
[ View ]

Thanks @andypost, good point. I'll get the hang of this one day...

Status:Needs review» Reviewed & tested by the community

Good to go

Status:Reviewed & tested by the community» Needs work

In the future, please add type hinting to all @param and @return directives for any docblock you update. Thanks.

Status:Needs work» Reviewed & tested by the community

Whoops... did not mean to change status.

Version:8.x-dev» 7.x-dev
Category:task» feature
Status:Reviewed & tested by the community» Patch (to be ported)

Doesn't look like anything else in that file has type hinting, so probably best to handle that in a separate patch as part of the larger clean-up effort. It would be weird to introduce that here and nowhere else in the file/function.

Committed and pushed follow-up to 8.x. Back to 7.x. Should be harmless to backport. Re-classifying as a feature request though.

Status:Patch (to be ported)» Needs review
StatusFileSize
new2.04 KB
PASSED: [[SimpleTest]]: [MySQL] 39,555 pass(es).
[ View ]

Status:Needs review» Reviewed & tested by the community

Straight backport.

Status:Reviewed & tested by the community» Fixed

Not sure if it's a feature request or a task, but either way it looks good :)

Committed to 7.x - thanks! http://drupalcode.org/project/drupal.git/commit/eb1be63

No idea why the "7.18 release notes" tag fails to show up on the issue half the time I add it in a comment... trying again.

Drupal 7.18 was a security release only, so this issue is now scheduled for Drupal 7.19 instead.

Fixing tags accordingly.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Drupal 7.19 was a security release only, so this issue is now scheduled for Drupal 7.20 instead.

Fixing tags accordingly.

Drupal 7.20 was a security release only, so this issue is now scheduled for Drupal 7.21 instead. For real this time... I think :)

Fixing tags accordingly.

Trying to fix the tags again...

Issue tags:+7.22 release notes

Fixing tags since Drupal 7.21 only contained a fix to deal with fallout from the Drupal 7.20 security release. Hopefully this is really the last time I do this and this will be released in Drupal 7.22 for real :)