N°3618 - add a (skipped by default) test to prove the bug

just uncomment the two 1st lines in order to use the test.
This commit is contained in:
bruno-ds
2021-01-13 11:12:00 +01:00
parent 574b6609ba
commit 97792ab0b1

View File

@@ -401,4 +401,44 @@ class OQLTest extends ItopDataTestCase
);
}
/**
* @dataProvider bug3618Provider
* @doesNotPerformAssertions
*/
public function testBug3618($sOQL, $sExplanation)
{
$this->markTestSkipped();
return;
if (is_string($sExplanation)) {
$this->debug($sExplanation);
}
$oSearch = DBSearch::FromOQL($sOQL);
$oSet = new \CMDBObjectSet($oSearch);
$oSet->CountWithLimit(1);
}
public function bug3618Provider()
{
return [
'ok' => [
'sOql' => "SELECT UserRequest WHERE private_log LIKE '%FOO : %'
UNION
SELECT Ticket WHERE private_log LIKE '%BAR : %'",
'sExplanation' => null,
],
'KO: different number of columns' => [
'sOql' => "SELECT UserRequest WHERE private_log LIKE '%FOO : %'
UNION
SELECT Ticket ",
'sExplanation' => 'The UNION is composed by two SELECT stmt, the 1st one has two columns the second one has only one column: BOOM!',
],
];
}
}