Problem/Motivation
As title
Proposed resolution
For example:
- $this->assertFalse(file_exists($file_path), 'Stale file is deleted.');
+ $this->assertFileNotExists($file_path, 'Stale file is deleted.');
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | interdiff_19-21.txt | 1.03 KB | spokje |
| #21 | 3131088-21.patch | 60.56 KB | spokje |
| #9 | 3131088-9.patch | 59.36 KB | spokje |
Comments
Comment #2
longwavefile_exists() also returns TRUE for directories, so the tests can be more accurate here about what they are looking for.
Comment #3
longwaveComment #4
msutharsComment #5
msuthars@longwave Patch looks fine for me. I reviewed and tested it and it working as expected.
Comment #6
catchNeeds a reroll.
Comment #7
spokjeReroll of #3 against latest
9.1.xComment #8
spokjeCrap, missed a few, new reroll coming shortly.
Comment #9
spokjeRe-reroll of #3 against latest
9.1.xComment #10
spokjeBack to RTBC after TestBot Greenness.
Comment #11
catchCommitted/pushed to 9.1.x and 9.0.x, thanks!
Needs a reroll for 8.9.x
Comment #14
spokjeReroll of #9 against latest
8.9.xComment #15
spokjeTesBot Greenness on D8.9.x as well.
Note:
There are 2 instances of
$this->assertTrue(file_exists($filename), $message);left.In
Drupal\simpletest\Tests\WebTestBaseInstallTestandDrupal\simpletest\Tests\SimpleTestTest, both are based onDrupal\simpletest\WebTestBasewhich apparently doesn't supportassertFileExists/assertFileNotExistsComment #16
spokjeRemoved Reroll tag
Comment #17
longwaveI don't think this exists in SimpleTest - the patch is still green because this won't be called any more by any core tests, but contrib might still use it.
Comment #18
spokje@longwave Good catch! Got a bit too enthusiastic there...
I've removed it from this patch.
Comment #19
spokjeGrmbl, #3125391 got in and made my patch invalid.
Reroll against latest
8.9.xComment #20
longwaveThis isn't quite right, this needs to become
assertDirectoryExists()Same here.
Comment #21
spokjeRight...
Seems like yesterday wasn't my best rerolling day ever.
@longwave You're absolutely right with your comments in #20
I've went through patch #19 but (of course) those two seem to be the only ones I've messed up.
Not sure why they weren't detected in the patch in #14 which included this "wrongness" and still turned out green.
Anyway: New patch addressing comments in #20 attached.
Comment #22
longwaveNo worries, thanks for working on this - all looks good now.
Comment #24
catchCommitted/pushed to 8.9.x, thanks!
Comment #25
longwaveThe 8.9.x patch here has some bad code, opened #3133103: [8.9 only] InstallerCustomConfigDirectoryCreateTest has bad assertions to address this.