Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[Tests] The test suite is runnable with SQLite

  • Loading branch information...
commit db0174774d5c678fd316b99941f96082b09142c3 1 parent ac1ac6a
@willdurand willdurand authored
View
10 README.md
@@ -51,6 +51,9 @@ Then, install dependencies:
php composer.phar install
+
+#### MySQL ####
+
The Propel test suite requires a database (`test` for instance, but feel free to choose the name you want), and
three database schemas: `bookstore_schemas`, `contest`, and `second_hand_books`.
@@ -63,7 +66,12 @@ Here is the set of commands to run in order to setup MySQL:
Once done, build fixtures:
- php bin/propel test:prepare
+ bin/propel test:prepare
+
+#### SQLite ####
+
+ bin/propel test:prepare --vendor=sqlite --dsn="sqlite:/tmp/database.sqlite" --user="" --password=""
+
Now you can run the test suite by running:
View
5 src/Propel/Generator/Command/AbstractCommand.php
@@ -79,7 +79,10 @@ protected function parseConnection($connection)
$extras = array();
foreach (explode(';', $dsn) as $element) {
$parts = preg_split('/=/', $element);
- $extras[strtolower($parts[0])] = $parts[1];
+
+ if (2 === count($parts)) {
+ $extras[strtolower($parts[0])] = $parts[1];
+ }
}
return array($name, $dsn, $extras);
View
6 src/Propel/Generator/Platform/SqlitePlatform.php
@@ -165,4 +165,10 @@ public function supportsMigrations()
return false;
}
+ public function getDropTableDDL(Table $table)
+ {
+ return "
+DROP TABLE IF EXISTS " . $table->getName() . ";
+";
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.