N°931 fix requirements for AttributeTagSet PhpUnit tests

* itop-kown-error-mgmt module
* creates a FAQCategory if needed
This commit is contained in:
Pierre Goiffon
2018-10-08 11:51:49 +02:00
parent c66b0bea41
commit 0580c71749
2 changed files with 41 additions and 30 deletions

View File

@@ -498,9 +498,17 @@ class ItopDataTestCase extends ItopTestCase
protected function CreateObjectWithTagSet()
{
$oFaqCategory = MetaModel::GetObject('FAQCategory', 1, false);
if (empty($oFaqCategory))
{
$oFaqCategory = $this->createObject('FAQCategory', array(
'name' => 'FAQCategory_phpunit',
));
}
/** @var FAQ $oFaq */
$oFaq = $this->createObject('FAQ', array(
'category_id' => 1,
'category_id' => $oFaqCategory->GetKey(),
'title' => 'FAQ_phpunit',
));
$this->debug("Created {$oFaq->GetName()}");