Commit 53b05c1d authored by meus's avatar meus

added tests to get complete coverage of Transaction, RawSQL, AuditLog and...

added tests to get complete coverage of Transaction, RawSQL, AuditLog and Query/Having. Related refactorings. Added some getters to be able to test. Also added coverage report for these changes
parent 520f4a10
...@@ -18,7 +18,9 @@ ...@@ -18,7 +18,9 @@
* and is licensed under the LGPL. For more information, see * and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>. * <http://www.phpdoctrine.com>.
*/ */
Doctrine::autoload("Doctrine_Connection_Common"); Doctrine::autoload("Doctrine_Connection_Common");
/** /**
* Doctrine_Connection_Sqlite * Doctrine_Connection_Sqlite
* *
...@@ -46,9 +48,7 @@ class Doctrine_Connection_Sqlite extends Doctrine_Connection_Common ...@@ -46,9 +48,7 @@ class Doctrine_Connection_Sqlite extends Doctrine_Connection_Common
*/ */
public function __construct(Doctrine_Manager $manager, $adapter) public function __construct(Doctrine_Manager $manager, $adapter)
{ {
$this->supported = array('sequences' => 'emulated',
$this->supported = array(
'sequences' => 'emulated',
'indexes' => true, 'indexes' => true,
'affected_rows' => true, 'affected_rows' => true,
'summary_functions' => true, 'summary_functions' => true,
...@@ -67,14 +67,7 @@ class Doctrine_Connection_Sqlite extends Doctrine_Connection_Common ...@@ -67,14 +67,7 @@ class Doctrine_Connection_Sqlite extends Doctrine_Connection_Common
'identifier_quoting' => true, 'identifier_quoting' => true,
'pattern_escaping' => false, 'pattern_escaping' => false,
); );
/** parent::__construct($manager, $adapter);
$this->options['base_transaction_name'] = '___php_Doctrine_sqlite_auto_commit_off';
$this->options['fixed_float'] = 0;
$this->options['database_path'] = '';
$this->options['database_extension'] = '';
$this->options['server_version'] = '';
*/
parent::__construct($manager, $adapter);
if ($this->isConnected) { if ($this->isConnected) {
$this->dbh->sqliteCreateFunction('mod', array('Doctrine_Expression_Sqlite', 'modImpl'), 2); $this->dbh->sqliteCreateFunction('mod', array('Doctrine_Expression_Sqlite', 'modImpl'), 2);
...@@ -114,4 +107,4 @@ class Doctrine_Connection_Sqlite extends Doctrine_Connection_Common ...@@ -114,4 +107,4 @@ class Doctrine_Connection_Sqlite extends Doctrine_Connection_Common
{ {
return $name . '.db'; return $name . '.db';
} }
} }
\ No newline at end of file
...@@ -1267,4 +1267,14 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab ...@@ -1267,4 +1267,14 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab
{ {
return Doctrine_Lib::formatSql($this->getQuery()); return Doctrine_Lib::formatSql($this->getQuery());
} }
/**
* Return the parts
*
* @return array The parts
*/
public function getParts()
{
return $this->parts;
}
} }
...@@ -109,4 +109,4 @@ abstract class Doctrine_Query_Condition extends Doctrine_Query_Part ...@@ -109,4 +109,4 @@ abstract class Doctrine_Query_Condition extends Doctrine_Query_Part
return $value; return $value;
} }
} }
\ No newline at end of file
...@@ -78,6 +78,7 @@ class Doctrine_Query_Having extends Doctrine_Query_Condition ...@@ -78,6 +78,7 @@ class Doctrine_Query_Having extends Doctrine_Query_Condition
} }
} }
/** /**
* load * load
* returns the parsed query part * returns the parsed query part
...@@ -87,17 +88,11 @@ class Doctrine_Query_Having extends Doctrine_Query_Condition ...@@ -87,17 +88,11 @@ class Doctrine_Query_Having extends Doctrine_Query_Condition
*/ */
final public function load($having) final public function load($having)
{ {
$e = Doctrine_Tokenizer::bracketExplode($having, ' ', '(', ')'); $tokens = Doctrine_Tokenizer::bracketExplode($having, ' ', '(', ')');
$part = $this->parseAggregateFunction(array_shift($tokens));
$r = array_shift($e); $operator = array_shift($tokens);
$t = explode('(', $r); $value = implode(' ', $tokens);
$part .= ' ' . $operator . ' ' . $value;
$count = count($t); return $part;
$r = $this->parseAggregateFunction($r);
$operator = array_shift($e);
$value = implode(' ', $e);
$r .= ' ' . $operator . ' ' . $value;
return $r;
} }
} }
\ No newline at end of file
...@@ -52,4 +52,4 @@ abstract class Doctrine_Query_Part ...@@ -52,4 +52,4 @@ abstract class Doctrine_Query_Part
{ {
return $this->query; return $this->query;
} }
} }
\ No newline at end of file
...@@ -51,20 +51,31 @@ class Doctrine_RawSql extends Doctrine_Query_Abstract ...@@ -51,20 +51,31 @@ class Doctrine_RawSql extends Doctrine_Query_Abstract
public function parseQueryPart($queryPartName, $queryPart, $append = false) public function parseQueryPart($queryPartName, $queryPart, $append = false)
{ {
if ($queryPartName == 'select') { if ($queryPartName == 'select') {
preg_match_all('/{([^}{]*)}/U', $queryPart, $m); $this->parseSelectFields($queryPart);
return $this;
}
if( ! isset($this->parts[$queryPartName])) {
$this->parts[$queryPartName] = array();
}
$this->fields = $m[1]; if (! $append) {
$this->parts['select'] = array(); $this->parts[$queryPartName] = array($queryPart);
} else { }else {
if ( ! $append) { $this->parts[$queryPartName][] = $queryPart;
$this->parts[$queryPartName] = array($queryPart);
} else {
$this->parts[$queryPartName][] = $queryPart;
}
} }
return $this; return $this;
} }
/**
* Add select parts to fields
*
* @param $queryPart sting The name of the querypart
*/
private function parseSelectFields($queryPart){
preg_match_all('/{([^}{]*)}/U', $queryPart, $m);
$this->fields = $m[1];
$this->parts['select'] = array();
}
/** /**
* parseQuery * parseQuery
* parses an sql query and adds the parts to internal array * parses an sql query and adds the parts to internal array
...@@ -74,46 +85,48 @@ class Doctrine_RawSql extends Doctrine_Query_Abstract ...@@ -74,46 +85,48 @@ class Doctrine_RawSql extends Doctrine_Query_Abstract
*/ */
public function parseQuery($query) public function parseQuery($query)
{ {
preg_match_all('/{([^}{]*)}/U', $query, $m); $this->parseSelectFields($query);
$this->fields = $m[1];
$this->clear(); $this->clear();
$e = Doctrine_Tokenizer::sqlExplode($query,' '); $tokens = Doctrine_Tokenizer::sqlExplode($query,' ');
foreach ($e as $k => $part) { $parts = array();
$low = strtolower($part); foreach ($tokens as $key => $part) {
switch (strtolower($part)) { $partLowerCase = strtolower($part);
switch ($partLowerCase) {
case 'select': case 'select':
case 'from': case 'from':
case 'where': case 'where':
case 'limit': case 'limit':
case 'offset': case 'offset':
case 'having': case 'having':
$p = $low; $type = $partLowerCase;
if ( ! isset($parts[$low])) { if ( ! isset($parts[$partLowerCase])) {
$parts[$low] = array(); $parts[$partLowerCase] = array();
} }
break; break;
case 'order': case 'order':
case 'group': case 'group':
$i = ($k + 1); $i = $key + 1;
if (isset($e[$i]) && strtolower($e[$i]) === 'by') { if (isset($tokens[$i]) && strtolower($tokens[$i]) === 'by') {
$p = $low; $type = $partLowerCase . 'by';
$p .= 'by'; $parts[$type] = array();
$parts[$low . 'by'] = array();
} else { } else {
$parts[$p][] = $part; //not a keyword so we add it to the previous type
$parts[$type][] = $part;
} }
break; break;
case 'by': case 'by':
continue; continue;
default: default:
if ( ! isset($parts[$p][0])) { //not a keyword so we add it to the previous type.
$parts[$p][0] = $part; if ( ! isset($parts[$type][0])) {
$parts[$type][0] = $part;
} else { } else {
$parts[$p][0] .= ' '.$part; // why does this add to index 0 and not append to the
// array. If it had done that one could have used
// parseQueryPart.
$parts[$type][0] .= ' '.$part;
} }
} }
} }
...@@ -283,4 +296,4 @@ class Doctrine_RawSql extends Doctrine_Query_Abstract ...@@ -283,4 +296,4 @@ class Doctrine_RawSql extends Doctrine_Query_Abstract
return $this; return $this;
} }
} }
\ No newline at end of file
...@@ -319,4 +319,4 @@ class Doctrine_Tokenizer ...@@ -319,4 +319,4 @@ class Doctrine_Tokenizer
return $term; return $term;
} }
} }
\ No newline at end of file
...@@ -125,6 +125,16 @@ class Doctrine_Transaction extends Doctrine_Connection_Module ...@@ -125,6 +125,16 @@ class Doctrine_Transaction extends Doctrine_Connection_Module
return true; return true;
} }
/**
* Return the invalid records
*
* @return array An array of invalid records
*/
public function getInvalid(){
return $this->invalid;
}
/** /**
* getTransactionLevel * getTransactionLevel
* get the current transaction nesting level * get the current transaction nesting level
...@@ -436,4 +446,4 @@ class Doctrine_Transaction extends Doctrine_Connection_Module ...@@ -436,4 +446,4 @@ class Doctrine_Transaction extends Doctrine_Connection_Module
{ {
throw new Doctrine_Transaction_Exception('Fetching transaction isolation level not supported by this driver.'); throw new Doctrine_Transaction_Exception('Fetching transaction isolation level not supported by this driver.');
} }
} }
\ No newline at end of file
...@@ -90,4 +90,12 @@ class Doctrine_AuditLog_TestCase extends Doctrine_UnitTestCase ...@@ -90,4 +90,12 @@ class Doctrine_AuditLog_TestCase extends Doctrine_UnitTestCase
$this->pass(); $this->pass();
} }
} }
public function testReturnFalseIfVersionTableExists()
{
$entity = new VersioningTest();
$entity_table = $entity->getTable();
$auditLog = new Doctrine_AuditLog(array("table" => $entity_table));
$this->assertFalse($auditLog->buildDefinition($entity_table));
}
} }
...@@ -56,4 +56,12 @@ class Doctrine_Query_Having_TestCase extends Doctrine_UnitTestCase ...@@ -56,4 +56,12 @@ class Doctrine_Query_Having_TestCase extends Doctrine_UnitTestCase
$q->parseQuery("SELECT CONCAT(u.name, u.loginname) name FROM User u LEFT JOIN u.Phonenumber p HAVING name = 'xx'"); $q->parseQuery("SELECT CONCAT(u.name, u.loginname) name FROM User u LEFT JOIN u.Phonenumber p HAVING name = 'xx'");
} }
public function testReturnFuncIfNumeric()
{
$having = new Doctrine_Query_Having("test");
$part = $having->load("1");
$this->assertEqual("1",trim($part));
}
} }
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
*/ */
class Doctrine_RawSql_TestCase extends Doctrine_UnitTestCase class Doctrine_RawSql_TestCase extends Doctrine_UnitTestCase
{ {
public function testQueryParser() public function testQueryParser()
{ {
$sql = 'SELECT {p.*} FROM photos p'; $sql = 'SELECT {p.*} FROM photos p';
...@@ -248,4 +247,47 @@ class Doctrine_RawSql_TestCase extends Doctrine_UnitTestCase ...@@ -248,4 +247,47 @@ class Doctrine_RawSql_TestCase extends Doctrine_UnitTestCase
$this->assertEqual(count($coll), 3); $this->assertEqual(count($coll), 3);
} }
public function testParseQueryPartShouldAddPartIfNotSelectAndAppend()
{
$query = new Doctrine_Rawsql();
$query->parseQueryPart("test", "test", true);
$parts = $query->getParts();
$this->assertTrue(isset($parts["test"]));
$this->assertTrue(is_array($parts["test"]));
$this->assertTrue(isset($parts["test"][0]));
$this->assertEqual("test", $parts["test"][0]);
}
public function testParseQueryShouldExtractGroupBy()
{
$query = new Doctrine_RawSql();
$query->parseQuery("having group");
$parts = $query->getParts();
$this->assertEqual($parts["having"][0], "group");
}
public function testThrowExceptionIfFieldNameIsOnWrongForm()
{
$query = new Doctrine_RawSql();
$query->parseQueryPart("select", "{test}");
try{
$query->getQuery();
$this->fail("Should throw exception");
}catch(Doctrine_RawSql_Exception $exception){
$this->assertEqual($exception->getMessage(), "All selected fields in Sql query must be in format tableAlias.fieldName");
}
}
public function testThrowExceptionIfAliasDoesNotExist()
{
$query = new Doctrine_RawSql();
$query->parseQueryPart("select", "{test.test}");
try{
$query->getQuery();
$this->fail("Should throw exception");
}catch(Doctrine_RawSql_Exception $exception){
$this->assertEqual($exception->getMessage(), "The associated component for table alias test couldn't be found.");
}
}
} }
...@@ -224,6 +224,15 @@ class Doctrine_Transaction_TestCase extends Doctrine_UnitTestCase ...@@ -224,6 +224,15 @@ class Doctrine_Transaction_TestCase extends Doctrine_UnitTestCase
$this->assertTrue($phonenumber->id > 0); $this->assertTrue($phonenumber->id > 0);
} }
public function testAddDuplicateRecordToTransactionShouldSkipSecond(){
$transaction = new Doctrine_Transaction();
$user = new User();
$transaction->addInvalid($user);
$this->assertEqual(1, count($transaction->getInvalid()));
$transaction->addInvalid($user);
$this->assertEqual(1, count($transaction->getInvalid()));
}
} }
class TransactionListener extends Doctrine_EventListener class TransactionListener extends Doctrine_EventListener
{ {
......
...@@ -247,7 +247,7 @@ ...@@ -247,7 +247,7 @@
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(class_exists($className))&nbsp;{ <td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(class_exists($className))&nbsp;{
</td></tr> </td></tr>
<tr><td>80</td> <tr><td>80</td>
<td class="red">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;false; <td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;false;
</td></tr> </td></tr>
<tr><td>81</td> <tr><td>81</td>
<td class="orange">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <td class="orange">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
......
...@@ -3817,6 +3817,36 @@ ...@@ -3817,6 +3817,36 @@
<td class="orange">&nbsp;&nbsp;&nbsp;&nbsp;} <td class="orange">&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr> </td></tr>
<tr><td>1270</td> <tr><td>1270</td>
<td class="normal">
</td></tr>
<tr><td>1271</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;/**
</td></tr>
<tr><td>1272</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Return&nbsp;the&nbsp;parts
</td></tr>
<tr><td>1273</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*
</td></tr>
<tr><td>1274</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@return&nbsp;array&nbsp;The&nbsp;parts
</td></tr>
<tr><td>1275</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/
</td></tr>
<tr><td>1276</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;getParts()
</td></tr>
<tr><td>1277</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;{
</td></tr>
<tr><td>1278</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;$this-&gt;parts;
</td></tr>
<tr><td>1279</td>
<td class="orange">&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr>
<tr><td>1280</td>
<td class="normal">} <td class="normal">}
</td></tr> </td></tr>
</table></body></html> </table></body></html>
\ No newline at end of file
This diff is collapsed.
...@@ -343,5 +343,6 @@ ...@@ -343,5 +343,6 @@
<td class="orange">&nbsp;&nbsp;&nbsp;&nbsp;} <td class="orange">&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr> </td></tr>
<tr><td>112</td> <tr><td>112</td>
<td class="covered">}</td></tr> <td class="normal">}
</td></tr>
</table></body></html> </table></body></html>
\ No newline at end of file
...@@ -235,7 +235,7 @@ ...@@ -235,7 +235,7 @@
<td class="orange">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;else&nbsp;{ <td class="orange">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;else&nbsp;{
</td></tr> </td></tr>
<tr><td>76</td> <tr><td>76</td>
<td class="red">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;$func; <td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;$func;
</td></tr> </td></tr>
<tr><td>77</td> <tr><td>77</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
...@@ -250,71 +250,57 @@ ...@@ -250,71 +250,57 @@
<td class="normal"> <td class="normal">
</td></tr> </td></tr>
<tr><td>81</td> <tr><td>81</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;/** <td class="normal">
</td></tr> </td></tr>
<tr><td>82</td> <tr><td>82</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;load <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;/**
</td></tr> </td></tr>
<tr><td>83</td> <tr><td>83</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;returns&nbsp;the&nbsp;parsed&nbsp;query&nbsp;part <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;load
</td></tr> </td></tr>
<tr><td>84</td> <tr><td>84</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;returns&nbsp;the&nbsp;parsed&nbsp;query&nbsp;part
</td></tr> </td></tr>
<tr><td>85</td> <tr><td>85</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;string&nbsp;$having <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*
</td></tr> </td></tr>
<tr><td>86</td> <tr><td>86</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@return&nbsp;string <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;string&nbsp;$having
</td></tr> </td></tr>
<tr><td>87</td> <tr><td>87</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/ <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@return&nbsp;string
</td></tr> </td></tr>
<tr><td>88</td> <tr><td>88</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;final&nbsp;public&nbsp;function&nbsp;load($having) <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/
</td></tr> </td></tr>
<tr><td>89</td> <tr><td>89</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;{ <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;final&nbsp;public&nbsp;function&nbsp;load($having)
</td></tr> </td></tr>
<tr><td>90</td> <tr><td>90</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$e&nbsp;=&nbsp;Doctrine_Tokenizer::bracketExplode($having,&nbsp;'&nbsp;',&nbsp;'(',&nbsp;')'); <td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;{
</td></tr> </td></tr>
<tr><td>91</td> <tr><td>91</td>
<td class="normal"> <td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$tokens&nbsp;=&nbsp;Doctrine_Tokenizer::bracketExplode($having,&nbsp;'&nbsp;',&nbsp;'(',&nbsp;')');
</td></tr> </td></tr>
<tr><td>92</td> <tr><td>92</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$r&nbsp;=&nbsp;array_shift($e); <td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$part&nbsp;=&nbsp;$this-&gt;parseAggregateFunction(array_shift($tokens));
</td></tr> </td></tr>
<tr><td>93</td> <tr><td>93</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$t&nbsp;=&nbsp;explode('(',&nbsp;$r); <td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$operator&nbsp;&nbsp;=&nbsp;array_shift($tokens);
</td></tr> </td></tr>
<tr><td>94</td> <tr><td>94</td>
<td class="normal"> <td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;implode('&nbsp;',&nbsp;$tokens);
</td></tr> </td></tr>
<tr><td>95</td> <tr><td>95</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$count&nbsp;=&nbsp;count($t); <td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$part&nbsp;.=&nbsp;'&nbsp;'&nbsp;.&nbsp;$operator&nbsp;.&nbsp;'&nbsp;'&nbsp;.&nbsp;$value;
</td></tr> </td></tr>
<tr><td>96</td> <tr><td>96</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$r&nbsp;=&nbsp;$this-&gt;parseAggregateFunction($r); <td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;$part;
</td></tr> </td></tr>
<tr><td>97</td> <tr><td>97</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$operator&nbsp;&nbsp;=&nbsp;array_shift($e); <td class="orange">&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr> </td></tr>
<tr><td>98</td> <tr><td>98</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;implode('&nbsp;',&nbsp;$e); <td class="normal">}
</td></tr>
<tr><td>99</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$r&nbsp;.=&nbsp;'&nbsp;'&nbsp;.&nbsp;$operator&nbsp;.&nbsp;'&nbsp;'&nbsp;.&nbsp;$value;
</td></tr>
<tr><td>100</td>
<td class="normal">
</td></tr>
<tr><td>101</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;$r;
</td></tr>
<tr><td>102</td>
<td class="orange">&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr> </td></tr>
<tr><td>103</td>
<td class="covered">}</td></tr>
</table></body></html> </table></body></html>
\ No newline at end of file
...@@ -172,5 +172,6 @@ ...@@ -172,5 +172,6 @@
<td class="orange">&nbsp;&nbsp;&nbsp;&nbsp;} <td class="orange">&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr> </td></tr>
<tr><td>55</td> <tr><td>55</td>
<td class="covered">}</td></tr> <td class="normal">}
</td></tr>
</table></body></html> </table></body></html>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
...@@ -973,5 +973,6 @@ ...@@ -973,5 +973,6 @@
<td class="orange">&nbsp;&nbsp;&nbsp;&nbsp;} <td class="orange">&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr> </td></tr>
<tr><td>322</td> <tr><td>322</td>
<td class="covered">}</td></tr> <td class="normal">}
</td></tr>
</table></body></html> </table></body></html>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment