Noticed on slave #4 (using PHP 5.2.0) we had a failure in each the node preview and node edit tests. I couldn't duplicate the failures on my install with PHP 5.2.4. The line of failure was:
$this->assertFieldByName('body', '<!--break-->' . $edit['body'], t('Body field displayed.'));
and
$this->assertFieldByName('body', '<!--break-->' . $edit['body'], t('Body field displayed.'));
Did lots of debugging ito assertFieldByXPath (used by assertFieldByName), and discovered this logic for textareas:
elseif (isset($field[0]) && $field[0] == $value) {
// Text area with correct text.
$found = TRUE;
}
My inclination is that on the older version of PHP using $field[0] is returning the first character of the textarea, so trying to compare it to $value fails. Patch changes the logic to:
elseif ((string) $field == $value) {
// Text area with correct text.
$found = TRUE;
}
Boombatower confirmed that this fixes the failures on slave #4. Tests still pass for me on my local. This is critical as it is the only blocker from getting testing bot running again.
| Comment | File | Size | Author |
|---|---|---|---|
| HEAD-BROKEN-assertFieldByXPath.patch | 706 bytes | dave reid |
Comments
Comment #1
boombatower commentedAfter confirming our fix on #4 by running all tests and on Dave's machine all seems well.
Comment #2
dave reidI also confirmed this code fails when it should. I changed the line in node.test to:
$this->assertFieldByName('body', '<!-I_FAIL-break-->' . $edit['body'], t('Body field displayed.'));The assertion failed as expected with the patch.
Comment #3
dave reidComment #4
dries commentedCommitted to CVS HEAD. Thanks! :)