Skip to content

Commit

Permalink
Checking correct method exists
Browse files Browse the repository at this point in the history
updating assertDirectoryDoesNotExist to test for the correct method when
using old version of phpunit
  • Loading branch information
JimTools authored and scheb committed Feb 25, 2024
1 parent ad8327a commit 0e11a58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function expectExceptionMessageMatches(string $regularExpression): void
*/
public static function assertDirectoryDoesNotExist(string $directory, string $message = ''): void
{
if (method_exists(PHPUnitTestCase::class, 'expectExceptionMessageMatches')) {
if (method_exists(PHPUnitTestCase::class, 'assertDirectoryDoesNotExist')) {
parent::assertDirectoryDoesNotExist($directory, $message);
} else {
static::assertFalse(is_dir($directory), $message);
Expand Down

0 comments on commit 0e11a58

Please sign in to comment.