/** * @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(); }
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()); }