Added unit tests for Table, TableTag and TablesTag classes.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0-DB@8566 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ucorina 2011-07-05 19:52:27 +00:00
parent d248d70773
commit 7112d518c8
7 changed files with 178 additions and 4 deletions

View file

@ -1,14 +1,17 @@
<?php
class Helper {
static function cleanQuery($query){
static function cleanString($query){
$query = trim(preg_replace('/\s+/', ' ',$query));
$query = preg_replace('/\t+/', '',$query);
$query = str_replace(" , ", ', ', $query);
$query = str_replace(" ,", ',', $query);
$query = str_replace("( ", '(', $query);
$query = str_replace(" )", ')', $query);
$query = str_replace(array("\r", "\r\n", "\n"), '*', $query);
$query = strtolower($query);
return $query;
}
}
static function getXmlObject($xml_file){
$xmlParser = XmlQueryParser::getInstance();