public function readDatabase() { $this->database = new Database(); $this->database->setIdentifierQuoting(true); $this->database->setPlatform($this->platform); $this->parser->parse($this->database); }
public function testParse() { $parser = new MysqlSchemaParser(Propel::getServiceContainer()->getConnection('reverse-bookstore')); $parser->setGeneratorConfig(new QuickGeneratorConfig()); $database = new Database(); $database->setPlatform(new DefaultPlatform()); $this->assertEquals(1, $parser->parse($database), 'One table and one view defined should return one as we exclude views'); $tables = $database->getTables(); $this->assertEquals(1, count($tables)); $table = $tables[0]; $this->assertEquals('Book', $table->getPhpName()); $this->assertEquals(4, count($table->getColumns())); }
public function readDatabase() { $this->database = new Database(); $this->database->setPlatform($this->platform); $this->parser->parse($this->database); }