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
16d449c1
Unverified
Commit
16d449c1
authored
Jan 25, 2020
by
Sergei Morozov
Committed by
GitHub
Jan 25, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3848 from BenMorel/expectException
expectException() is not static
parents
7f4ef4ac
8bded0b9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
18 deletions
+18
-18
ArrayStatementTest.php
tests/Doctrine/Tests/DBAL/Cache/ArrayStatementTest.php
+4
-4
PDOStatementTest.php
tests/Doctrine/Tests/DBAL/Functional/PDOStatementTest.php
+2
-2
MySqlSchemaManagerTest.php
...e/Tests/DBAL/Functional/Schema/MySqlSchemaManagerTest.php
+2
-2
StatementTest.php
tests/Doctrine/Tests/DBAL/Functional/StatementTest.php
+2
-2
ColumnTest.php
tests/Doctrine/Tests/DBAL/Schema/ColumnTest.php
+4
-4
RunSqlCommandTest.php
...s/Doctrine/Tests/DBAL/Tools/Console/RunSqlCommandTest.php
+4
-4
No files found.
tests/Doctrine/Tests/DBAL/Cache/ArrayStatementTest.php
View file @
16d449c1
...
...
@@ -63,8 +63,8 @@ class ArrayStatementTest extends TestCase
{
$statement
=
$this
->
createTestArrayStatement
();
self
::
expectException
(
InvalidArgumentException
::
class
);
self
::
expectExceptionMessage
(
'Caching layer does not support 2nd/3rd argument to setFetchMode().'
);
$this
->
expectException
(
InvalidArgumentException
::
class
);
$this
->
expectExceptionMessage
(
'Caching layer does not support 2nd/3rd argument to setFetchMode().'
);
$statement
->
setFetchMode
(
FetchMode
::
ASSOCIATIVE
,
'arg1'
,
'arg2'
);
}
...
...
@@ -114,8 +114,8 @@ class ArrayStatementTest extends TestCase
{
$statement
=
$this
->
createTestArrayStatement
();
self
::
expectException
(
InvalidArgumentException
::
class
);
self
::
expectExceptionMessage
(
'Invalid fetch mode given for fetching result, 9999 given.'
);
$this
->
expectException
(
InvalidArgumentException
::
class
);
$this
->
expectExceptionMessage
(
'Invalid fetch mode given for fetching result, 9999 given.'
);
$statement
->
fetch
(
9999
);
}
...
...
tests/Doctrine/Tests/DBAL/Functional/PDOStatementTest.php
View file @
16d449c1
...
...
@@ -40,8 +40,8 @@ class PDOStatementTest extends DbalFunctionalTestCase
'name'
=>
'Bob'
,
]);
self
::
expectException
(
UnknownFetchMode
::
class
);
self
::
expectExceptionMessage
(
'Unknown fetch mode 12.'
);
$this
->
expectException
(
UnknownFetchMode
::
class
);
$this
->
expectExceptionMessage
(
'Unknown fetch mode 12.'
);
$data
=
$this
->
connection
->
query
(
'SELECT id, name FROM stmt_test ORDER BY id'
)
->
fetchAll
(
PDO
::
FETCH_KEY_PAIR
);
...
...
tests/Doctrine/Tests/DBAL/Functional/Schema/MySqlSchemaManagerTest.php
View file @
16d449c1
...
...
@@ -582,8 +582,8 @@ SQL;
$connection
=
DriverManager
::
getConnection
(
$params
);
$schemaManager
=
$connection
->
getSchemaManager
();
self
::
expectException
(
DatabaseRequired
::
class
);
self
::
expectExceptionMessage
(
'A database is required for the method: Doctrine\DBAL\Schema\AbstractSchemaManager::listTableColumns'
);
$this
->
expectException
(
DatabaseRequired
::
class
);
$this
->
expectExceptionMessage
(
'A database is required for the method: Doctrine\DBAL\Schema\AbstractSchemaManager::listTableColumns'
);
$schemaManager
->
listTableColumns
(
'users'
);
}
...
...
tests/Doctrine/Tests/DBAL/Functional/StatementTest.php
View file @
16d449c1
...
...
@@ -374,7 +374,7 @@ EOF
// but the wrapper connection wraps everything in a DBAL exception
$this
->
iniSet
(
'error_reporting'
,
'0'
);
self
::
expectException
(
DBALException
::
class
);
$this
->
expectException
(
DBALException
::
class
);
$stmt
->
execute
([
null
]);
}
...
...
@@ -393,7 +393,7 @@ EOF
$query
=
$platform
->
getDummySelectSQL
();
$stmt
=
$this
->
connection
->
query
(
$query
);
self
::
expectException
(
DBALException
::
class
);
$this
->
expectException
(
DBALException
::
class
);
$stmt
->
fetchColumn
(
$index
);
}
...
...
tests/Doctrine/Tests/DBAL/Schema/ColumnTest.php
View file @
16d449c1
...
...
@@ -65,16 +65,16 @@ class ColumnTest extends TestCase
public
function
testSettingUnknownOptionIsStillSupported
()
:
void
{
self
::
expectException
(
UnknownColumnOption
::
class
);
self
::
expectExceptionMessage
(
'The "unknown_option" column option is not supported.'
);
$this
->
expectException
(
UnknownColumnOption
::
class
);
$this
->
expectExceptionMessage
(
'The "unknown_option" column option is not supported.'
);
new
Column
(
'foo'
,
$this
->
createMock
(
Type
::
class
),
[
'unknown_option'
=>
'bar'
]);
}
public
function
testOptionsShouldNotBeIgnored
()
:
void
{
self
::
expectException
(
UnknownColumnOption
::
class
);
self
::
expectExceptionMessage
(
'The "unknown_option" column option is not supported.'
);
$this
->
expectException
(
UnknownColumnOption
::
class
);
$this
->
expectExceptionMessage
(
'The "unknown_option" column option is not supported.'
);
$col1
=
new
Column
(
'bar'
,
Type
::
getType
(
Types
::
INTEGER
),
[
'unknown_option'
=>
'bar'
,
'notnull'
=>
true
]);
self
::
assertTrue
(
$col1
->
getNotnull
());
...
...
tests/Doctrine/Tests/DBAL/Tools/Console/RunSqlCommandTest.php
View file @
16d449c1
...
...
@@ -44,8 +44,8 @@ class RunSqlCommandTest extends TestCase
public
function
testMissingSqlArgument
()
:
void
{
self
::
expectException
(
RuntimeException
::
class
);
self
::
expectExceptionMessage
(
'Argument "sql" is required in order to execute this command correctly.'
);
$this
->
expectException
(
RuntimeException
::
class
);
$this
->
expectExceptionMessage
(
'Argument "sql" is required in order to execute this command correctly.'
);
$this
->
commandTester
->
execute
([
'command'
=>
$this
->
command
->
getName
(),
...
...
@@ -55,8 +55,8 @@ class RunSqlCommandTest extends TestCase
public
function
testIncorrectDepthOption
()
:
void
{
self
::
expectException
(
LogicException
::
class
);
self
::
expectExceptionMessage
(
'Option "depth" must contains an integer value.'
);
$this
->
expectException
(
LogicException
::
class
);
$this
->
expectExceptionMessage
(
'Option "depth" must contains an integer value.'
);
$this
->
commandTester
->
execute
([
'command'
=>
$this
->
command
->
getName
(),
...
...
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