Commit 1f5456a9 authored by Tiago Brito's avatar Tiago Brito

Merge pull request #6 from doctrine/master

Update from master repository
parents 9c918572 7175964c
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
namespace Doctrine\DBAL\Portability; namespace Doctrine\DBAL\Portability;
use Doctrine\DBAL\Driver;
use Doctrine\DBAL\Cache\QueryCacheProfile; use Doctrine\DBAL\Cache\QueryCacheProfile;
/** /**
......
...@@ -1312,7 +1312,9 @@ class QueryBuilder ...@@ -1312,7 +1312,9 @@ class QueryBuilder
. ' JOIN ' . $join['joinTable'] . ' ' . $join['joinAlias'] . ' JOIN ' . $join['joinTable'] . ' ' . $join['joinAlias']
. ' ON ' . ((string) $join['joinCondition']); . ' ON ' . ((string) $join['joinCondition']);
$knownAliases[$join['joinAlias']] = true; $knownAliases[$join['joinAlias']] = true;
}
foreach ($this->sqlParts['join'][$fromAlias] as $join) {
$sql .= $this->getSQLForJoins($join['joinAlias'], $knownAliases); $sql .= $this->getSQLForJoins($join['joinAlias'], $knownAliases);
} }
} }
......
...@@ -22,7 +22,6 @@ namespace Doctrine\DBAL\Schema; ...@@ -22,7 +22,6 @@ namespace Doctrine\DBAL\Schema;
use Doctrine\DBAL\Events; use Doctrine\DBAL\Events;
use Doctrine\DBAL\Event\SchemaColumnDefinitionEventArgs; use Doctrine\DBAL\Event\SchemaColumnDefinitionEventArgs;
use Doctrine\DBAL\Event\SchemaIndexDefinitionEventArgs; use Doctrine\DBAL\Event\SchemaIndexDefinitionEventArgs;
use Doctrine\DBAL\Types;
use Doctrine\DBAL\DBALException; use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Platforms\AbstractPlatform;
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
namespace Doctrine\Tests\DBAL\Functional\Schema; namespace Doctrine\Tests\DBAL\Functional\Schema;
use Doctrine\DBAL\Schema;
require_once __DIR__ . '/../../../TestInit.php'; require_once __DIR__ . '/../../../TestInit.php';
class Db2SchemaManagerTest extends SchemaManagerFunctionalTestCase class Db2SchemaManagerTest extends SchemaManagerFunctionalTestCase
{ {
} }
\ No newline at end of file
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
namespace Doctrine\Tests\DBAL\Mocks; namespace Doctrine\Tests\DBAL\Mocks;
use Doctrine\DBAL\DBALException; use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Platforms; use Doctrine\DBAL\Platforms\AbstractPlatform;
class MockPlatform extends \Doctrine\DBAL\Platforms\AbstractPlatform class MockPlatform extends AbstractPlatform
{ {
/** /**
* Gets the SQL Snippet used to declare a BLOB column type. * Gets the SQL Snippet used to declare a BLOB column type.
......
...@@ -678,6 +678,60 @@ class QueryBuilderTest extends \Doctrine\Tests\DbalTestCase ...@@ -678,6 +678,60 @@ class QueryBuilderTest extends \Doctrine\Tests\DbalTestCase
$this->assertEquals('SELECT DISTINCT u.id FROM users u INNER JOIN permissions p ON p.user_id = u.id, articles a INNER JOIN comments c ON c.article_id = a.id WHERE (u.id = a.user_id) AND (p.read = 1)', $qb->getSQL()); $this->assertEquals('SELECT DISTINCT u.id FROM users u INNER JOIN permissions p ON p.user_id = u.id, articles a INNER JOIN comments c ON c.article_id = a.id WHERE (u.id = a.user_id) AND (p.read = 1)', $qb->getSQL());
} }
/**
* @group DBAL-774
*/
public function testSelectWithJoinsWithMultipleOnConditionsParseOrder()
{
$qb = new QueryBuilder($this->conn);
$qb->select('a.id')
->from('table_a', 'a')
->join('a', 'table_b', 'b', 'a.fk_b = b.id')
->join('b', 'table_c', 'c', 'c.fk_b = b.id AND b.language = ?')
->join('a', 'table_d', 'd', 'a.fk_d = d.id')
->join('c', 'table_e', 'e', 'e.fk_c = c.id AND e.fk_d = d.id');
$this->assertEquals(
'SELECT a.id ' .
'FROM table_a a ' .
'INNER JOIN table_b b ON a.fk_b = b.id ' .
'INNER JOIN table_d d ON a.fk_d = d.id ' .
'INNER JOIN table_c c ON c.fk_b = b.id AND b.language = ? ' .
'INNER JOIN table_e e ON e.fk_c = c.id AND e.fk_d = d.id',
(string) $qb
);
}
/**
* @group DBAL-774
*/
public function testSelectWithMultipleFromsAndJoinsWithMultipleOnConditionsParseOrder()
{
$qb = new QueryBuilder($this->conn);
$qb->select('a.id')
->from('table_a', 'a')
->from('table_f', 'f')
->join('a', 'table_b', 'b', 'a.fk_b = b.id')
->join('b', 'table_c', 'c', 'c.fk_b = b.id AND b.language = ?')
->join('a', 'table_d', 'd', 'a.fk_d = d.id')
->join('c', 'table_e', 'e', 'e.fk_c = c.id AND e.fk_d = d.id')
->join('f', 'table_g', 'g', 'f.fk_g = g.id');
$this->assertEquals(
'SELECT a.id ' .
'FROM table_a a ' .
'INNER JOIN table_b b ON a.fk_b = b.id ' .
'INNER JOIN table_d d ON a.fk_d = d.id ' .
'INNER JOIN table_c c ON c.fk_b = b.id AND b.language = ? ' .
'INNER JOIN table_e e ON e.fk_c = c.id AND e.fk_d = d.id, ' .
'table_f f ' .
'INNER JOIN table_g g ON f.fk_g = g.id',
(string) $qb
);
}
public function testClone() public function testClone()
{ {
$qb = new QueryBuilder($this->conn); $qb = new QueryBuilder($this->conn);
......
...@@ -5,7 +5,6 @@ namespace Doctrine\Tests\DBAL\Schema; ...@@ -5,7 +5,6 @@ namespace Doctrine\Tests\DBAL\Schema;
use Doctrine\Common\EventManager; use Doctrine\Common\EventManager;
use Doctrine\DBAL\Configuration; use Doctrine\DBAL\Configuration;
use Doctrine\DBAL\Schema\MySqlSchemaManager; use Doctrine\DBAL\Schema\MySqlSchemaManager;
use Doctrine\Tests\DBAL\Mocks;
class MySqlSchemaManagerTest extends \PHPUnit_Framework_TestCase class MySqlSchemaManagerTest extends \PHPUnit_Framework_TestCase
{ {
......
...@@ -5,7 +5,6 @@ namespace Doctrine\Tests\DBAL\Schema; ...@@ -5,7 +5,6 @@ namespace Doctrine\Tests\DBAL\Schema;
use Doctrine\DBAL\Configuration; use Doctrine\DBAL\Configuration;
use Doctrine\DBAL\Schema\PostgreSqlSchemaManager; use Doctrine\DBAL\Schema\PostgreSqlSchemaManager;
use Doctrine\DBAL\Schema\Sequence; use Doctrine\DBAL\Schema\Sequence;
use Doctrine\Tests\DBAL\Mocks;
class PostgreSQLSchemaManagerTest extends \PHPUnit_Framework_TestCase class PostgreSQLSchemaManagerTest extends \PHPUnit_Framework_TestCase
{ {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace Doctrine\Tests\DBAL\Types; namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks; use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php'; require_once __DIR__ . '/../../TestInit.php';
...@@ -15,7 +15,7 @@ class ArrayTest extends \Doctrine\Tests\DbalTestCase ...@@ -15,7 +15,7 @@ class ArrayTest extends \Doctrine\Tests\DbalTestCase
protected function setUp() protected function setUp()
{ {
$this->_platform = new \Doctrine\Tests\DBAL\Mocks\MockPlatform(); $this->_platform = new MockPlatform();
$this->_type = Type::getType('array'); $this->_type = Type::getType('array');
} }
...@@ -58,4 +58,4 @@ class ArrayTest extends \Doctrine\Tests\DbalTestCase ...@@ -58,4 +58,4 @@ class ArrayTest extends \Doctrine\Tests\DbalTestCase
{ {
$this->assertFalse($this->_type->convertToPHPValue(serialize(false), $this->_platform)); $this->assertFalse($this->_type->convertToPHPValue(serialize(false), $this->_platform));
} }
} }
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace Doctrine\Tests\DBAL\Types; namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks; use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php'; require_once __DIR__ . '/../../TestInit.php';
...@@ -24,7 +24,7 @@ class BinaryTest extends \Doctrine\Tests\DbalTestCase ...@@ -24,7 +24,7 @@ class BinaryTest extends \Doctrine\Tests\DbalTestCase
*/ */
protected function setUp() protected function setUp()
{ {
$this->platform = new \Doctrine\Tests\DBAL\Mocks\MockPlatform(); $this->platform = new MockPlatform();
$this->type = Type::getType('binary'); $this->type = Type::getType('binary');
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace Doctrine\Tests\DBAL\Types; namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks; use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php'; require_once __DIR__ . '/../../TestInit.php';
...@@ -24,7 +24,7 @@ class BlobTest extends \Doctrine\Tests\DbalTestCase ...@@ -24,7 +24,7 @@ class BlobTest extends \Doctrine\Tests\DbalTestCase
*/ */
protected function setUp() protected function setUp()
{ {
$this->platform = new \Doctrine\Tests\DBAL\Mocks\MockPlatform(); $this->platform = new MockPlatform();
$this->type = Type::getType('blob'); $this->type = Type::getType('blob');
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace Doctrine\Tests\DBAL\Types; namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks; use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php'; require_once __DIR__ . '/../../TestInit.php';
...@@ -15,7 +15,7 @@ class BooleanTest extends \Doctrine\Tests\DbalTestCase ...@@ -15,7 +15,7 @@ class BooleanTest extends \Doctrine\Tests\DbalTestCase
protected function setUp() protected function setUp()
{ {
$this->_platform = new \Doctrine\Tests\DBAL\Mocks\MockPlatform(); $this->_platform = new MockPlatform();
$this->_type = Type::getType('boolean'); $this->_type = Type::getType('boolean');
} }
...@@ -33,4 +33,4 @@ class BooleanTest extends \Doctrine\Tests\DbalTestCase ...@@ -33,4 +33,4 @@ class BooleanTest extends \Doctrine\Tests\DbalTestCase
{ {
$this->assertNull($this->_type->convertToPHPValue(null, $this->_platform)); $this->assertNull($this->_type->convertToPHPValue(null, $this->_platform));
} }
} }
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace Doctrine\Tests\DBAL\Types; namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks; use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php'; require_once __DIR__ . '/../../TestInit.php';
...@@ -16,7 +16,7 @@ class DateTest extends \Doctrine\Tests\DbalTestCase ...@@ -16,7 +16,7 @@ class DateTest extends \Doctrine\Tests\DbalTestCase
protected function setUp() protected function setUp()
{ {
$this->_platform = new \Doctrine\Tests\DBAL\Mocks\MockPlatform(); $this->_platform = new MockPlatform();
$this->_type = Type::getType('date'); $this->_type = Type::getType('date');
$this->_tz = date_default_timezone_get(); $this->_tz = date_default_timezone_get();
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace Doctrine\Tests\DBAL\Types; namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks; use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php'; require_once __DIR__ . '/../../TestInit.php';
...@@ -15,7 +15,7 @@ class DateTimeTest extends \Doctrine\Tests\DbalTestCase ...@@ -15,7 +15,7 @@ class DateTimeTest extends \Doctrine\Tests\DbalTestCase
protected function setUp() protected function setUp()
{ {
$this->_platform = new \Doctrine\Tests\DBAL\Mocks\MockPlatform(); $this->_platform = new MockPlatform();
$this->_type = Type::getType('datetime'); $this->_type = Type::getType('datetime');
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace Doctrine\Tests\DBAL\Types; namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks; use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php'; require_once __DIR__ . '/../../TestInit.php';
...@@ -15,7 +15,7 @@ class DateTimeTzTest extends \Doctrine\Tests\DbalTestCase ...@@ -15,7 +15,7 @@ class DateTimeTzTest extends \Doctrine\Tests\DbalTestCase
protected function setUp() protected function setUp()
{ {
$this->_platform = new \Doctrine\Tests\DBAL\Mocks\MockPlatform(); $this->_platform = new MockPlatform();
$this->_type = Type::getType('datetimetz'); $this->_type = Type::getType('datetimetz');
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace Doctrine\Tests\DBAL\Types; namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks; use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php'; require_once __DIR__ . '/../../TestInit.php';
...@@ -15,7 +15,7 @@ class DecimalTest extends \Doctrine\Tests\DbalTestCase ...@@ -15,7 +15,7 @@ class DecimalTest extends \Doctrine\Tests\DbalTestCase
protected function setUp() protected function setUp()
{ {
$this->_platform = new \Doctrine\Tests\DBAL\Mocks\MockPlatform(); $this->_platform = new MockPlatform();
$this->_type = Type::getType('decimal'); $this->_type = Type::getType('decimal');
} }
...@@ -28,4 +28,4 @@ class DecimalTest extends \Doctrine\Tests\DbalTestCase ...@@ -28,4 +28,4 @@ class DecimalTest extends \Doctrine\Tests\DbalTestCase
{ {
$this->assertNull($this->_type->convertToPHPValue(null, $this->_platform)); $this->assertNull($this->_type->convertToPHPValue(null, $this->_platform));
} }
} }
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace Doctrine\Tests\DBAL\Types; namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks; use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php'; require_once __DIR__ . '/../../TestInit.php';
...@@ -13,7 +13,7 @@ class FloatTest extends \Doctrine\Tests\DbalTestCase ...@@ -13,7 +13,7 @@ class FloatTest extends \Doctrine\Tests\DbalTestCase
protected function setUp() protected function setUp()
{ {
$this->_platform = new \Doctrine\Tests\DBAL\Mocks\MockPlatform(); $this->_platform = new MockPlatform();
$this->_type = Type::getType('float'); $this->_type = Type::getType('float');
} }
...@@ -36,4 +36,4 @@ class FloatTest extends \Doctrine\Tests\DbalTestCase ...@@ -36,4 +36,4 @@ class FloatTest extends \Doctrine\Tests\DbalTestCase
{ {
$this->assertNull($this->_type->convertToDatabaseValue(null, $this->_platform)); $this->assertNull($this->_type->convertToDatabaseValue(null, $this->_platform));
} }
} }
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace Doctrine\Tests\DBAL\Types; namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks; use Doctrine\Tests\DBAL\Mocks\MockPlatform;
class GuidTest extends \Doctrine\Tests\DbalTestCase class GuidTest extends \Doctrine\Tests\DbalTestCase
{ {
...@@ -13,7 +13,7 @@ class GuidTest extends \Doctrine\Tests\DbalTestCase ...@@ -13,7 +13,7 @@ class GuidTest extends \Doctrine\Tests\DbalTestCase
protected function setUp() protected function setUp()
{ {
$this->_platform = new \Doctrine\Tests\DBAL\Mocks\MockPlatform(); $this->_platform = new MockPlatform();
$this->_type = Type::getType('guid'); $this->_type = Type::getType('guid');
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace Doctrine\Tests\DBAL\Types; namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks; use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php'; require_once __DIR__ . '/../../TestInit.php';
...@@ -15,7 +15,7 @@ class IntegerTest extends \Doctrine\Tests\DbalTestCase ...@@ -15,7 +15,7 @@ class IntegerTest extends \Doctrine\Tests\DbalTestCase
protected function setUp() protected function setUp()
{ {
$this->_platform = new \Doctrine\Tests\DBAL\Mocks\MockPlatform(); $this->_platform = new MockPlatform();
$this->_type = Type::getType('integer'); $this->_type = Type::getType('integer');
} }
...@@ -29,4 +29,4 @@ class IntegerTest extends \Doctrine\Tests\DbalTestCase ...@@ -29,4 +29,4 @@ class IntegerTest extends \Doctrine\Tests\DbalTestCase
{ {
$this->assertNull($this->_type->convertToPHPValue(null, $this->_platform)); $this->assertNull($this->_type->convertToPHPValue(null, $this->_platform));
} }
} }
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace Doctrine\Tests\DBAL\Types; namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks; use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php'; require_once __DIR__ . '/../../TestInit.php';
...@@ -15,7 +15,7 @@ class ObjectTest extends \Doctrine\Tests\DbalTestCase ...@@ -15,7 +15,7 @@ class ObjectTest extends \Doctrine\Tests\DbalTestCase
protected function setUp() protected function setUp()
{ {
$this->_platform = new \Doctrine\Tests\DBAL\Mocks\MockPlatform(); $this->_platform = new MockPlatform();
$this->_type = Type::getType('object'); $this->_type = Type::getType('object');
} }
...@@ -53,4 +53,4 @@ class ObjectTest extends \Doctrine\Tests\DbalTestCase ...@@ -53,4 +53,4 @@ class ObjectTest extends \Doctrine\Tests\DbalTestCase
{ {
$this->assertFalse($this->_type->convertToPHPValue(serialize(false), $this->_platform)); $this->assertFalse($this->_type->convertToPHPValue(serialize(false), $this->_platform));
} }
} }
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace Doctrine\Tests\DBAL\Types; namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks; use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php'; require_once __DIR__ . '/../../TestInit.php';
...@@ -15,7 +15,7 @@ class SmallIntTest extends \Doctrine\Tests\DbalTestCase ...@@ -15,7 +15,7 @@ class SmallIntTest extends \Doctrine\Tests\DbalTestCase
protected function setUp() protected function setUp()
{ {
$this->_platform = new \Doctrine\Tests\DBAL\Mocks\MockPlatform(); $this->_platform = new MockPlatform();
$this->_type = Type::getType('smallint'); $this->_type = Type::getType('smallint');
} }
...@@ -29,4 +29,4 @@ class SmallIntTest extends \Doctrine\Tests\DbalTestCase ...@@ -29,4 +29,4 @@ class SmallIntTest extends \Doctrine\Tests\DbalTestCase
{ {
$this->assertNull($this->_type->convertToPHPValue(null, $this->_platform)); $this->assertNull($this->_type->convertToPHPValue(null, $this->_platform));
} }
} }
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace Doctrine\Tests\DBAL\Types; namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks; use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php'; require_once __DIR__ . '/../../TestInit.php';
...@@ -15,7 +15,7 @@ class StringTest extends \Doctrine\Tests\DbalTestCase ...@@ -15,7 +15,7 @@ class StringTest extends \Doctrine\Tests\DbalTestCase
protected function setUp() protected function setUp()
{ {
$this->_platform = new \Doctrine\Tests\DBAL\Mocks\MockPlatform(); $this->_platform = new MockPlatform();
$this->_type = Type::getType('string'); $this->_type = Type::getType('string');
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace Doctrine\Tests\DBAL\Types; namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks; use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php'; require_once __DIR__ . '/../../TestInit.php';
...@@ -15,7 +15,7 @@ class TimeTest extends \Doctrine\Tests\DbalTestCase ...@@ -15,7 +15,7 @@ class TimeTest extends \Doctrine\Tests\DbalTestCase
protected function setUp() protected function setUp()
{ {
$this->_platform = new \Doctrine\Tests\DBAL\Mocks\MockPlatform(); $this->_platform = new MockPlatform();
$this->_type = Type::getType('time'); $this->_type = Type::getType('time');
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace Doctrine\Tests\DBAL\Types; namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks; use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php'; require_once __DIR__ . '/../../TestInit.php';
...@@ -15,7 +15,7 @@ class VarDateTimeTest extends \Doctrine\Tests\DbalTestCase ...@@ -15,7 +15,7 @@ class VarDateTimeTest extends \Doctrine\Tests\DbalTestCase
protected function setUp() protected function setUp()
{ {
$this->_platform = new \Doctrine\Tests\DBAL\Mocks\MockPlatform(); $this->_platform = new MockPlatform();
if (!Type::hasType('vardatetime')) { if (!Type::hasType('vardatetime')) {
Type::addType('vardatetime', 'Doctrine\DBAL\Types\VarDateTimeType'); Type::addType('vardatetime', 'Doctrine\DBAL\Types\VarDateTimeType');
} }
......
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