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
ac28bbca
Commit
ac28bbca
authored
Apr 04, 2014
by
Davi Koscianski Vidal
Committed by
lucasvanlierop
Jun 30, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Forgot to update references
parent
702967b6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
PostgreSqlPlatform.php
lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
+2
-2
BooleanType.php
lib/Doctrine/DBAL/Types/BooleanType.php
+1
-1
DBAL630Test.php
tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL630Test.php
+1
-1
AbstractPostgreSqlPlatformTestCase.php
...sts/DBAL/Platforms/AbstractPostgreSqlPlatformTestCase.php
+4
-4
No files found.
lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
View file @
ac28bbca
...
...
@@ -714,10 +714,10 @@ class PostgreSqlPlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public
function
convertBoolToDbValue
(
$item
)
public
function
convertBool
eans
ToDbValue
(
$item
)
{
if
(
!
$this
->
useBooleanTrueFalseStrings
)
{
return
parent
::
convertBoolToDbValue
(
$item
);
return
parent
::
convertBool
eans
ToDbValue
(
$item
);
}
if
(
is_array
(
$item
))
{
...
...
lib/Doctrine/DBAL/Types/BooleanType.php
View file @
ac28bbca
...
...
@@ -41,7 +41,7 @@ class BooleanType extends Type
*/
public
function
convertToDatabaseValue
(
$value
,
AbstractPlatform
$platform
)
{
return
$platform
->
convertBoolToDbValue
(
$value
);
return
$platform
->
convertBool
eans
ToDbValue
(
$value
);
}
/**
...
...
tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL630Test.php
View file @
ac28bbca
...
...
@@ -67,7 +67,7 @@ class DBAL630Test extends \Doctrine\Tests\DbalFunctionalTestCase
$platform
=
$this
->
_conn
->
getDatabasePlatform
();
$stmt
=
$this
->
_conn
->
prepare
(
'INSERT INTO dbal630 (bool_col) VALUES(?)'
);
$stmt
->
bindValue
(
1
,
$platform
->
convertBoolToDbValue
(
'false'
),
PDO
::
PARAM_BOOL
);
$stmt
->
bindValue
(
1
,
$platform
->
convertBool
eans
ToDbValue
(
'false'
),
PDO
::
PARAM_BOOL
);
$stmt
->
execute
();
$id
=
$this
->
_conn
->
lastInsertId
(
'dbal630_id_seq'
);
...
...
tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSqlPlatformTestCase.php
View file @
ac28bbca
...
...
@@ -318,8 +318,8 @@ abstract class AbstractPostgreSqlPlatformTestCase extends AbstractPlatformTestCa
{
$platform
=
$this
->
createPlatform
();
$this
->
assertEquals
(
1
,
$platform
->
convertBoolToDbValue
(
true
));
$this
->
assertEquals
(
0
,
$platform
->
convertBoolToDbValue
(
false
));
$this
->
assertEquals
(
1
,
$platform
->
convertBool
eans
ToDbValue
(
true
));
$this
->
assertEquals
(
0
,
$platform
->
convertBool
eans
ToDbValue
(
false
));
}
/**
...
...
@@ -330,8 +330,8 @@ abstract class AbstractPostgreSqlPlatformTestCase extends AbstractPlatformTestCa
$platform
=
$this
->
createPlatform
();
$platform
->
setUseBooleanTrueFalseStrings
(
false
);
$this
->
assertEquals
(
1
,
$platform
->
convertBoolToDbValue
(
true
));
$this
->
assertEquals
(
0
,
$platform
->
convertBoolToDbValue
(
false
));
$this
->
assertEquals
(
1
,
$platform
->
convertBool
eans
ToDbValue
(
true
));
$this
->
assertEquals
(
0
,
$platform
->
convertBool
eans
ToDbValue
(
false
));
}
public
function
testConvertFromBoolean
()
...
...
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