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 IL_Init
- Parameters
-
Definition at line 89 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 IL_Init
- Parameters
-
Definition at line 117 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 IL_Init
- Returns
Definition at line 143 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 |
( |
| ) |
|
IL_Init
- 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 IL_Init
- Returns
Definition at line 168 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 IL_Init
- Returns
Definition at line 193 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 IL_Init
- Returns
Definition at line 217 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 IL_Init
- Returns
Definition at line 241 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 IL_Init
- Returns
Definition at line 265 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 IL_Init
- Returns
Definition at line 289 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_ IL_Init
- Returns
Definition at line 313 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 IL_Init
- Returns
Definition at line 337 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 IL_Init
- Returns
Definition at line 361 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 IL_Init
- Returns
Definition at line 385 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 IL_Init
- Returns
Definition at line 409 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 IL_Init
- Returns
Definition at line 433 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 IL_Init
- Returns
Definition at line 457 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 IL_Init
- Returns
Definition at line 481 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 IL_Init
- Returns
Definition at line 505 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 IL_Init
- Returns
Definition at line 529 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 IL_Init
- Returns
Definition at line 553 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 IL_Init
- Returns
Definition at line 577 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 IL_Init
- Returns
Definition at line 601 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: