Commit 94414675 authored by Benjamin Eberlei's avatar Benjamin Eberlei

[Sharding] Move Synchronizer Test code, fix namespace

parent 9be7c306
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* and is licensed under the MIT license. For more information, see * and is licensed under the MIT license. For more information, see
* <http://www.doctrine-project.org>. * <http://www.doctrine-project.org>.
*/ */
namespace Doctrine\DBAL\Sharding; namespace Doctrine\DBAL\Schema\Synchronizer;
use Doctrine\DBAL\Connection; use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
......
...@@ -13,17 +13,17 @@ ...@@ -13,17 +13,17 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* This software consists of voluntary contributions made by many individuals * This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see * and is licensed under the MIT license. For more information, see
* <http://www.doctrine-project.org>. * <http://www.doctrine-project.org>.
*/ */
namespace Doctrine\Tests\DBAL\Sharding; namespace Doctrine\Tests\DBAL\Schema\Synchronizer;
use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\DriverManager;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Sharding\DefaultSchemaSynchronizer; use Doctrine\DBAL\Schema\Synchronizer\SingleDatabaseSynchronizer;
class DefaultSchemaSynchronizerTest extends \PHPUnit_Framework_TestCase class SingleDatabaseSynchronizerTest extends \PHPUnit_Framework_TestCase
{ {
private $conn; private $conn;
private $synchronizer; private $synchronizer;
...@@ -34,7 +34,7 @@ class DefaultSchemaSynchronizerTest extends \PHPUnit_Framework_TestCase ...@@ -34,7 +34,7 @@ class DefaultSchemaSynchronizerTest extends \PHPUnit_Framework_TestCase
'driver' => 'pdo_sqlite', 'driver' => 'pdo_sqlite',
'memory' => true, 'memory' => true,
)); ));
$this->synchronizer = new DefaultSchemaSynchronizer($this->conn); $this->synchronizer = new SingleDatabaseSynchronizer($this->conn);
} }
public function testGetCreateSchema() public function testGetCreateSchema()
......
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
namespace Doctrine\Tests\DBAL\Sharding\SQLAzure; namespace Doctrine\Tests\DBAL\Sharding\SQLAzure;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Sharding\SQLAzure\SQLAzureSchemaSynchronizer; use Doctrine\DBAL\Sharding\SQLAzure\SQLAzureFederationsSynchronizer;
class SQLAzureSchemaSynchronizerTest extends AbstractTestCase class SQLAzureFederationsSynchronizerTest extends AbstractTestCase
{ {
public function testCreateSchema() public function testCreateSchema()
{ {
$schema = $this->createShopSchema(); $schema = $this->createShopSchema();
$synchronizer = new SQLAzureSchemaSynchronizer($this->conn, $this->sm); $synchronizer = new SQLAzureFederationsSynchronizer($this->conn, $this->sm);
$sql = $synchronizer->getCreateSchema($schema); $sql = $synchronizer->getCreateSchema($schema);
$this->assertEquals(array ( $this->assertEquals(array (
...@@ -27,7 +27,7 @@ class SQLAzureSchemaSynchronizerTest extends AbstractTestCase ...@@ -27,7 +27,7 @@ class SQLAzureSchemaSynchronizerTest extends AbstractTestCase
{ {
$schema = $this->createShopSchema(); $schema = $this->createShopSchema();
$synchronizer = new SQLAzureSchemaSynchronizer($this->conn, $this->sm); $synchronizer = new SQLAzureFederationsSynchronizer($this->conn, $this->sm);
$synchronizer->dropAllSchema(); $synchronizer->dropAllSchema();
$sql = $synchronizer->getUpdateSchema($schema); $sql = $synchronizer->getUpdateSchema($schema);
...@@ -39,7 +39,7 @@ class SQLAzureSchemaSynchronizerTest extends AbstractTestCase ...@@ -39,7 +39,7 @@ class SQLAzureSchemaSynchronizerTest extends AbstractTestCase
{ {
$schema = $this->createShopSchema(); $schema = $this->createShopSchema();
$synchronizer = new SQLAzureSchemaSynchronizer($this->conn, $this->sm); $synchronizer = new SQLAzureFederationsSynchronizer($this->conn, $this->sm);
$synchronizer->dropAllSchema(); $synchronizer->dropAllSchema();
$synchronizer->createSchema($schema); $synchronizer->createSchema($schema);
$sql = $synchronizer->getDropSchema($schema); $sql = $synchronizer->getDropSchema($schema);
......
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