The parent class has a built-in list that tracks these files and
deletes them in a teardown.
I was unable to reproduce a case where $path + '.' is created by
MediaWiki. As far as I can tell, no current code exists in core
that would do this. If it does exist, we can keep the tearDown()
override with just that second case, but I'm removing it for now,
given it doesn't appear to be used.
Change-Id: I5847b7b266f1393d983aeb4b115bc0ae000e3547
protected function setUp() {
parent::setUp();
- $this->tmpFile = wfTempDir() . '/' . uniqid();
+ $this->tmpFile = $this->getNewTempFile();
file_put_contents( $this->tmpFile, "\x00" );
self::$users = [
];
}
- protected function tearDown() {
- if ( file_exists( $this->tmpFile . "." ) ) {
- unlink( $this->tmpFile . "." );
- }
-
- if ( file_exists( $this->tmpFile ) ) {
- unlink( $this->tmpFile );
- }
-
- parent::tearDown();
- }
-
/**
* @todo give this test a real name explaining what is being tested here
*/