Example #1
0
 /**
  * @param \Itkg\Core\Command\DatabaseUpdate\Query $query
  * @param string $template
  * @return array
  */
 private function process(Query $query, $template)
 {
     if (file_exists($template)) {
         return $this->loader->load($template, $query->getData())->getQueries();
     }
     return array();
 }
Example #2
0
 public function testLoad()
 {
     $loader = new Loader();
     $loader->load(TEST_BASE_DIR . '/data/templates/pre_create_table_template.php', array('identifier' => 'MY_TABLE'));
     $this->assertEquals(array('PRE_CREATE_TEMPLATE MY_TABLE'), $loader->getQueries());
 }