Exemplo n.º 1
0
 public function testReturnsSchemaManager()
 {
     $connection = $this->getConnectionMock();
     $schemaManager = $this->driver->getSchemaManager($connection);
     $this->assertEquals($this->createSchemaManager($connection), $schemaManager);
     $this->assertAttributeSame($connection, '_conn', $schemaManager);
 }
Exemplo n.º 2
0
 /**
  * Gets the SchemaManager that can be used to inspect or change the
  * database schema through the connection.
  *
  * @return \Doctrine\DBAL\Schema\AbstractSchemaManager
  */
 public function getSchemaManager()
 {
     if (!$this->_schemaManager) {
         $this->_schemaManager = $this->_driver->getSchemaManager($this);
     }
     return $this->_schemaManager;
 }