Fix DBObject::EvaluateExpression() tests

This commit is contained in:
Eric
2021-06-28 16:21:22 +02:00
parent e59d472cec
commit c0fbf0c735
3 changed files with 42 additions and 14 deletions

View File

@@ -295,10 +295,15 @@ class ExpressionEvaluateTest extends iTopDataTestCase
public function ExpressionsWithObjectFieldsProvider()
{
return array(
array('Location', array('name' => 'Grenoble', 'org_id' => 2), 'org_id', 2),
array('Location', array('name' => 'Grenoble', 'org_id' => 2), 'CONCAT(SUBSTR(name, 4), " cause")', 'noble cause'),
);
return [
['URP_UserProfile', ['profileid' => 2], 'friendlyname', ''],
['Location', ['name' => 'Grenoble', 'org_id' => 2], 'name', 'Grenoble'],
['Location', ['name' => 'Grenoble', 'org_id' => 2], 'friendlyname', ''],
['Location', ['name' => 'Grenoble', 'org_id' => 2], 'org_name', ''],
['Location', ['name' => 'Grenoble', 'org_id' => 2], 'org_id_friendlyname', ''],
['Location', ['name' => 'Grenoble', 'org_id' => 2], 'org_id', 2],
['Location', ['name' => 'Grenoble', 'org_id' => 2], 'CONCAT(SUBSTR(name, 4), " cause")', 'noble cause'],
];
}
/**