/**
     * @dataProvider logSchemaDataProvider
     */
    public function testModifyTableAddsVersionTableLogColumns($schema)
    {
        $builder = new PropelQuickBuilder();
        $builder->setSchema($schema);
        $expected = <<<EOF
-----------------------------------------------------------------------
-- versionable_behavior_test_0_version
-----------------------------------------------------------------------

DROP TABLE versionable_behavior_test_0_version;

CREATE TABLE versionable_behavior_test_0_version
(
\tid INTEGER NOT NULL,
\tbar INTEGER,
\tversion INTEGER DEFAULT 0 NOT NULL,
\tversion_created_at TIMESTAMP,
\tversion_created_by VARCHAR(100),
\tversion_comment VARCHAR(255),
\tPRIMARY KEY (id,version)
);

-- SQLite does not support foreign keys; this is just for reference
-- FOREIGN KEY (id) REFERENCES versionable_behavior_test_0 (id)
EOF;
        $this->assertContains($expected, $builder->getSQL());
    }
    public function setUp()
    {
        if (!class_exists('ArchivableTest1')) {
            $schema = <<<EOF
<database name="archivable_behavior_test_0">

\t<table name="archivable_test_1">
\t\t<column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" />
\t\t<column name="title" type="VARCHAR" size="100" primaryString="true" />
\t\t<column name="age" type="INTEGER" />
\t\t<column name="foo_id" type="INTEGER" />
\t\t<foreign-key foreignTable="archivable_test_2">
\t\t\t<reference local="foo_id" foreign="id" />
\t\t</foreign-key>
\t\t<index>
\t\t\t<index-column name="title" />
\t\t\t<index-column name="age" />
\t\t</index>
\t\t<behavior name="archivable" />
\t</table>

\t<table name="archivable_test_2">
\t\t<column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" />
\t\t<column name="title" type="VARCHAR" size="100" primaryString="true" />
\t\t<behavior name="archivable" />
\t</table>

\t<table name="archivable_test_2_archive">
\t\t<column name="id" required="true" primaryKey="true" type="INTEGER" />
\t\t<column name="title" type="VARCHAR" size="100" primaryString="true" />
\t</table>

\t<table name="archivable_test_3">
\t\t<column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" />
\t\t<column name="title" type="VARCHAR" size="100" primaryString="true" />
\t\t<column name="age" type="INTEGER" />
\t\t<column name="foo_id" type="INTEGER" />
\t\t<behavior name="archivable">
\t\t\t<parameter name="log_archived_at" value="false" />
\t\t\t<parameter name="archive_table" value="my_old_archivable_test_3" />
\t\t\t<parameter name="archive_on_insert" value="true" />
\t\t\t<parameter name="archive_on_update" value="true" />
\t\t\t<parameter name="archive_on_delete" value="false" />
\t\t</behavior>
\t</table>

\t<table name="archivable_test_4">
\t\t<column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" />
\t\t<column name="title" type="VARCHAR" size="100" primaryString="true" />
\t\t<column name="age" type="INTEGER" />
\t\t<behavior name="archivable">
\t\t\t<parameter name="archive_class" value="FooArchive" />
\t\t</behavior>
\t</table>

</database>
EOF;
            $builder = new PropelQuickBuilder();
            $builder->setSchema($schema);
            self::$generatedSQL = $builder->getSQL();
            $builder->build();
        }
    }
    public function testModiFyTableUsesCustomLocaleDefault()
    {
        $schema = <<<EOF
<database name="i18n_behavior_test_0">
\t<table name="i18n_behavior_test_0">
\t\t<column name="id" primaryKey="true" type="INTEGER" autoIncrement="true" />
\t\t<behavior name="i18n">
\t\t\t<parameter name="default_locale" value="fr_FR" />
\t\t</behavior>
\t</table>
</database>
EOF;
        $builder = new PropelQuickBuilder();
        $builder->setSchema($schema);
        $expected = <<<EOF
-----------------------------------------------------------------------
-- i18n_behavior_test_0_i18n
-----------------------------------------------------------------------

DROP TABLE i18n_behavior_test_0_i18n;

CREATE TABLE i18n_behavior_test_0_i18n
(
\tid INTEGER NOT NULL,
\tlocale VARCHAR(5) DEFAULT 'fr_FR' NOT NULL,
\tPRIMARY KEY (id,locale)
);
EOF;
        $this->assertContains($expected, $builder->getSQL());
    }