Unit tests for tree table.
More...
Unit tests for tree table.
- Author
- Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
- Version
- $Id$
needsInstalledILIAS
Definition at line 33 of file ilMDTest.php.
◆ setUp()
Definition at line 37 of file ilMDTest.php.
39 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
40 ilUnitUtil::performInitialisation();
◆ testAnnotation()
ilMDTest::testAnnotation |
( |
| ) |
|
test annotation IL_Init
- Parameters
-
Definition at line 89 of file ilMDTest.php.
References $ret.
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);
◆ testClassification()
ilMDTest::testClassification |
( |
| ) |
|
test classification IL_Init
- Parameters
-
Definition at line 117 of file ilMDTest.php.
References $ret.
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);
◆ testContribute()
ilMDTest::testContribute |
( |
| ) |
|
test contribute IL_Init
- Returns
Definition at line 143 of file ilMDTest.php.
References $ret.
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);
◆ testCopyright()
ilMDTest::testCopyright |
( |
| ) |
|
IL_Init
- Parameters
-
Definition at line 48 of file ilMDTest.php.
References $ret.
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');
◆ testDescription()
ilMDTest::testDescription |
( |
| ) |
|
test Description IL_Init
- Returns
Definition at line 168 of file ilMDTest.php.
References $ret.
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);
◆ testEducational()
ilMDTest::testEducational |
( |
| ) |
|
test Educational IL_Init
- Returns
Definition at line 193 of file ilMDTest.php.
References $ret.
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);
◆ testEntity()
test Entity IL_Init
- Returns
Definition at line 217 of file ilMDTest.php.
References $ret.
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);
◆ testFormat()
test Format IL_Init
- Returns
Definition at line 241 of file ilMDTest.php.
References $ret.
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);
◆ testGeneral()
ilMDTest::testGeneral |
( |
| ) |
|
test General IL_Init
- Returns
Definition at line 265 of file ilMDTest.php.
References $ret.
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);
◆ testIdentifier()
ilMDTest::testIdentifier |
( |
| ) |
|
test Identifier IL_Init
- Returns
Definition at line 289 of file ilMDTest.php.
References $ret.
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);
◆ testIdentifier_()
ilMDTest::testIdentifier_ |
( |
| ) |
|
test Identifier_ IL_Init
- Returns
Definition at line 313 of file ilMDTest.php.
References $ret.
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);
◆ testKeyword()
ilMDTest::testKeyword |
( |
| ) |
|
test Keyword IL_Init
- Returns
Definition at line 337 of file ilMDTest.php.
References $ret.
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);
◆ testLanguage()
ilMDTest::testLanguage |
( |
| ) |
|
test Language IL_Init
- Returns
Definition at line 361 of file ilMDTest.php.
References $ret.
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);
◆ testLifecycle()
ilMDTest::testLifecycle |
( |
| ) |
|
test lifecycle IL_Init
- Returns
Definition at line 385 of file ilMDTest.php.
References $ret.
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);
◆ testLocation()
ilMDTest::testLocation |
( |
| ) |
|
test Location IL_Init
- Returns
Definition at line 409 of file ilMDTest.php.
References $ret.
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);
◆ testMetaMetadata()
ilMDTest::testMetaMetadata |
( |
| ) |
|
test MetaData IL_Init
- Returns
Definition at line 433 of file ilMDTest.php.
References $ret.
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);
◆ testRelation()
ilMDTest::testRelation |
( |
| ) |
|
test MetaData IL_Init
- Returns
Definition at line 457 of file ilMDTest.php.
References $ret.
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);
◆ testRequirement()
ilMDTest::testRequirement |
( |
| ) |
|
test MetaData IL_Init
- Returns
Definition at line 481 of file ilMDTest.php.
References $ret.
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);
◆ testRights()
test MetaData IL_Init
- Returns
Definition at line 505 of file ilMDTest.php.
References $ret.
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);
◆ testTaxon()
test MetaData IL_Init
- Returns
Definition at line 529 of file ilMDTest.php.
References $ret.
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);
◆ testTaxonPath()
ilMDTest::testTaxonPath |
( |
| ) |
|
test MetaData IL_Init
- Returns
Definition at line 553 of file ilMDTest.php.
References $ret.
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);
◆ testTechnical()
ilMDTest::testTechnical |
( |
| ) |
|
test MetaData IL_Init
- Returns
Definition at line 577 of file ilMDTest.php.
References $ret.
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);
◆ testTypicalAgeRange()
ilMDTest::testTypicalAgeRange |
( |
| ) |
|
test MetaData IL_Init
- Returns
Definition at line 601 of file ilMDTest.php.
References $ret.
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);
◆ $backupGlobals
ilMDTest::$backupGlobals = FALSE |
|
protected |
The documentation for this class was generated from the following file: