Rajout de doctrine/orm
[zf2.biz/galerie.git] / vendor / doctrine / dbal / tests / Doctrine / Tests / DBAL / Functional / Schema / SqliteSchemaManagerTest.php
1 <?php
2
3 namespace Doctrine\Tests\DBAL\Functional\Schema;
4
5 use Doctrine\DBAL\Schema;
6
7 require_once __DIR__ . '/../../../TestInit.php';
8
9 class SqliteSchemaManagerTest extends SchemaManagerFunctionalTestCase
10 {
11     /**
12      * SQLITE does not support databases.
13      *
14      * @expectedException \Doctrine\DBAL\DBALException
15      */
16     public function testListDatabases()
17     {
18         $this->_sm->listDatabases();
19     }
20
21     public function testCreateAndDropDatabase()
22     {
23         $path = dirname(__FILE__).'/test_create_and_drop_sqlite_database.sqlite';
24
25         $this->_sm->createDatabase($path);
26         $this->assertEquals(true, file_exists($path));
27         $this->_sm->dropDatabase($path);
28         $this->assertEquals(false, file_exists($path));
29     }
30
31     /**
32      * @expectedException \Doctrine\DBAL\DBALException
33      */
34     public function testRenameTable()
35     {
36         $this->_sm->renameTable('oldname', 'newname');
37     }
38
39     public function testAutoincrementDetection()
40     {
41       $this->markTestSkipped(
42           'There is currently no reliable way to determine whether an SQLite column is marked as '
43           . 'auto-increment. So, while it does support a single identity column, we cannot with '
44           . 'certainty determine which it is.');
45     }
46 }