39 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
40 ilUnitUtil::performInitialisation();
50 include_once
'./Services/MetaData/classes/class.ilMDCopyrightSelectionEntry.php';
54 $cpr->setDescription(
"2");
55 $cpr->setLanguage(
'en');
56 $cpr->setCopyright(
"3");
61 $entry = $cpr->getEntryId();
62 $this->assertGreaterThan(0,$entry);
65 $ret = $cpr->getTitle();
66 $this->assertEquals(
$ret,
'1');
68 $ret = $cpr->getDescription();
69 $this->assertEquals(
$ret,
'2');
71 $ret = $cpr->getCopyright();
72 $this->assertEquals(
$ret,
'3');
74 $ret = $cpr->getLanguage();
75 $this->assertEquals(
$ret,
'en');
91 include_once
'./Services/MetaData/classes/class.ilMDAnnotation.php';
92 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
95 $ann->setDescription(
"desc");
97 $ann->setEntity(
'ent');
98 $ann->setDate(
'date');
100 $this->assertGreaterThan(0,
$ret);
102 $ann->setDescription(
'desc2');
105 $desc = $ann->getDescription();
106 $this->assertEquals(
'desc2',$desc);
119 include_once
'./Services/MetaData/classes/class.ilMDClassification.php';
120 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
123 $ann->setDescription(
"desc");
125 $ann->setPurpose(
'purp');
127 $this->assertGreaterThan(0,
$ret);
129 $ann->setDescription(
'desc2');
132 $desc = $ann->getDescription();
133 $this->assertEquals(
'desc2',$desc);
145 include_once
'./Services/MetaData/classes/class.ilMDContribute.php';
146 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
149 $con->setDate(
'date');
150 $con->setRole(
'ScriptWriter');
152 $this->assertGreaterThan(0,
$ret);
154 $con->setDate(
'desc2');
157 $desc = $con->getDate();
158 $this->assertEquals(
'desc2',$desc);
170 include_once
'./Services/MetaData/classes/class.ilMDDescription.php';
171 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
174 $con->setDescription(
'date');
177 $this->assertGreaterThan(0,
$ret);
179 $con->setDescription(
'desc2');
182 $desc = $con->getDescription();
183 $this->assertEquals(
'desc2',$desc);
195 include_once
'./Services/MetaData/classes/class.ilMDEducational.php';
196 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
199 $con->setDifficulty(
'Easy');
201 $this->assertGreaterThan(0,
$ret);
203 $con->setDifficulty(
'Medium');
206 $desc = $con->getDifficulty();
207 $this->assertEquals(
'Medium',$desc);
219 include_once
'./Services/MetaData/classes/class.ilMDEntity.php';
220 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
223 $con->setEntity(
'Easy');
225 $this->assertGreaterThan(0,
$ret);
227 $con->setEntity(
'Medium');
230 $desc = $con->getEntity();
231 $this->assertEquals(
'Medium',$desc);
243 include_once
'./Services/MetaData/classes/class.ilMDFormat.php';
244 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
247 $con->setFormat(
'Easy');
249 $this->assertGreaterThan(0,
$ret);
251 $con->setFormat(
'Medium');
254 $desc = $con->getFormat();
255 $this->assertEquals(
'Medium',$desc);
267 include_once
'./Services/MetaData/classes/class.ilMDGeneral.php';
268 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
271 $con->setCoverage(
'Easy');
273 $this->assertGreaterThan(0,
$ret);
275 $con->setCoverage(
'Medium');
278 $desc = $con->getCoverage();
279 $this->assertEquals(
'Medium',$desc);
291 include_once
'./Services/MetaData/classes/class.ilMDIdentifier.php';
292 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
295 $con->setCatalog(
'Easy');
297 $this->assertGreaterThan(0,
$ret);
299 $con->setCatalog(
'Medium');
302 $desc = $con->getCatalog();
303 $this->assertEquals(
'Medium',$desc);
315 include_once
'./Services/MetaData/classes/class.ilMDIdentifier_.php';
316 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
319 $con->setCatalog(
'Easy');
321 $this->assertGreaterThan(0,
$ret);
323 $con->setCatalog(
'Medium');
326 $desc = $con->getCatalog();
327 $this->assertEquals(
'Medium',$desc);
339 include_once
'./Services/MetaData/classes/class.ilMDKeyword.php';
340 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
343 $con->setKeyword(
'Easy');
345 $this->assertGreaterThan(0,
$ret);
347 $con->setKeyword(
'Medium');
350 $desc = $con->getKeyword();
351 $this->assertEquals(
'Medium',$desc);
363 include_once
'./Services/MetaData/classes/class.ilMDLanguage.php';
364 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
369 $this->assertGreaterThan(0,
$ret);
374 $desc = $con->getLanguageCode();
375 $this->assertEquals(
'de',$desc);
387 include_once
'./Services/MetaData/classes/class.ilMDLifecycle.php';
388 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
393 $this->assertGreaterThan(0,
$ret);
398 $desc = $con->getVersion();
399 $this->assertEquals(2,$desc);
411 include_once
'./Services/MetaData/classes/class.ilMDLocation.php';
412 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
415 $con->setLocation(1);
417 $this->assertGreaterThan(0,
$ret);
419 $con->setLocation(2);
422 $desc = $con->getLocation();
423 $this->assertEquals(2,$desc);
435 include_once
'./Services/MetaData/classes/class.ilMDMetaMetadata.php';
436 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
439 $con->setMetaDataScheme(1);
441 $this->assertGreaterThan(0,
$ret);
443 $con->setMetaDataScheme(2);
446 $desc = $con->getMetaDataScheme();
447 $this->assertEquals(
'LOM v 1.0',$desc);
459 include_once
'./Services/MetaData/classes/class.ilMDRelation.php';
460 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
463 $con->setKind(
'IsVersionOf');
465 $this->assertGreaterThan(0,
$ret);
467 $con->setKind(
'HasVersion');
470 $desc = $con->getKind();
471 $this->assertEquals(
'HasVersion',$desc);
483 include_once
'./Services/MetaData/classes/class.ilMDRequirement.php';
484 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
487 $con->setBrowserName(
'Amaya');
489 $this->assertGreaterThan(0,
$ret);
491 $con->setBrowserName(
'Opera');
494 $desc = $con->getBrowserName();
495 $this->assertEquals(
'Opera',$desc);
507 include_once
'./Services/MetaData/classes/class.ilMDRights.php';
508 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
511 $con->setDescription(
'Amaya');
513 $this->assertGreaterThan(0,
$ret);
515 $con->setDescription(
'Opera');
518 $desc = $con->getDescription();
519 $this->assertEquals(
'Opera',$desc);
531 include_once
'./Services/MetaData/classes/class.ilMDTaxon.php';
532 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
535 $con->setTaxon(
'Amaya');
537 $this->assertGreaterThan(0,
$ret);
539 $con->setTaxon(
'Opera');
542 $desc = $con->getTaxon();
543 $this->assertEquals(
'Opera',$desc);
555 include_once
'./Services/MetaData/classes/class.ilMDTaxonPath.php';
556 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
559 $con->setSource(
'Amaya');
561 $this->assertGreaterThan(0,
$ret);
563 $con->setSource(
'Opera');
566 $desc = $con->getSource();
567 $this->assertEquals(
'Opera',$desc);
579 include_once
'./Services/MetaData/classes/class.ilMDTechnical.php';
580 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
583 $con->setSize(
'Amaya');
585 $this->assertGreaterThan(0,
$ret);
587 $con->setSize(
'Opera');
590 $desc = $con->getSize();
591 $this->assertEquals(
'Opera',$desc);
603 include_once
'./Services/MetaData/classes/class.ilMDTypicalAgeRange.php';
604 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
607 $con->setTypicalAgeRange(
'12-22');
609 $this->assertGreaterThan(0,
$ret);
611 $con->setTypicalAgeRange(
'12-14');
614 $desc = $con->getTypicalAgeRange();
615 $this->assertEquals(
'12-14',$desc);