While fixing a bug in [#8994195] I was momentarily confused by some duplicate assertion text.
Its a small thing but it made me investigate further as to exactly which test was failing.. I just want to remove this niggle from the next programmer who scans the code.
The duplicate text is Files removed from file history and the first of them which actually adds should read Files added to file history
public function testEnableLanguage() {
// Check if the language data is added to the database.
$result = db_query("SELECT project FROM {locale_file} WHERE langcode='nl'")->fetchField();
- $this->assertTrue((boolean) $result, 'Files removed from file history');
+ $this->assertTrue((boolean) $result, 'Files added to file history');
// Remove a language.
$this->drupalPostForm('admin/config/regional/language/delete/nl', array(), t('Delete'));
// Check if the language data is removed from the database.
$result = db_query("SELECT project FROM {locale_file} WHERE langcode='nl'")->fetchField();
- $this->assertFalse($result, 'Files removed from file history');
+ $this->assertFalse((boolean) $result, 'Files removed from file history');
// Check that the Dutch translation is gone.
NB Shamelessly, I have feature creeped this issue so that both lines symmetrically cast the result to a boolean.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | duplicate-2309051-3.patch | 744 bytes | martin107 |
| #3 | interdiff-0-3.txt | 1.13 KB | martin107 |
| duplicate-0.patch | 1.14 KB | martin107 |
Comments
Comment #1
martin107 commentedComment #2
dawehnerassertFalse alreay casts to boolean values.
Comment #3
martin107 commentedcasting removed.
Comment #4
jhedstromThis looks good. This change can be made during beta since it only cleans up testing code.
Comment #5
alexpottThis issue is a unfrozen change as per https://www.drupal.org/core/beta-changes and it's benefits outweigh any disruption. Committed 10a80c8 and pushed to 8.0.x. Thanks!