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