Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
base system
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Feb 2011 at 19:00 UTC
Updated:
15 Mar 2011 at 01:51 UTC
In issue #733192, it has been suggested that test code of the form:
$this->assertFalse(strcmp($target, $result), 'Assertion comment');
should be replaced by
$this->assertEqual($target, $result, 'Assertion comment');
The attached patch is the result of programmatically making such changes.
| Comment | File | Size | Author |
|---|---|---|---|
| change-assertFalse-to-assertEqual.patch | 13.43 KB | pillarsdotnet |
Comments
Comment #1
pillarsdotnet commentedI used the following commands to generate the patch:
Comment #2
pillarsdotnet commentedClicking on View details reveals that all tests passed.
Comment #3
tstoecklerIndeed.
The patch shows that there are still a lot of assertions using t(), but that's for another issue...
RTBC.
Comment #4
sunThis is a bug fix even. Because: http://de.php.net/manual/en/function.strcmp.php
Meaning:assertFalse(strcmp('foo', 'foo2')) == TRUENot true. But well, weird comparison technique anyway.
Comment #5
dries commentedCommitted to Git.