Merge branch 'support/2.7' into develop

# Conflicts:
#	README.md
#	composer.json
#	composer.lock
#	core/cmdbsource.class.inc.php
#	core/dbobject.class.php
#	datamodels/2.x/combodo-db-tools/db_analyzer.class.inc.php
#	datamodels/2.x/combodo-db-tools/dbtools.php
#	datamodels/2.x/combodo-db-tools/dictionaries/zh_cn.dict.combodo-db-tools.php
#	datamodels/2.x/itop-attachments/dictionaries/zh_cn.dict.itop-attachments.php
#	datamodels/2.x/itop-core-update/dictionaries/zh_cn.dict.itop-core-update.php
#	dictionaries/zh_cn.dictionary.itop.core.php
#	dictionaries/zh_cn.dictionary.itop.ui.php
#	lib/composer/InstalledVersions.php
#	lib/composer/autoload_classmap.php
#	lib/composer/autoload_static.php
#	lib/composer/installed.php
#	lib/composer/platform_check.php
#	pages/ajax.render.php
#	pages/csvimport.php
#	setup/ajax.dataloader.php
#	setup/index.php
#	setup/setuputils.class.inc.php
#	test/application/UtilsTest.php
This commit is contained in:
Pierre Goiffon
2021-06-14 16:19:56 +02:00
65 changed files with 3743 additions and 3485 deletions

View File

@@ -208,16 +208,16 @@ class OQLTest extends ItopDataTestCase
public function BadQueryProvider()
{
return array(
array('SELECT toto WHERE toto.a = (3++1)', 'OQLParserException'),
array('SELECT toto WHHHERE toto.a = "1"', 'OQLParserException'),
array('SELECT toto WHERE toto.a == "1"', 'OQLParserException'),
array('SELECT toto WHERE toto.a = (3++1)', 'OQLParserSyntaxErrorException'),
array('SELECT toto WHHHERE toto.a = "1"', 'OQLParserSyntaxErrorException'),
array('SELECT toto WHERE toto.a == "1"', 'OQLParserSyntaxErrorException'),
array('SELECT toto WHERE toto.a % 1', 'Exception'),
array('SELECT toto WHERE toto.a like \'arg\'', 'OQLParserException'),
array('SELECT toto WHERE toto.a NOT LIKE "That\'s "it""', 'OQLParserException'),
array('SELECT toto WHERE toto.a NOT LIKE \'That\'s it\'', 'OQLParserException'),
array('SELECT toto WHERE toto.a like \'arg\'', 'OQLParserSyntaxErrorException'),
array('SELECT toto WHERE toto.a NOT LIKE "That\'s "it""', 'OQLParserSyntaxErrorException'),
array('SELECT toto WHERE toto.a NOT LIKE \'That\'s it\'', 'OQLParserSyntaxErrorException'),
array('SELECT toto WHERE toto.a NOT LIKE "blah \\ truc"', 'Exception'),
array('SELECT toto WHERE toto.a NOT LIKE \'blah \\ truc\'', 'Exception'),
array('SELECT A JOIN B ON A.myB = B.id JOIN C ON C.parent_id = B.id WHERE A.col1 BELOW 2 AND B.id = 3', 'OQLParserException'),
array('SELECT A JOIN B ON A.myB = B.id JOIN C ON C.parent_id = B.id WHERE A.col1 BELOW 2 AND B.id = 3', 'OQLParserSyntaxErrorException'),
);
}