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
8cbb70c6
Commit
8cbb70c6
authored
Dec 12, 2010
by
Benjamin Eberlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DBAL-71 - Fix wrong exception call.
parent
bfff0619
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
DebugStack.php
lib/Doctrine/DBAL/Logging/DebugStack.php
+4
-2
AbstractPlatform.php
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
+1
-1
AbstractPlatformTestCase.php
...octrine/Tests/DBAL/Platforms/AbstractPlatformTestCase.php
+6
-0
No files found.
lib/Doctrine/DBAL/Logging/DebugStack.php
View file @
8cbb70c6
...
...
@@ -43,6 +43,8 @@ class DebugStack implements SQLLogger
public
$start
=
null
;
public
$currentQuery
=
0
;
/**
* {@inheritdoc}
*/
...
...
@@ -50,7 +52,7 @@ class DebugStack implements SQLLogger
{
if
(
$this
->
enabled
)
{
$this
->
start
=
microtime
(
true
);
$this
->
queries
[]
=
array
(
'sql'
=>
$sql
,
'params'
=>
$params
,
'types'
=>
$types
,
'executionMS'
=>
0
);
$this
->
queries
[
++
$this
->
currentQuery
]
=
array
(
'sql'
=>
$sql
,
'params'
=>
$params
,
'types'
=>
$types
,
'executionMS'
=>
0
);
}
}
...
...
@@ -59,7 +61,7 @@ class DebugStack implements SQLLogger
*/
public
function
stopQuery
()
{
$this
->
queries
[
(
count
(
$this
->
queries
)
-
1
)
][
'executionMS'
]
=
microtime
(
true
)
-
$this
->
start
;
$this
->
queries
[
$this
->
currentQuery
][
'executionMS'
]
=
microtime
(
true
)
-
$this
->
start
;
}
}
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
View file @
8cbb70c6
...
...
@@ -1418,7 +1418,7 @@ abstract class AbstractPlatform
return
$upper
;
break
;
default
:
throw
\InvalidArgumentException
(
'Invalid foreign key action: '
.
$upper
);
throw
new
\InvalidArgumentException
(
'Invalid foreign key action: '
.
$upper
);
}
}
...
...
tests/Doctrine/Tests/DBAL/Platforms/AbstractPlatformTestCase.php
View file @
8cbb70c6
...
...
@@ -16,6 +16,12 @@ abstract class AbstractPlatformTestCase extends \Doctrine\Tests\DbalTestCase
$this
->
_platform
=
$this
->
createPlatform
();
}
public
function
testGetInvalidtForeignKeyReferentialActionSQL
()
{
$this
->
setExpectedException
(
'InvalidArgumentException'
);
$this
->
_platform
->
getForeignKeyReferentialActionSQL
(
'unknown'
);
}
public
function
testGetUnknownDoctrineMappingType
()
{
$this
->
setExpectedException
(
'Doctrine\DBAL\DBALException'
);
...
...
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