Skip to content

Commit 785a351

Browse files
Replace deprecated method
1 parent be73a75 commit 785a351

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

tests/phpbu/Backup/Source/InfluxdumpTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22
namespace phpbu\App\Backup\Source;
33

4+
use Exception;
45
use phpbu\App\Backup\CliMockery;
56
use phpbu\App\BaseMockery;
67
use PHPUnit\Framework\TestCase;
@@ -113,8 +114,8 @@ public function testBackupFail()
113114

114115
try {
115116
$influxd->backup($target, $appResult);
116-
} catch (\Exception $e) {
117-
$this->assertFileNotExists($file);
117+
} catch (Exception $e) {
118+
$this->assertFileDoesNotExist($file);
118119
throw $e;
119120
}
120121
}

tests/phpbu/Backup/Source/LdapdumpTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22
namespace phpbu\App\Backup\Source;
33

4+
use Exception;
45
use phpbu\App\Backup\CliMockery;
56
use phpbu\App\BaseMockery;
67
use PHPUnit\Framework\TestCase;
@@ -198,8 +199,8 @@ public function testBackupFail()
198199

199200
try {
200201
$ldap->backup($target, $appResult);
201-
} catch (\Exception $e) {
202-
$this->assertFileNotExists($file);
202+
} catch (Exception $e) {
203+
$this->assertFileDoesNotExist($file);
203204
throw $e;
204205
}
205206
}

tests/phpbu/Backup/Source/MysqldumpTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ public function testBackupFail()
338338
try {
339339
$mysqldump->backup($target, $appResult);
340340
} catch (Exception $e) {
341-
$this->assertFileNotExists($file);
341+
$this->assertFileDoesNotExist($file);
342342
throw $e;
343343
}
344344
}

tests/phpbu/Util/CliTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,10 @@ public function testRemoveDir()
181181

182182
Cli::removeDir($dirToDelete);
183183

184-
$this->assertFileNotExists($file);
185-
$this->assertFileNotExists($fileInSub);
186-
$this->assertFileNotExists($subDir);
187-
$this->assertFileNotExists($dirToDelete);
184+
$this->assertFileDoesNotExist($file);
185+
$this->assertFileDoesNotExist($fileInSub);
186+
$this->assertFileDoesNotExist($subDir);
187+
$this->assertFileDoesNotExist($dirToDelete);
188188
}
189189

190190
/**

0 commit comments

Comments
 (0)