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
37772e1a
Commit
37772e1a
authored
Apr 04, 2014
by
Davi Koscianski Vidal
Committed by
lucasvanlierop
Jun 30, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renaming DbValue to DatabaseValue
parent
ac28bbca
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
11 deletions
+11
-11
AbstractPlatform.php
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
+1
-1
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
+6
-6
No files found.
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
View file @
37772e1a
...
...
@@ -2604,7 +2604,7 @@ abstract class AbstractPlatform
* @param mixed $item
* @return mixed
*/
public
function
convertBooleansToD
b
Value
(
$item
)
public
function
convertBooleansToD
atabase
Value
(
$item
)
{
return
$this
->
convertBooleans
(
$item
);
}
...
...
lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
View file @
37772e1a
...
...
@@ -714,10 +714,10 @@ class PostgreSqlPlatform extends AbstractPlatform
/**
* {@inheritDoc}
*/
public
function
convertBooleansToD
b
Value
(
$item
)
public
function
convertBooleansToD
atabase
Value
(
$item
)
{
if
(
!
$this
->
useBooleanTrueFalseStrings
)
{
return
parent
::
convertBooleansToD
b
Value
(
$item
);
return
parent
::
convertBooleansToD
atabase
Value
(
$item
);
}
if
(
is_array
(
$item
))
{
...
...
lib/Doctrine/DBAL/Types/BooleanType.php
View file @
37772e1a
...
...
@@ -41,7 +41,7 @@ class BooleanType extends Type
*/
public
function
convertToDatabaseValue
(
$value
,
AbstractPlatform
$platform
)
{
return
$platform
->
convertBooleansToD
b
Value
(
$value
);
return
$platform
->
convertBooleansToD
atabase
Value
(
$value
);
}
/**
...
...
tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL630Test.php
View file @
37772e1a
...
...
@@ -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
->
convertBooleansToD
b
Value
(
'false'
),
PDO
::
PARAM_BOOL
);
$stmt
->
bindValue
(
1
,
$platform
->
convertBooleansToD
atabase
Value
(
'false'
),
PDO
::
PARAM_BOOL
);
$stmt
->
execute
();
$id
=
$this
->
_conn
->
lastInsertId
(
'dbal630_id_seq'
);
...
...
tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSqlPlatformTestCase.php
View file @
37772e1a
...
...
@@ -314,24 +314,24 @@ abstract class AbstractPostgreSqlPlatformTestCase extends AbstractPlatformTestCa
/**
* @group DBAL-630
*/
public
function
testConvertBooleanAsD
b
ValueStrings
()
public
function
testConvertBooleanAsD
atabase
ValueStrings
()
{
$platform
=
$this
->
createPlatform
();
$this
->
assertEquals
(
1
,
$platform
->
convertBooleansToD
b
Value
(
true
));
$this
->
assertEquals
(
0
,
$platform
->
convertBooleansToD
b
Value
(
false
));
$this
->
assertEquals
(
1
,
$platform
->
convertBooleansToD
atabase
Value
(
true
));
$this
->
assertEquals
(
0
,
$platform
->
convertBooleansToD
atabase
Value
(
false
));
}
/**
* @group DBAL-630
*/
public
function
testConvertBooleanAsD
b
ValueIntegers
()
public
function
testConvertBooleanAsD
atabase
ValueIntegers
()
{
$platform
=
$this
->
createPlatform
();
$platform
->
setUseBooleanTrueFalseStrings
(
false
);
$this
->
assertEquals
(
1
,
$platform
->
convertBooleansToD
b
Value
(
true
));
$this
->
assertEquals
(
0
,
$platform
->
convertBooleansToD
b
Value
(
false
));
$this
->
assertEquals
(
1
,
$platform
->
convertBooleansToD
atabase
Value
(
true
));
$this
->
assertEquals
(
0
,
$platform
->
convertBooleansToD
atabase
Value
(
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