From d938e6a9b08c17a4dd93783e9d2f8da799847fcc Mon Sep 17 00:00:00 2001 From: zYne Date: Mon, 18 Jun 2007 18:23:42 +0000 Subject: [PATCH] --- tests/Export/SqliteTestCase.php | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/tests/Export/SqliteTestCase.php b/tests/Export/SqliteTestCase.php index a3b4baaf8..7839d6b5c 100644 --- a/tests/Export/SqliteTestCase.php +++ b/tests/Export/SqliteTestCase.php @@ -30,8 +30,10 @@ * @since 1.0 * @version $Revision$ */ -class Doctrine_Export_Sqlite_TestCase extends Doctrine_UnitTestCase { - public function testCreateDatabaseDoesNotExecuteSql() { +class Doctrine_Export_Sqlite_TestCase extends Doctrine_UnitTestCase +{ + public function testCreateDatabaseDoesNotExecuteSql() + { try { $this->export->createDatabase('db'); $this->fail(); @@ -39,7 +41,8 @@ class Doctrine_Export_Sqlite_TestCase extends Doctrine_UnitTestCase { $this->pass(); } } - public function testDropDatabaseDoesNotExecuteSql() { + public function testDropDatabaseDoesNotExecuteSql() + { try { $this->export->dropDatabase('db'); $this->fail(); @@ -47,16 +50,18 @@ class Doctrine_Export_Sqlite_TestCase extends Doctrine_UnitTestCase { $this->pass(); } } - public function testCreateTableSupportsAutoincPks() { + public function testCreateTableSupportsAutoincPks() + { $name = 'mytable'; $fields = array('id' => array('type' => 'integer', 'unsigned' => 1, 'autoincrement' => true)); $this->export->createTable($name, $fields); - $this->assertEqual($this->adapter->pop(), 'CREATE TABLE mytable (id INTEGER UNSIGNED PRIMARY KEY AUTOINCREMENT)'); + $this->assertEqual($this->adapter->pop(), 'CREATE TABLE mytable (id INTEGER PRIMARY KEY AUTOINCREMENT)'); } - public function testCreateTableSupportsDefaultAttribute() { + public function testCreateTableSupportsDefaultAttribute() + { $name = 'mytable'; $fields = array('name' => array('type' => 'char', 'length' => 10, 'default' => 'def'), 'type' => array('type' => 'integer', 'length' => 3, 'default' => 12) @@ -67,7 +72,8 @@ class Doctrine_Export_Sqlite_TestCase extends Doctrine_UnitTestCase { $this->assertEqual($this->adapter->pop(), 'CREATE TABLE mytable (name CHAR(10) DEFAULT \'def\', type INTEGER DEFAULT 12, PRIMARY KEY(name, type))'); } - public function testCreateTableSupportsMultiplePks() { + public function testCreateTableSupportsMultiplePks() + { $name = 'mytable'; $fields = array('name' => array('type' => 'char', 'length' => 10), 'type' => array('type' => 'integer', 'length' => 3)); @@ -89,7 +95,7 @@ class Doctrine_Export_Sqlite_TestCase extends Doctrine_UnitTestCase { $this->export->createTable('sometable', $fields, $options); - $this->assertEqual($this->adapter->pop(), 'CREATE TABLE sometable (id INTEGER UNSIGNED PRIMARY KEY AUTOINCREMENT, name VARCHAR(4), INDEX myindex (id, name))'); + $this->assertEqual($this->adapter->pop(), 'CREATE TABLE sometable (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(4), INDEX myindex (id, name))'); } public function testUnknownIndexSortingAttributeThrowsException() { @@ -120,7 +126,7 @@ class Doctrine_Export_Sqlite_TestCase extends Doctrine_UnitTestCase { $this->export->createTable('sometable', $fields, $options); - $this->assertEqual($this->adapter->pop(), 'CREATE TABLE sometable (id INTEGER UNSIGNED PRIMARY KEY AUTOINCREMENT, name VARCHAR(4), INDEX myindex (id ASC, name DESC))'); + $this->assertEqual($this->adapter->pop(), 'CREATE TABLE sometable (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(4), INDEX myindex (id ASC, name DESC))'); } public function testExportSupportsEmulationOfCascadingDeletes() {