mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 10:08:45 +02:00
💚 Fix unit tests
This commit is contained in:
@@ -301,11 +301,7 @@ class OQLToSQLAllCLassesTest extends ItopDataTestCase
|
||||
continue;
|
||||
}
|
||||
$sOQL = "SELECT $sClass";
|
||||
$aOrderBy = array();
|
||||
if (MetaModel::IsValidAttCode($sClass, 'friendlyname'))
|
||||
{
|
||||
$aOrderBy["$sClass.friendlyname"] = true;
|
||||
}
|
||||
$aOrderBy = MetaModel::GetOrderByDefault($sClass);
|
||||
$aData[$sOQL] = array($sOQL, $aOrderBy, array(), null, null, 10, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -205,6 +205,11 @@ class OQLToSQLTest extends ItopDataTestCase
|
||||
}
|
||||
|
||||
$oSearch = DBSearch::FromOQL($sOQL);
|
||||
$sClass = $oSearch->GetClass();
|
||||
if (empty($aOrderBy))
|
||||
{
|
||||
$aOrderBy = MetaModel::GetOrderByDefault($sClass);
|
||||
}
|
||||
|
||||
$sSQLCount = $oSearch->MakeSelectQuery($aOrderBy, $aArgs, $aAttToLoad, $aExtendedDataSpec, 0, 0, true);
|
||||
$fStart = $this->GetMicroTime();
|
||||
|
||||
Reference in New Issue
Block a user