// /** * Created by PhpStorm. * User: Eric * Date: 02/10/2017 * Time: 13:58 */ namespace Combodo\iTop\Test\UnitTest\Core; use Combodo\iTop\Test\UnitTest\ItopDataTestCase; use DBObject; use MetaModel; /** * @group specificOrgInSampleData * * @runTestsInSeparateProcesses * @preserveGlobalState disabled * @backupGlobals disabled */ class XMLDataLoaderTest extends ItopDataTestCase { const CREATE_TEST_ORG = true; public function testDataLoader() { $sXML = << ZuperTest active 0 no 0 ZuperTest no Zanzibar active 71 ZuperTest ZuperTest no
Zanzibar no
Zmillpatt active 71 ZuperTest ZuperTest no yes Zacharie 4 Zanzibar Zanzibar no 0 no Person Zacharie Zmillpatt no
XML; $this->CreateFromXMLString($sXML); $oPerson = MetaModel::GetObjectByName('Person', 'Zacharie Zmillpatt'); $this->assertEquals('Zanzibar', $oPerson->Get('location_id_friendlyname')); $this->assertEquals('ZuperTest', $oPerson->Get('org_id_friendlyname')); } }