Unit tests for tree table.
More...
Protected Member Functions |
| setUp () |
Detailed Description
Unit tests for tree table.
- Author
- Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
- Version
- $Id$
Definition at line 33 of file ilMDTest.php.
Member Function Documentation
Definition at line 37 of file ilMDTest.php.
{
include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
ilUnitUtil::performInitialisation();
}
ilMDTest::testAnnotation |
( |
| ) |
|
test annotation
- Parameters
-
Definition at line 88 of file ilMDTest.php.
References $ret.
{
include_once './Services/MetaData/classes/class.ilMDAnnotation.php';
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
$ann->setDescription("desc");
$ann->setEntity('ent');
$ann->setDate('date');
$this->assertGreaterThan(0,
$ret);
$ann->setDescription('desc2');
$ann->update();
$ann->read();
$desc = $ann->getDescription();
$this->assertEquals('desc2',$desc);
$ann->delete();
}
ilMDTest::testClassification |
( |
| ) |
|
test classification
- Parameters
-
Definition at line 115 of file ilMDTest.php.
References $ret.
{
include_once './Services/MetaData/classes/class.ilMDClassification.php';
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
$ann->setDescription("desc");
$ann->setPurpose('purp');
$this->assertGreaterThan(0,
$ret);
$ann->setDescription('desc2');
$ann->update();
$ann->read();
$desc = $ann->getDescription();
$this->assertEquals('desc2',$desc);
$ann->delete();
}
ilMDTest::testContribute |
( |
| ) |
|
test contribute
- Returns
Definition at line 140 of file ilMDTest.php.
References $ret.
{
include_once './Services/MetaData/classes/class.ilMDContribute.php';
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
$con->setDate('date');
$con->setRole('ScriptWriter');
$this->assertGreaterThan(0,
$ret);
$con->setDate('desc2');
$con->update();
$con->read();
$desc = $con->getDate();
$this->assertEquals('desc2',$desc);
$con->delete();
}
ilMDTest::testCopyright |
( |
| ) |
|
- Parameters
-
Definition at line 48 of file ilMDTest.php.
References $ret.
{
include_once './Services/MetaData/classes/class.ilMDCopyrightSelectionEntry.php';
$cpr->setTitle("1");
$cpr->setDescription("2");
$cpr->setLanguage('en');
$cpr->setCopyright("3");
$cpr->setCosts(true);
$cpr->add();
$entry = $cpr->getEntryId();
$this->assertGreaterThan(0,$entry);
$this->assertEquals(
$ret,
'1');
$ret = $cpr->getDescription();
$this->assertEquals(
$ret,
'2');
$ret = $cpr->getCopyright();
$this->assertEquals(
$ret,
'3');
$ret = $cpr->getLanguage();
$this->assertEquals(
$ret,
'en');
$cpr->setTitle('11');
$cpr->update();
$cpr->delete();
}
ilMDTest::testDescription |
( |
| ) |
|
test Description
- Returns
Definition at line 164 of file ilMDTest.php.
References $ret.
{
include_once './Services/MetaData/classes/class.ilMDDescription.php';
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
$con->setDescription('date');
$this->assertGreaterThan(0,
$ret);
$con->setDescription('desc2');
$con->update();
$con->read();
$desc = $con->getDescription();
$this->assertEquals('desc2',$desc);
$con->delete();
}
ilMDTest::testEducational |
( |
| ) |
|
test Educational
- Returns
Definition at line 188 of file ilMDTest.php.
References $ret.
{
include_once './Services/MetaData/classes/class.ilMDEducational.php';
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
$con->setDifficulty('Easy');
$this->assertGreaterThan(0,
$ret);
$con->setDifficulty('Medium');
$con->update();
$con->read();
$desc = $con->getDifficulty();
$this->assertEquals('Medium',$desc);
$con->delete();
}
test Entity
- Returns
Definition at line 211 of file ilMDTest.php.
References $ret.
{
include_once './Services/MetaData/classes/class.ilMDEntity.php';
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
$con->setEntity('Easy');
$this->assertGreaterThan(0,
$ret);
$con->setEntity('Medium');
$con->update();
$con->read();
$desc = $con->getEntity();
$this->assertEquals('Medium',$desc);
$con->delete();
}
test Format
- Returns
Definition at line 234 of file ilMDTest.php.
References $ret.
{
include_once './Services/MetaData/classes/class.ilMDFormat.php';
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
$con->setFormat('Easy');
$this->assertGreaterThan(0,
$ret);
$con->setFormat('Medium');
$con->update();
$con->read();
$desc = $con->getFormat();
$this->assertEquals('Medium',$desc);
$con->delete();
}
ilMDTest::testGeneral |
( |
| ) |
|
test General
- Returns
Definition at line 257 of file ilMDTest.php.
References $ret.
{
include_once './Services/MetaData/classes/class.ilMDGeneral.php';
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
$con->setCoverage('Easy');
$this->assertGreaterThan(0,
$ret);
$con->setCoverage('Medium');
$con->update();
$con->read();
$desc = $con->getCoverage();
$this->assertEquals('Medium',$desc);
$con->delete();
}
ilMDTest::testIdentifier |
( |
| ) |
|
test Identifier
- Returns
Definition at line 280 of file ilMDTest.php.
References $ret.
{
include_once './Services/MetaData/classes/class.ilMDIdentifier.php';
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
$con->setCatalog('Easy');
$this->assertGreaterThan(0,
$ret);
$con->setCatalog('Medium');
$con->update();
$con->read();
$desc = $con->getCatalog();
$this->assertEquals('Medium',$desc);
$con->delete();
}
ilMDTest::testIdentifier_ |
( |
| ) |
|
test Identifier_
- Returns
Definition at line 303 of file ilMDTest.php.
References $ret.
{
include_once './Services/MetaData/classes/class.ilMDIdentifier_.php';
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
$con->setCatalog('Easy');
$this->assertGreaterThan(0,
$ret);
$con->setCatalog('Medium');
$con->update();
$con->read();
$desc = $con->getCatalog();
$this->assertEquals('Medium',$desc);
$con->delete();
}
ilMDTest::testKeyword |
( |
| ) |
|
test Keyword
- Returns
Definition at line 326 of file ilMDTest.php.
References $ret.
{
include_once './Services/MetaData/classes/class.ilMDKeyword.php';
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
$con->setKeyword('Easy');
$this->assertGreaterThan(0,
$ret);
$con->setKeyword('Medium');
$con->update();
$con->read();
$desc = $con->getKeyword();
$this->assertEquals('Medium',$desc);
$con->delete();
}
ilMDTest::testLanguage |
( |
| ) |
|
test Language
- Returns
Definition at line 349 of file ilMDTest.php.
References $ret.
{
include_once './Services/MetaData/classes/class.ilMDLanguage.php';
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
$this->assertGreaterThan(0,
$ret);
$con->update();
$con->read();
$desc = $con->getLanguageCode();
$this->assertEquals('de',$desc);
$con->delete();
}
ilMDTest::testLifecycle |
( |
| ) |
|
test lifecycle
- Returns
Definition at line 372 of file ilMDTest.php.
References $ret.
{
include_once './Services/MetaData/classes/class.ilMDLifecycle.php';
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
$con->setVersion(1);
$this->assertGreaterThan(0,
$ret);
$con->setVersion(2);
$con->update();
$con->read();
$desc = $con->getVersion();
$this->assertEquals(2,$desc);
$con->delete();
}
ilMDTest::testLocation |
( |
| ) |
|
test Location
- Returns
Definition at line 395 of file ilMDTest.php.
References $ret.
{
include_once './Services/MetaData/classes/class.ilMDLocation.php';
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
$con->setLocation(1);
$this->assertGreaterThan(0,
$ret);
$con->setLocation(2);
$con->update();
$con->read();
$desc = $con->getLocation();
$this->assertEquals(2,$desc);
$con->delete();
}
ilMDTest::testMetaMetadata |
( |
| ) |
|
test MetaData
- Returns
Definition at line 418 of file ilMDTest.php.
References $ret.
{
include_once './Services/MetaData/classes/class.ilMDMetaMetadata.php';
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
$con->setMetaDataScheme(1);
$this->assertGreaterThan(0,
$ret);
$con->setMetaDataScheme(2);
$con->update();
$con->read();
$desc = $con->getMetaDataScheme();
$this->assertEquals('LOM v 1.0',$desc);
$con->delete();
}
ilMDTest::testRelation |
( |
| ) |
|
test MetaData
- Returns
Definition at line 441 of file ilMDTest.php.
References $ret.
{
include_once './Services/MetaData/classes/class.ilMDRelation.php';
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
$con->setKind('IsVersionOf');
$this->assertGreaterThan(0,
$ret);
$con->setKind('HasVersion');
$con->update();
$con->read();
$desc = $con->getKind();
$this->assertEquals('HasVersion',$desc);
$con->delete();
}
ilMDTest::testRequirement |
( |
| ) |
|
test MetaData
- Returns
Definition at line 464 of file ilMDTest.php.
References $ret.
{
include_once './Services/MetaData/classes/class.ilMDRequirement.php';
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
$con->setBrowserName('Amaya');
$this->assertGreaterThan(0,
$ret);
$con->setBrowserName('Opera');
$con->update();
$con->read();
$desc = $con->getBrowserName();
$this->assertEquals('Opera',$desc);
$con->delete();
}
test MetaData
- Returns
Definition at line 487 of file ilMDTest.php.
References $ret.
{
include_once './Services/MetaData/classes/class.ilMDRights.php';
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
$con->setDescription('Amaya');
$this->assertGreaterThan(0,
$ret);
$con->setDescription('Opera');
$con->update();
$con->read();
$desc = $con->getDescription();
$this->assertEquals('Opera',$desc);
$con->delete();
}
test MetaData
- Returns
Definition at line 510 of file ilMDTest.php.
References $ret.
{
include_once './Services/MetaData/classes/class.ilMDTaxon.php';
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
$con->setTaxon('Amaya');
$this->assertGreaterThan(0,
$ret);
$con->setTaxon('Opera');
$con->update();
$con->read();
$desc = $con->getTaxon();
$this->assertEquals('Opera',$desc);
$con->delete();
}
ilMDTest::testTaxonPath |
( |
| ) |
|
test MetaData
- Returns
Definition at line 533 of file ilMDTest.php.
References $ret.
{
include_once './Services/MetaData/classes/class.ilMDTaxonPath.php';
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
$con->setSource('Amaya');
$this->assertGreaterThan(0,
$ret);
$con->setSource('Opera');
$con->update();
$con->read();
$desc = $con->getSource();
$this->assertEquals('Opera',$desc);
$con->delete();
}
ilMDTest::testTechnical |
( |
| ) |
|
test MetaData
- Returns
Definition at line 556 of file ilMDTest.php.
References $ret.
{
include_once './Services/MetaData/classes/class.ilMDTechnical.php';
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
$con->setSize('Amaya');
$this->assertGreaterThan(0,
$ret);
$con->setSize('Opera');
$con->update();
$con->read();
$desc = $con->getSize();
$this->assertEquals('Opera',$desc);
$con->delete();
}
ilMDTest::testTypicalAgeRange |
( |
| ) |
|
test MetaData
- Returns
Definition at line 579 of file ilMDTest.php.
References $ret.
{
include_once './Services/MetaData/classes/class.ilMDTypicalAgeRange.php';
include_once 'Services/MetaData/classes/class.ilMDLanguageItem.php';
$con->setTypicalAgeRange('12-22');
$this->assertGreaterThan(0,
$ret);
$con->setTypicalAgeRange('12-14');
$con->update();
$con->read();
$desc = $con->getTypicalAgeRange();
$this->assertEquals('12-14',$desc);
$con->delete();
}
Field Documentation
ilMDTest::$backupGlobals = FALSE |
|
protected |
The documentation for this class was generated from the following file: