ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\MetaData\Copyright\Identifiers\HandlerTest Class Reference
+ Inheritance diagram for ILIAS\MetaData\Copyright\Identifiers\HandlerTest:
+ Collaboration diagram for ILIAS\MetaData\Copyright\Identifiers\HandlerTest:

Public Member Functions

 testbuildIdentifierFromEntryID ()
 
 testIsIdentifierValidTrue ()
 
 testIsIdentifierValidFalseWrongFormat ()
 
 testIsIdentifierValidFalseWrongInstID ()
 
 testParseEntryIDFromIdentifier ()
 
 testParseEntryIDFromIdentifierWrongFormat ()
 
 testParseEntryIDFromIdentifierWrongInstID ()
 

Protected Member Functions

 getHandler ()
 

Detailed Description

Definition at line 25 of file HandlerTest.php.

Member Function Documentation

◆ getHandler()

◆ testbuildIdentifierFromEntryID()

ILIAS\MetaData\Copyright\Identifiers\HandlerTest::testbuildIdentifierFromEntryID ( )

Definition at line 37 of file HandlerTest.php.

References $handler, and ILIAS\MetaData\Copyright\Identifiers\HandlerTest\getHandler().

37  : void
38  {
39  $handler = $this->getHandler();
40 
41  $identifier = $handler->buildIdentifierFromEntryID(32);
42 
43  $this->assertSame(
44  'il_copyright_entry__1234__32',
45  $identifier
46  );
47  }
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testIsIdentifierValidFalseWrongFormat()

ILIAS\MetaData\Copyright\Identifiers\HandlerTest::testIsIdentifierValidFalseWrongFormat ( )

Definition at line 58 of file HandlerTest.php.

References $handler, and ILIAS\MetaData\Copyright\Identifiers\HandlerTest\getHandler().

58  : void
59  {
60  $handler = $this->getHandler();
61 
62  $this->assertFalse(
63  $handler->isIdentifierValid('invalid string')
64  );
65  }
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testIsIdentifierValidFalseWrongInstID()

ILIAS\MetaData\Copyright\Identifiers\HandlerTest::testIsIdentifierValidFalseWrongInstID ( )

Definition at line 67 of file HandlerTest.php.

References $handler, and ILIAS\MetaData\Copyright\Identifiers\HandlerTest\getHandler().

67  : void
68  {
69  $handler = $this->getHandler();
70 
71  $this->assertFalse(
72  $handler->isIdentifierValid('il_copyright_entry__999__32')
73  );
74  }
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testIsIdentifierValidTrue()

ILIAS\MetaData\Copyright\Identifiers\HandlerTest::testIsIdentifierValidTrue ( )

Definition at line 49 of file HandlerTest.php.

References $handler, and ILIAS\MetaData\Copyright\Identifiers\HandlerTest\getHandler().

49  : void
50  {
51  $handler = $this->getHandler();
52 
53  $this->assertTrue(
54  $handler->isIdentifierValid('il_copyright_entry__1234__32')
55  );
56  }
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testParseEntryIDFromIdentifier()

ILIAS\MetaData\Copyright\Identifiers\HandlerTest::testParseEntryIDFromIdentifier ( )

Definition at line 76 of file HandlerTest.php.

References $handler, and ILIAS\MetaData\Copyright\Identifiers\HandlerTest\getHandler().

76  : void
77  {
78  $handler = $this->getHandler();
79 
80  $entry_id = $handler->parseEntryIDFromIdentifier('il_copyright_entry__1234__32');
81 
82  $this->assertSame(32, $entry_id);
83  }
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testParseEntryIDFromIdentifierWrongFormat()

ILIAS\MetaData\Copyright\Identifiers\HandlerTest::testParseEntryIDFromIdentifierWrongFormat ( )

Definition at line 85 of file HandlerTest.php.

References $handler, and ILIAS\MetaData\Copyright\Identifiers\HandlerTest\getHandler().

85  : void
86  {
87  $handler = $this->getHandler();
88 
89  $entry_id = $handler->parseEntryIDFromIdentifier('invalid string');
90 
91  $this->assertSame(0, $entry_id);
92  }
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testParseEntryIDFromIdentifierWrongInstID()

ILIAS\MetaData\Copyright\Identifiers\HandlerTest::testParseEntryIDFromIdentifierWrongInstID ( )

Definition at line 94 of file HandlerTest.php.

References $handler, and ILIAS\MetaData\Copyright\Identifiers\HandlerTest\getHandler().

94  : void
95  {
96  $handler = $this->getHandler();
97 
98  $entry_id = $handler->parseEntryIDFromIdentifier('il_copyright_entry__999__32');
99 
100  $this->assertSame(0, $entry_id);
101  }
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: