public function testPassExtraConfigProperties()
 {
     $extraConf = array('propel' => array('runtime' => array('defaultConnection' => 'fakeConn', 'connections' => array('fakeConn', 'default')), 'paths' => array('composerDir' => 'path/to/composer')));
     $generatorConfig = new QuickGeneratorConfig($extraConf);
     $this->assertEquals('path/to/composer', $generatorConfig->get()['paths']['composerDir']);
     $this->assertEquals('fakeConn', $generatorConfig->get()['runtime']['defaultConnection']);
     $this->assertEquals(array('fakeConn', 'default'), $generatorConfig->get()['runtime']['connections']);
     $this->assertEquals(array('adapter' => 'sqlite', 'classname' => 'Propel\\Runtime\\Connection\\DebugPDO', 'dsn' => 'sqlite::memory:', 'user' => '', 'password' => ''), $generatorConfig->get()['database']['connections']['default']);
 }
 public function setUp()
 {
     if (!$this->con) {
         require_once __DIR__ . '/../../../../Fixtures/migration/build/conf/migration-conf.php';
         $this->con = Propel::getConnection('migration');
         $adapterClass = Propel::getServiceContainer()->getAdapterClass('migration');
         $this->database = new Database();
         $schemaParserClass = sprintf('\\%s\\%sSchemaParser', 'Propel\\Generator\\Reverse', ucfirst($adapterClass));
         $platformClass = sprintf('\\%s\\%sPlatform', 'Propel\\Generator\\Platform', ucfirst($adapterClass));
         $this->parser = new $schemaParserClass($this->con);
         $this->platform = new $platformClass();
         $generatorConfig = new QuickGeneratorConfig();
         $generatorConfig->setBuildProperty('mysqlTableType', 'InnoDB');
         $this->platform->setGeneratorConfig($generatorConfig);
         $this->parser->setGeneratorConfig(new QuickGeneratorConfig());
         $this->parser->setPlatform($this->platform);
     }
 }
 public function testPassExtraConfigProperties()
 {
     $extraConf = ['propel' => ['database' => ['connections' => ['fakeConn' => ['adapter' => 'sqlite', 'dsn' => 'sqlite:fakeDb.sqlite', 'user' => '', 'password' => '', 'model_paths' => ['src', 'vendor']]]], 'runtime' => ['defaultConnection' => 'fakeConn', 'connections' => ['fakeConn', 'default']], 'paths' => ['composerDir' => 'path/to/composer']]];
     $generatorConfig = new QuickGeneratorConfig($extraConf);
     $this->assertEquals('path/to/composer', $generatorConfig->get()['paths']['composerDir']);
     $this->assertEquals('fakeConn', $generatorConfig->get()['runtime']['defaultConnection']);
     $this->assertEquals(['fakeConn', 'default'], $generatorConfig->get()['runtime']['connections']);
     $this->assertEquals(['adapter' => 'sqlite', 'classname' => '\\Propel\\Runtime\\Connection\\ConnectionWrapper', 'dsn' => 'sqlite:fakeDb.sqlite', 'user' => '', 'password' => '', 'model_paths' => ['src', 'vendor']], $generatorConfig->get()['database']['connections']['fakeConn']);
     $this->assertEquals(['adapter' => 'sqlite', 'classname' => 'Propel\\Runtime\\Connection\\DebugPDO', 'dsn' => 'sqlite::memory:', 'user' => '', 'password' => '', 'model_paths' => ['src', 'vendor']], $generatorConfig->get()['database']['connections']['default']);
 }