Skip to content

Commit

Permalink
Merge pull request #4297 from morozov/exception-test-macos
Browse files Browse the repository at this point in the history
Fix ExceptionTest::testConnectionExceptionSqLite() on macOS
  • Loading branch information
morozov authored Sep 26, 2020
2 parents 787c141 + e06d0bb commit f099856
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/Doctrine/Tests/DBAL/Functional/ExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
use function version_compare;

use const PHP_OS;
use const PHP_OS_FAMILY;

class ExceptionTest extends DbalFunctionalTestCase
{
Expand Down Expand Up @@ -303,7 +304,7 @@ public function testConnectionExceptionSqLite(): void
}

// mode 0 is considered read-only on Windows
$mode = PHP_OS === 'Linux' ? 0444 : 0000;
$mode = PHP_OS_FAMILY === 'Windows' ? 0000 : 0444;

$filename = sprintf('%s/%s', sys_get_temp_dir(), 'doctrine_failed_connection_' . $mode . '.db');

Expand Down

0 comments on commit f099856

Please sign in to comment.