Commit 37772e1a authored by Davi Koscianski Vidal's avatar Davi Koscianski Vidal Committed by lucasvanlierop

Renaming DbValue to DatabaseValue

parent ac28bbca
...@@ -2604,7 +2604,7 @@ abstract class AbstractPlatform ...@@ -2604,7 +2604,7 @@ abstract class AbstractPlatform
* @param mixed $item * @param mixed $item
* @return mixed * @return mixed
*/ */
public function convertBooleansToDbValue($item) public function convertBooleansToDatabaseValue($item)
{ {
return $this->convertBooleans($item); return $this->convertBooleans($item);
} }
......
...@@ -714,10 +714,10 @@ class PostgreSqlPlatform extends AbstractPlatform ...@@ -714,10 +714,10 @@ class PostgreSqlPlatform extends AbstractPlatform
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public function convertBooleansToDbValue($item) public function convertBooleansToDatabaseValue($item)
{ {
if ( ! $this->useBooleanTrueFalseStrings) { if ( ! $this->useBooleanTrueFalseStrings) {
return parent::convertBooleansToDbValue($item); return parent::convertBooleansToDatabaseValue($item);
} }
if (is_array($item)) { if (is_array($item)) {
......
...@@ -41,7 +41,7 @@ class BooleanType extends Type ...@@ -41,7 +41,7 @@ class BooleanType extends Type
*/ */
public function convertToDatabaseValue($value, AbstractPlatform $platform) public function convertToDatabaseValue($value, AbstractPlatform $platform)
{ {
return $platform->convertBooleansToDbValue($value); return $platform->convertBooleansToDatabaseValue($value);
} }
/** /**
......
...@@ -67,7 +67,7 @@ class DBAL630Test extends \Doctrine\Tests\DbalFunctionalTestCase ...@@ -67,7 +67,7 @@ class DBAL630Test extends \Doctrine\Tests\DbalFunctionalTestCase
$platform = $this->_conn->getDatabasePlatform(); $platform = $this->_conn->getDatabasePlatform();
$stmt = $this->_conn->prepare('INSERT INTO dbal630 (bool_col) VALUES(?)'); $stmt = $this->_conn->prepare('INSERT INTO dbal630 (bool_col) VALUES(?)');
$stmt->bindValue(1, $platform->convertBooleansToDbValue('false'), PDO::PARAM_BOOL); $stmt->bindValue(1, $platform->convertBooleansToDatabaseValue('false'), PDO::PARAM_BOOL);
$stmt->execute(); $stmt->execute();
$id = $this->_conn->lastInsertId('dbal630_id_seq'); $id = $this->_conn->lastInsertId('dbal630_id_seq');
......
...@@ -314,24 +314,24 @@ abstract class AbstractPostgreSqlPlatformTestCase extends AbstractPlatformTestCa ...@@ -314,24 +314,24 @@ abstract class AbstractPostgreSqlPlatformTestCase extends AbstractPlatformTestCa
/** /**
* @group DBAL-630 * @group DBAL-630
*/ */
public function testConvertBooleanAsDbValueStrings() public function testConvertBooleanAsDatabaseValueStrings()
{ {
$platform = $this->createPlatform(); $platform = $this->createPlatform();
$this->assertEquals(1, $platform->convertBooleansToDbValue(true)); $this->assertEquals(1, $platform->convertBooleansToDatabaseValue(true));
$this->assertEquals(0, $platform->convertBooleansToDbValue(false)); $this->assertEquals(0, $platform->convertBooleansToDatabaseValue(false));
} }
/** /**
* @group DBAL-630 * @group DBAL-630
*/ */
public function testConvertBooleanAsDbValueIntegers() public function testConvertBooleanAsDatabaseValueIntegers()
{ {
$platform = $this->createPlatform(); $platform = $this->createPlatform();
$platform->setUseBooleanTrueFalseStrings(false); $platform->setUseBooleanTrueFalseStrings(false);
$this->assertEquals(1, $platform->convertBooleansToDbValue(true)); $this->assertEquals(1, $platform->convertBooleansToDatabaseValue(true));
$this->assertEquals(0, $platform->convertBooleansToDbValue(false)); $this->assertEquals(0, $platform->convertBooleansToDatabaseValue(false));
} }
public function testConvertFromBoolean() public function testConvertFromBoolean()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment