public function testDbMssql() { include "loader.php"; require 'unit-tests/config.db.php'; if (empty($configMssql)) { $this->markTestSkipped("Skipped"); return; } $connection = new Twm\Db\Adapter\Pdo\Mssql($configMssql); //List tables $expectedTables = array(0 => 'albums', 1 => 'artists', 2 => 'customers', 3 => 'm2m_parts', 4 => 'm2m_robots', 5 => 'm2m_robots_parts', 6 => 'parts', 7 => 'personas', 8 => 'personnes', 9 => 'prueba', 10 => 'robots', 11 => 'robots_parts', 12 => 'songs', 13 => 'subscriptores', 14 => 'tipo_documento'); /* $tables = $connection->listTables(); $this->assertEquals($tables, $expectedTables); $tables = $connection->listTables('S_ECSB'); $this->assertEquals($tables, $expectedTables); //Table exist $this->assertEquals($connection->tableExists('personas'), 1); $this->assertEquals($connection->tableExists('noexist'), 0); $this->assertEquals($connection->tableExists('personas', 'S_ECSB'), 1); $this->assertEquals($connection->tableExists('personas', 'test'), 0); */ $expectedDescribe = $this->getExpectedColumnsMssql(); $describe = $connection->describeColumns('personas'); $this->assertEquals($expectedDescribe, $describe); $describe = $connection->describeColumns('personas', 'phalcon_test'); $this->assertEquals($describe, $expectedDescribe); /* //Table Options $expectedOptions = array( 'table_type' => 'BASE TABLE', 'auto_increment' => NULL, 'engine' => 'InnoDB', 'table_collation' => 'utf8_unicode_ci', ); $options = $connection->tableOptions('personas', 'phalcon_test'); $this->assertEquals($options, $expectedOptions); */ //Indexes $expectedIndexes = array('PRIMARY' => Phalcon\Db\Index::__set_state(array('_indexName' => 'PRIMARY', '_columns' => array('id'))), 'robots_id' => Phalcon\Db\Index::__set_state(array('_indexName' => 'robots_id', '_columns' => array('robots_id'))), 'parts_id' => Phalcon\Db\Index::__set_state(array('_indexName' => 'parts_id', '_columns' => array('parts_id')))); /* $describeIndexes = $connection->describeIndexes('robots_parts'); $this->assertEquals($expectedIndexes, $describeIndexes); $describeIndexes = $connection->describeIndexes('robots_parts', 'phalcon_test'); $this->assertEquals($describeIndexes, $expectedIndexes); //References $expectedReferences = array( 'robots_parts_ibfk_1' => Phalcon\Db\Reference::__set_state(array( '_referenceName' => 'robots_parts_ibfk_1', '_referencedTable' => 'robots', '_columns' => array('robots_id'), '_referencedColumns' => array('id'), '_referencedSchema' => 'phalcon_test' )), 'robots_parts_ibfk_2' => Phalcon\Db\Reference::__set_state(array( '_referenceName' => 'robots_parts_ibfk_2', '_referencedTable' => 'parts', '_columns' => array('parts_id'), '_referencedColumns' => array('id'), '_referencedSchema' => 'phalcon_test', )), ); $describeReferences = $connection->describeReferences('robots_parts'); $this->assertEquals($describeReferences, $expectedReferences); $describeReferences = $connection->describeReferences('robots_parts', 'phalcon_test'); $this->assertEquals($describeReferences, $expectedReferences); */ }