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
b8d0bd68
Unverified
Commit
b8d0bd68
authored
Jun 16, 2020
by
Sergei Morozov
Committed by
GitHub
Jun 16, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4079 from morozov/phpunit-9.3-compat
Forward compatibility with PHPUnit 9.3
parents
36c8a78c
4375bd3b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
48 deletions
+27
-48
OCI8StatementTest.php
tests/Doctrine/Tests/DBAL/Driver/OCI8/OCI8StatementTest.php
+1
-1
SchemaTest.php
tests/Doctrine/Tests/DBAL/Schema/SchemaTest.php
+10
-27
DropSchemaSqlCollectorTest.php
.../Tests/DBAL/Schema/Visitor/DropSchemaSqlCollectorTest.php
+5
-9
RunSqlCommandTest.php
...s/Doctrine/Tests/DBAL/Tools/Console/RunSqlCommandTest.php
+11
-11
No files found.
tests/Doctrine/Tests/DBAL/Driver/OCI8/OCI8StatementTest.php
View file @
b8d0bd68
...
...
@@ -105,7 +105,7 @@ class OCI8StatementTest extends DbalTestCase
public
function
testConvertNonTerminatedLiteral
(
string
$sql
,
string
$message
)
:
void
{
$this
->
expectException
(
OCI8Exception
::
class
);
$this
->
expectExceptionMessage
RegExp
(
$message
);
$this
->
expectExceptionMessage
Matches
(
$message
);
OCI8Statement
::
convertPositionalToNamedPlaceholders
(
$sql
);
}
...
...
tests/Doctrine/Tests/DBAL/Schema/SchemaTest.php
View file @
b8d0bd68
...
...
@@ -378,27 +378,19 @@ class SchemaTest extends TestCase
->
method
(
'acceptSchema'
)
->
with
(
$schema
);
$visitor
->
expects
(
$this
->
at
(
1
))
$visitor
->
expects
(
self
::
exactly
(
2
))
->
method
(
'acceptTable'
)
->
with
(
$schema
->
getTable
(
'baz'
));
->
withConsecutive
(
[
$schema
->
getTable
(
'baz'
)],
[
$schema
->
getTable
(
'bla.bloo'
)]
);
$visitor
->
expects
(
$this
->
at
(
2
))
->
method
(
'acceptTable'
)
->
with
(
$schema
->
getTable
(
'bla.bloo'
));
$visitor
->
expects
(
$this
->
exactly
(
2
))
->
method
(
'acceptTable'
);
$visitor
->
expects
(
$this
->
at
(
3
))
$visitor
->
expects
(
self
::
exactly
(
2
))
->
method
(
'acceptSequence'
)
->
with
(
$schema
->
getSequence
(
'moo'
));
$visitor
->
expects
(
$this
->
at
(
4
))
->
method
(
'acceptSequence'
)
->
with
(
$schema
->
getSequence
(
'war'
));
$visitor
->
expects
(
$this
->
exactly
(
2
))
->
method
(
'acceptSequence'
);
->
withConsecutive
(
[
$schema
->
getSequence
(
'moo'
)],
[
$schema
->
getSequence
(
'war'
)]
);
self
::
assertNull
(
$schema
->
visit
(
$visitor
));
}
...
...
@@ -436,9 +428,6 @@ class SchemaTest extends TestCase
->
method
(
'acceptNamespace'
)
->
with
(
'bla'
);
$visitor
->
expects
(
$this
->
exactly
(
3
))
->
method
(
'acceptNamespace'
);
$visitor
->
expects
(
$this
->
at
(
4
))
->
method
(
'acceptTable'
)
->
with
(
$schema
->
getTable
(
'baz'
));
...
...
@@ -447,9 +436,6 @@ class SchemaTest extends TestCase
->
method
(
'acceptTable'
)
->
with
(
$schema
->
getTable
(
'bla.bloo'
));
$visitor
->
expects
(
$this
->
exactly
(
2
))
->
method
(
'acceptTable'
);
$visitor
->
expects
(
$this
->
at
(
6
))
->
method
(
'acceptSequence'
)
->
with
(
$schema
->
getSequence
(
'moo'
));
...
...
@@ -458,9 +444,6 @@ class SchemaTest extends TestCase
->
method
(
'acceptSequence'
)
->
with
(
$schema
->
getSequence
(
'war'
));
$visitor
->
expects
(
$this
->
exactly
(
2
))
->
method
(
'acceptSequence'
);
self
::
assertNull
(
$schema
->
visit
(
$visitor
));
}
}
tests/Doctrine/Tests/DBAL/Schema/Visitor/DropSchemaSqlCollectorTest.php
View file @
b8d0bd68
...
...
@@ -28,16 +28,12 @@ class DropSchemaSqlCollectorTest extends TestCase
$collector
=
new
DropSchemaSqlCollector
(
$platform
);
$platform
->
expects
(
$this
->
exactly
(
2
))
->
method
(
'getDropForeignKeySQL'
);
$platform
->
expects
(
$this
->
at
(
0
))
->
method
(
'getDropForeignKeySQL'
)
->
with
(
$keyConstraintOne
,
$tableOne
);
$platform
->
expects
(
$this
->
at
(
1
))
$platform
->
expects
(
self
::
exactly
(
2
))
->
method
(
'getDropForeignKeySQL'
)
->
with
(
$keyConstraintTwo
,
$tableTwo
);
->
withConsecutive
(
[
$keyConstraintOne
,
$tableOne
],
[
$keyConstraintTwo
,
$tableTwo
]
);
$collector
->
acceptForeignKey
(
$tableOne
,
$keyConstraintOne
);
$collector
->
acceptForeignKey
(
$tableTwo
,
$keyConstraintTwo
);
...
...
tests/Doctrine/Tests/DBAL/Tools/Console/RunSqlCommandTest.php
View file @
b8d0bd68
...
...
@@ -31,10 +31,6 @@ class RunSqlCommandTest extends TestCase
$this
->
commandTester
=
new
CommandTester
(
$this
->
command
);
$this
->
connectionMock
=
$this
->
createMock
(
Connection
::
class
);
$this
->
connectionMock
->
method
(
'fetchAllAssociative'
)
->
willReturn
([[
1
]]);
$this
->
connectionMock
->
method
(
'executeUpdate'
)
->
willReturn
(
42
);
$helperSet
=
ConsoleRunner
::
createHelperSet
(
$this
->
connectionMock
);
$this
->
command
->
setHelperSet
(
$helperSet
);
...
...
@@ -97,21 +93,25 @@ class RunSqlCommandTest extends TestCase
private
function
expectConnectionExecuteUpdate
()
:
void
{
$this
->
connectionMock
->
expects
(
$this
->
exactly
(
1
))
->
method
(
'executeUpdate'
);
->
expects
(
$this
->
once
())
->
method
(
'executeUpdate'
)
->
willReturn
(
42
);
$this
->
connectionMock
->
expects
(
$this
->
exactly
(
0
))
->
expects
(
$this
->
never
(
))
->
method
(
'fetchAllAssociative'
);
}
private
function
expectConnectionFetchAllAssociative
()
:
void
{
$this
->
connectionMock
->
expects
(
$this
->
exactly
(
0
))
->
method
(
'executeUpdate'
);
->
expects
(
$this
->
once
())
->
method
(
'fetchAllAssociative'
)
->
willReturn
([[
1
]]);
$this
->
connectionMock
->
expects
(
$this
->
exactly
(
1
))
->
method
(
'
fetchAllAssociativ
e'
);
->
expects
(
$this
->
never
(
))
->
method
(
'
executeUpdat
e'
);
}
public
function
testStatementsWithFetchResultPrintsResult
()
:
void
...
...
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