mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
ci: tag some tests with addition annotations to ease exclusion/inclusion mechanism
This commit is contained in:
@@ -528,6 +528,7 @@ class DBSearchTest extends ItopDataTestCase
|
||||
|
||||
/**
|
||||
* @dataProvider GetFirstResultProvider
|
||||
* @group specificOrgInSampleData
|
||||
*
|
||||
* @param string $sOql query to test
|
||||
* @param bool $bMustHaveOneResultMax arg passed to the tested function
|
||||
|
||||
@@ -12,8 +12,9 @@ use utils;
|
||||
|
||||
|
||||
/**
|
||||
* @group getSelectFilterTest
|
||||
* @group getSelectFilterTest
|
||||
* @group sampleDataNeeded
|
||||
* @group specificOrgInSampleData
|
||||
* Class GetSelectFilterTest
|
||||
*
|
||||
* @runTestsInSeparateProcesses
|
||||
@@ -35,9 +36,9 @@ class GetSelectFilterTest extends ItopDataTestCase
|
||||
|
||||
$oRestProfile = MetaModel::GetObjectFromOQL("SELECT URP_Profiles WHERE name = :name", array('name' => 'REST Services User'), true);
|
||||
$oAdminProfile = MetaModel::GetObjectFromOQL("SELECT URP_Profiles WHERE name = :name", array('name' => 'Administrator'), true);
|
||||
|
||||
|
||||
$this->sLogin = "getselectfilter-user-" . date('dmYHis');
|
||||
|
||||
|
||||
// Ensure that we have at least one administrator account
|
||||
if (is_object($oRestProfile) && is_object($oAdminProfile))
|
||||
{
|
||||
@@ -45,7 +46,7 @@ class GetSelectFilterTest extends ItopDataTestCase
|
||||
$this->AddProfileToUser($this->oUser, $oAdminProfile->GetKey());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function testGetSelectFilter()
|
||||
{
|
||||
$oUserRights = new UserRightsProfile();
|
||||
@@ -64,9 +65,9 @@ class GetSelectFilterTest extends ItopDataTestCase
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Default behavior: Administrators, Administrator profile and URP_UserProfile related to administrators are visible
|
||||
// via GetSelectFilter
|
||||
|
||||
|
||||
$oConfig->Set('security.hide_administrators', false);
|
||||
|
||||
|
||||
$oFilterProfiles = $oUserRights->GetSelectFilter($this->oUser, 'URP_Profiles');
|
||||
if ($oFilterProfiles === true)
|
||||
{
|
||||
@@ -83,7 +84,7 @@ class GetSelectFilterTest extends ItopDataTestCase
|
||||
}
|
||||
}
|
||||
$this->assertEquals($bAdminProfileFound, true);
|
||||
|
||||
|
||||
foreach($aUserLocalAncestors as $sUserClass)
|
||||
{
|
||||
$bAdminUserFound = false;
|
||||
@@ -103,7 +104,7 @@ class GetSelectFilterTest extends ItopDataTestCase
|
||||
}
|
||||
$this->assertEquals($bAdminUserFound, true);
|
||||
}
|
||||
|
||||
|
||||
$oFilterLnkProfiles = $oUserRights->GetSelectFilter($this->oUser, 'URP_UserProfile');
|
||||
if ($oFilterLnkProfiles === true)
|
||||
{
|
||||
@@ -160,6 +161,6 @@ class GetSelectFilterTest extends ItopDataTestCase
|
||||
$this->assertNotEquals($oLnk->Get('userid'), $this->oUser->GetKey());
|
||||
$this->assertNotEquals($oLnk->Get('profileid'), 1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user