Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ExceptionTest::testConnectionExceptionSqLite() on macOS #4297

Merged
merged 1 commit into from
Sep 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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