Changeset 3565 for trunk/tests/Export
- Timestamp:
- 01/22/08 21:42:17 (12 months ago)
- Files:
-
- 1 modified
-
trunk/tests/Export/SqliteTestCase.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/Export/SqliteTestCase.php
r3501 r3565 33 33 class Doctrine_Export_Sqlite_TestCase extends Doctrine_UnitTestCase 34 34 { 35 public function testCreateDatabaseDoesNotExecuteSql ()35 public function testCreateDatabaseDoesNotExecuteSqlAndCreatesSqliteFile() 36 36 { 37 try { 38 $this->export->createDatabase('db'); 39 $this->fail(); 40 } catch(Doctrine_Export_Exception $e) { 41 $this->pass(); 42 } 37 $this->export->createDatabase('sqlite.db'); 38 39 $this->assertTrue(file_exists('sqlite.db')); 43 40 } 44 public function testDropDatabaseDoesNotExecuteSql ()41 public function testDropDatabaseDoesNotExecuteSqlAndDeletesSqliteFile() 45 42 { 46 try { 47 $this->export->dropDatabase('db'); 48 $this->fail(); 49 } catch(Doctrine_Export_Exception $e) { 50 $this->pass(); 51 } 43 $this->export->dropDatabase('sqlite.db'); 44 45 $this->assertFalse(file_exists('sqlite.db')); 52 46 } 53 47 public function testCreateTableSupportsAutoincPks() … … 172 166 $this->export->createTable('sometable', $fields, $options); 173 167 174 //removed this assertion and inserted the two below175 // $this->assertEqual($this->adapter->pop(), 'CREATE TABLE sometable (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(4), INDEX myindex (id ASC, name DESC))');176 177 168 $this->assertEqual($this->adapter->pop(),"CREATE INDEX myindex_idx ON sometable (id ASC, name DESC)"); 178 169 … … 180 171 181 172 } 182 183 /**184 public function testExportSupportsEmulationOfCascadingDeletes()185 {186 $r = new ForeignKeyTest;187 188 $this->assertEqual($this->adapter->pop(), 'COMMIT');189 $this->assertEqual($this->adapter->pop(), 'CREATE TRIGGER doctrine_foreign_key_test_cscd_delete AFTER DELETE ON foreign_key_test BEGIN DELETE FROM foreign_key_test WHERE parent_id = old.id;END;');190 $this->assertEqual($this->adapter->pop(), 'CREATE TABLE foreign_key_test (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(2147483647), code INTEGER, content VARCHAR(4000), parent_id INTEGER)');191 $this->assertEqual($this->adapter->pop(), 'BEGIN TRANSACTION');192 }193 */194 173 }