Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
367f86e8
Unverified
Commit
367f86e8
authored
Aug 23, 2019
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Marked connection exception test incomplete on MySQL 8
parent
e738a715
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
4 deletions
+22
-4
ExceptionTest.php
tests/Doctrine/Tests/DBAL/Functional/ExceptionTest.php
+22
-4
No files found.
tests/Doctrine/Tests/DBAL/Functional/ExceptionTest.php
View file @
367f86e8
...
@@ -3,13 +3,19 @@
...
@@ -3,13 +3,19 @@
namespace
Doctrine\Tests\DBAL\Functional
;
namespace
Doctrine\Tests\DBAL\Functional
;
use
Doctrine\DBAL\Driver\ExceptionConverterDriver
;
use
Doctrine\DBAL\Driver\ExceptionConverterDriver
;
use
Doctrine\DBAL\Driver\ServerInfoAwareConnection
;
use
Doctrine\DBAL\DriverManager
;
use
Doctrine\DBAL\DriverManager
;
use
Doctrine\DBAL\Exception
;
use
Doctrine\DBAL\Exception
;
use
Doctrine\DBAL\Platforms\DrizzlePlatform
;
use
Doctrine\DBAL\Platforms\MySqlPlatform
;
use
Doctrine\DBAL\Platforms\PostgreSqlPlatform
;
use
Doctrine\DBAL\Platforms\SqlitePlatform
;
use
Doctrine\DBAL\Schema\Schema
;
use
Doctrine\DBAL\Schema\Schema
;
use
Doctrine\DBAL\Schema\Table
;
use
Doctrine\DBAL\Schema\Table
;
use
Doctrine\Tests\DbalFunctionalTestCase
;
use
Doctrine\Tests\DbalFunctionalTestCase
;
use
Throwable
;
use
Throwable
;
use
function
array_merge
;
use
function
array_merge
;
use
function
assert
;
use
function
chmod
;
use
function
chmod
;
use
function
defined
;
use
function
defined
;
use
function
file_exists
;
use
function
file_exists
;
...
@@ -17,6 +23,7 @@ use function sprintf;
...
@@ -17,6 +23,7 @@ use function sprintf;
use
function
sys_get_temp_dir
;
use
function
sys_get_temp_dir
;
use
function
touch
;
use
function
touch
;
use
function
unlink
;
use
function
unlink
;
use
function
version_compare
;
class
ExceptionTest
extends
DbalFunctionalTestCase
class
ExceptionTest
extends
DbalFunctionalTestCase
{
{
...
@@ -289,7 +296,7 @@ class ExceptionTest extends DbalFunctionalTestCase
...
@@ -289,7 +296,7 @@ class ExceptionTest extends DbalFunctionalTestCase
*/
*/
public
function
testConnectionExceptionSqLite
(
$mode
,
$exceptionClass
)
public
function
testConnectionExceptionSqLite
(
$mode
,
$exceptionClass
)
{
{
if
(
$this
->
connection
->
getDatabasePlatform
()
->
getName
()
!==
'sqlite'
)
{
if
(
$this
->
connection
->
getDatabasePlatform
()
instanceof
SqlitePlatform
)
{
$this
->
markTestSkipped
(
'Only fails this way on sqlite'
);
$this
->
markTestSkipped
(
'Only fails this way on sqlite'
);
}
}
...
@@ -333,18 +340,29 @@ class ExceptionTest extends DbalFunctionalTestCase
...
@@ -333,18 +340,29 @@ class ExceptionTest extends DbalFunctionalTestCase
*/
*/
public
function
testConnectionException
(
$params
)
public
function
testConnectionException
(
$params
)
{
{
if
(
$this
->
connection
->
getDatabasePlatform
()
->
getName
()
===
'sqlite'
)
{
$platform
=
$this
->
connection
->
getDatabasePlatform
();
if
(
$platform
instanceof
SqlitePlatform
)
{
$this
->
markTestSkipped
(
'Only skipped if platform is not sqlite'
);
$this
->
markTestSkipped
(
'Only skipped if platform is not sqlite'
);
}
}
if
(
$
this
->
connection
->
getDatabasePlatform
()
->
getName
()
===
'drizzle'
)
{
if
(
$
platform
instanceof
DrizzlePlatform
)
{
$this
->
markTestSkipped
(
'Drizzle does not always support authentication'
);
$this
->
markTestSkipped
(
'Drizzle does not always support authentication'
);
}
}
if
(
$
this
->
connection
->
getDatabasePlatform
()
->
getName
()
===
'postgresql'
&&
isset
(
$params
[
'password'
]))
{
if
(
$
platform
instanceof
PostgreSqlPlatform
&&
isset
(
$params
[
'password'
]))
{
$this
->
markTestSkipped
(
'Does not work on Travis'
);
$this
->
markTestSkipped
(
'Does not work on Travis'
);
}
}
if
(
$platform
instanceof
MySqlPlatform
&&
isset
(
$params
[
'user'
]))
{
$wrappedConnection
=
$this
->
connection
->
getWrappedConnection
();
assert
(
$wrappedConnection
instanceof
ServerInfoAwareConnection
);
if
(
version_compare
(
$wrappedConnection
->
getServerVersion
(),
'8'
,
'>='
))
{
$this
->
markTestIncomplete
(
'PHP currently does not completely support MySQL 8'
);
}
}
$defaultParams
=
$this
->
connection
->
getParams
();
$defaultParams
=
$this
->
connection
->
getParams
();
$params
=
array_merge
(
$defaultParams
,
$params
);
$params
=
array_merge
(
$defaultParams
,
$params
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment