2
0
forked from Wavyzz/dolibarr

Enhance sql quality. Refused double quotes into sql content.

This commit is contained in:
Laurent Destailleur
2017-06-20 10:06:17 +02:00
parent 74c509eac8
commit 095155a58b
9 changed files with 13 additions and 9 deletions

View File

@@ -160,6 +160,10 @@ class CodingSqlTest extends PHPUnit_Framework_TestCase
print __METHOD__." Result for checking we don't have back quote = ".$result."\n";
$this->assertTrue($result===false, 'Found back quote into '.$file.'. Bad.');
$result=strpos($filecontent,'"');
print __METHOD__." Result for checking we don't have double quote = ".$result."\n";
$this->assertTrue($result===false, 'Found double quote into '.$file.'. Bad.');
$result=strpos($filecontent,'int(');
print __METHOD__." Result for checking we don't have 'int(' instead of 'integer' = ".$result."\n";
$this->assertTrue($result===false, 'Found int(x) or tinyint(x) instead of integer or tinyint into '.$file.'. Bad.');