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 testBuild()
    {
        $schema = <<<EOF
<database name="test_quick_build_2">
\t<table name="quick_build_foo_2">
\t\t<column name="id" primaryKey="true" type="INTEGER" autoIncrement="true" />
\t\t<column name="bar" type="INTEGER" />
\t</table>
</database>
EOF;
        $builder = new PropelQuickBuilder();
        $builder->setSchema($schema);
        $builder->build();
        $this->assertEquals(0, QuickBuildFoo2Query::create()->count());
        $foo = new QuickBuildFoo2();
        $foo->setBar(3);
        $foo->save();
        $this->assertEquals(1, QuickBuildFoo2Query::create()->count());
        $this->assertEquals($foo, QuickBuildFoo2Query::create()->findOne());
    }