Skip to content

Commit fdaeea8

Browse files
authored
Merge pull request #26 from WyriHaximus-labs/two-exceptions-one-meaning
Two different exception messages are possible for the same error
2 parents 01128b7 + 2502ff8 commit fdaeea8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/Adapters/FileTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ public function testDoesntExist(LoopInterface $loop, FilesystemInterface $filesy
9090
$rejectionReason = $e->getMessage();
9191
}
9292

93-
$this->assertEquals("Path doesn't exist", $rejectionReason);
93+
$this->assertTrue(
94+
$rejectionReason === 'Path doesn\'t exist' ||
95+
$rejectionReason === 'No such file or directory'
96+
);
9497
}
9598

9699
/**

0 commit comments

Comments
 (0)