mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 15:34:12 +01:00
URL containing ":" in their path were rejected. This caused problems with some URL from Alfresco or Sharepoint... The default regexp used by AttributeURL was updated to avoid this. Warning, check your config to see if you have any custom regexp configured (`url_validation_pattern` config parameter) ! Also a test was added to document the default regexp.
32 lines
870 B
PHP
32 lines
870 B
PHP
<?php
|
|
|
|
namespace Combodo\iTop\Test\UnitTest\Core;
|
|
|
|
use CMDBSource;
|
|
use Combodo\iTop\Test\UnitTest\ItopDataTestCase;
|
|
use MetaModel;
|
|
|
|
/**
|
|
* @runTestsInSeparateProcesses
|
|
* @preserveGlobalState disabled
|
|
* @backupGlobals disabled
|
|
*/
|
|
class AttributeDefTest extends ItopDataTestCase {
|
|
const CREATE_TEST_ORG = true;
|
|
|
|
protected function setUp() {
|
|
parent::setUp();
|
|
require_once(APPROOT.'core/attributedef.class.inc.php');
|
|
|
|
}
|
|
|
|
public function testGetImportColumns(){
|
|
$oAttributeDefinition = MetaModel::GetAttributeDef("ApplicationSolution", "status");
|
|
$aImportColumns = $oAttributeDefinition->GetImportColumns();
|
|
var_dump($aImportColumns);
|
|
|
|
$this->assertTrue(is_array($aImportColumns), var_export($aImportColumns, true));
|
|
$this->assertEquals(["status" => "ENUM('active','inactive') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"],
|
|
$aImportColumns);
|
|
}
|
|
} |