/**
  * Get the Platform object for this class
  *
  * @return Platform
  */
 protected function getPlatform()
 {
     static $platform;
     if (!$platform) {
         $platform = new MysqlPlatform();
         $config = new GeneratorConfig();
         $config->setBuildProperties(array('propel.mysql.tableType' => 'InnoDB'));
         $platform->setGeneratorConfig($config);
     }
     return $platform;
 }
    public function testGetAddTableDDLEngine()
    {
        $schema = <<<EOF
<database name="test" identifierQuoting="true">
    <table name="foo">
        <column name="id" primaryKey="true" type="INTEGER" autoIncrement="true" />
    </table>
</database>
EOF;
        $platform = new MysqlPlatform();
        $platform->setTableEngineKeyword('TYPE');
        $platform->setDefaultTableEngine('MEMORY');
        $xtad = new SchemaReader($platform);
        $appData = $xtad->parseString($schema);
        $table = $appData->getDatabase()->getTable('foo');
        $expected = "\nCREATE TABLE `foo`\n(\n    `id` INTEGER NOT NULL AUTO_INCREMENT,\n    PRIMARY KEY (`id`)\n) TYPE=MEMORY;\n";
        $this->assertEquals($expected, $platform->getAddTableDDL($table));
    }
 /**
  * {@inheritdoc}
  */
 public function getAddTableDDL(Table $table)
 {
     $ret = parent::getAddTableDDL($table);
     if ($this->hasCompositeNumberRangeBehavior($table)) {
         $ret .= $this->createTriggerDDL($table);
     }
     return $ret;
 }