/**
  * @group DBAL-204
  */
 public function testFullQualifiedTableName()
 {
     $table = new Table("`test`.`test`");
     $this->assertEquals('test.test', $table->getFullQualifiedName("test"));
     $this->assertEquals('test.test', $table->getFullQualifiedName("other"));
     $table = new Table("test");
     $this->assertEquals('test.test', $table->getFullQualifiedName("test"));
     $this->assertEquals('other.test', $table->getFullQualifiedName("other"));
 }
Example #2
0
 /**
  * @param \Doctrine\DBAL\Schema\Table $table
  *
  * @return void
  *
  * @throws \Doctrine\DBAL\Schema\SchemaException
  */
 protected function _addTable(Table $table)
 {
     $tableName = $table->getFullQualifiedName($this->getName());
     if (isset($this->_tables[$tableName])) {
         throw SchemaException::tableAlreadyExists($tableName);
     }
     $this->_tables[$tableName] = $table;
     $table->setSchemaConfig($this->_schemaConfig);
 }
Example #3
0
 /**
  * @param \Doctrine\DBAL\Schema\Table $table
  *
  * @return void
  *
  * @throws \Doctrine\DBAL\Schema\SchemaException
  */
 protected function _addTable(Table $table)
 {
     $namespaceName = $table->getNamespaceName();
     $tableName = $table->getFullQualifiedName($this->getName());
     if (isset($this->_tables[$tableName])) {
         throw SchemaException::tableAlreadyExists($tableName);
     }
     if (!$table->isInDefaultNamespace($this->getName()) && !$this->hasNamespace($namespaceName)) {
         $this->createNamespace($namespaceName);
     }
     $this->_tables[$tableName] = $table;
     $table->setSchemaConfig($this->_schemaConfig);
 }