ILIAS  trunk Revision v11.0_alpha-1851-ga8564da6fed
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest Class Reference
+ Inheritance diagram for ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest:
+ Collaboration diagram for ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest:

Public Member Functions

 testIsCopyrightSelectionActiveTrue ()
 
 testIsCopyrightSelectionActiveFalse ()
 
 testCopyrightAsString ()
 
 testCopyrightAsStringInactiveCPSelection ()
 
 testCopyrightAsStringInvalidAsIdentifier ()
 
 testCopyrightAsStringEntryIdNotFound ()
 
 testCopyrightForExportInvalidAsIdentifier ()
 
 testCopyrightForExportEntryIdNotFound ()
 
 testCopyrightForExportInactiveCPSelection ()
 
 testCopyrightForExportEmpty ()
 
 testCopyrightForExportHasLink ()
 
 testCopyrightForExportHasFullName ()
 
 testCopyrightForExportHasFullNameAndLink ()
 
 testCopyrightForExportHasNoFullNameOrLink ()
 
 testCopyrightFromExportNoMatches ()
 
 testCopyrightFromExportURLWithNoMatchesShouldBeUnchanged ()
 
 testCopyrightFromExportNoMatchesContainsFullName ()
 
 testCopyrightFromExportInactiveCPSelection ()
 
 testCopyrightFromExportMatchesByFullName ()
 
 testCopyrightFromExportMultipleMatchesByFullName ()
 
 testCopyrightFromExportMatchesByLink ()
 
 testCopyrightFromExportMultipleMatchesByLink ()
 
 testCopyrightFromExportMatchesByLinkButDifferentScheme ()
 

Protected Member Functions

 getURI (string $link)
 
 getCopyrightEntry (int $id, string $full_name, ?string $link, bool $default=false)
 
 getCopyrightRepository (EntryInterface ... $entries)
 
 getIdentifierHandler ()
 
 getSettings (bool $selection_active)
 

Detailed Description

Definition at line 38 of file CopyrightHandlerTest.php.

Member Function Documentation

◆ getCopyrightEntry()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::getCopyrightEntry ( int  $id,
string  $full_name,
?string  $link,
bool  $default = false 
)
protected

Definition at line 47 of file CopyrightHandlerTest.php.

References $id, $url, ILIAS\__construct(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getURI(), ILIAS\GlobalScreen\Provider\id(), ILIAS\Repository\link(), and null.

Referenced by ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightAsString(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightAsStringEntryIdNotFound(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightAsStringInactiveCPSelection(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightAsStringInvalidAsIdentifier(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportEmpty(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportEntryIdNotFound(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportHasFullName(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportHasFullNameAndLink(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportHasLink(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportHasNoFullNameOrLink(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportInactiveCPSelection(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportInvalidAsIdentifier(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportInactiveCPSelection(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportMatchesByFullName(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportMatchesByLink(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportMatchesByLinkButDifferentScheme(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportMultipleMatchesByFullName(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportMultipleMatchesByLink(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportNoMatches(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportNoMatchesContainsFullName(), and ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportURLWithNoMatchesShouldBeUnchanged().

52  : EntryInterface {
53  $url = is_null($link) ? null : $this->getURI($link);
54 
55  return new class ($id, $full_name, $url, $default) extends NullEntry {
56  public function __construct(
57  protected int $id,
58  protected string $full_name,
59  protected ?URI $url,
60  protected bool $default
61  ) {
62  }
63 
64  public function id(): int
65  {
66  return $this->id;
67  }
68 
69  public function isDefault(): bool
70  {
71  return $this->default;
72  }
73 
74  public function copyrightData(): CopyrightDataInterface
75  {
76  return new class ($this->full_name, $this->url) extends NullCopyrightData {
77  public function __construct(
78  protected string $full_name,
79  protected ?URI $url
80  ) {
81  }
82 
83  public function fullName(): string
84  {
85  return $this->full_name;
86  }
87 
88  public function link(): ?URI
89  {
90  return $this->url;
91  }
92  };
93  }
94  };
95  }
$url
Definition: shib_logout.php:66
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
__construct()
Constructor setup ILIAS global object public.
Definition: class.ilias.php:76
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
link(string $caption, string $href, bool $new_viewport=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCopyrightRepository()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::getCopyrightRepository ( EntryInterface ...  $entries)
protected

Definition at line 97 of file CopyrightHandlerTest.php.

References $id, ILIAS\__construct(), and ILIAS\ResourceStorage\Flavour\Machine\DefaultMachines\from().

Referenced by ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightAsString(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightAsStringEntryIdNotFound(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightAsStringInactiveCPSelection(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightAsStringInvalidAsIdentifier(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportEmpty(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportEntryIdNotFound(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportHasFullName(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportHasFullNameAndLink(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportHasLink(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportHasNoFullNameOrLink(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportInactiveCPSelection(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportInvalidAsIdentifier(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportInactiveCPSelection(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportMatchesByFullName(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportMatchesByLink(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportMatchesByLinkButDifferentScheme(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportMultipleMatchesByFullName(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportMultipleMatchesByLink(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportNoMatches(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportNoMatchesContainsFullName(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportURLWithNoMatchesShouldBeUnchanged(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testIsCopyrightSelectionActiveFalse(), and ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testIsCopyrightSelectionActiveTrue().

98  {
99  return new class ($entries) extends NullRepository {
100  public function __construct(protected array $entries)
101  {
102  }
103 
104  public function getAllEntries(): \Generator
105  {
106  yield from $this->entries;
107  }
108 
109  public function getEntry(int $id): EntryInterface
110  {
111  foreach ($this->entries as $entry) {
112  if ($entry->id() === $id) {
113  return $entry;
114  }
115  }
116  return new NullEntry();
117  }
118 
119  public function getDefaultEntry(): EntryInterface
120  {
121  foreach ($this->entries as $entry) {
122  if ($entry->isDefault()) {
123  return $entry;
124  }
125  }
126  return new NullEntry();
127  }
128  };
129  }
__construct()
Constructor setup ILIAS global object public.
Definition: class.ilias.php:76
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getIdentifierHandler()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::getIdentifierHandler ( )
protected

Definition at line 131 of file CopyrightHandlerTest.php.

Referenced by ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightAsString(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightAsStringEntryIdNotFound(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightAsStringInactiveCPSelection(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightAsStringInvalidAsIdentifier(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportEmpty(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportEntryIdNotFound(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportHasFullName(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportHasFullNameAndLink(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportHasLink(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportHasNoFullNameOrLink(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportInactiveCPSelection(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportInvalidAsIdentifier(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportInactiveCPSelection(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportMatchesByFullName(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportMatchesByLink(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportMatchesByLinkButDifferentScheme(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportMultipleMatchesByFullName(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportMultipleMatchesByLink(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportNoMatches(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportNoMatchesContainsFullName(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportURLWithNoMatchesShouldBeUnchanged(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testIsCopyrightSelectionActiveFalse(), and ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testIsCopyrightSelectionActiveTrue().

132  {
133  return new class () extends NullHandler {
134  public function isIdentifierValid(string $identifier): bool
135  {
136  return str_contains($identifier, 'valid_identifier_');
137  }
138 
139  public function parseEntryIDFromIdentifier(string $identifier): int
140  {
141  return (int) str_replace('valid_identifier_', '', $identifier);
142  }
143 
144  public function buildIdentifierFromEntryID(int $entry_id): string
145  {
146  return 'valid_identifier_' . $entry_id;
147  }
148  };
149  }
+ Here is the caller graph for this function:

◆ getSettings()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::getSettings ( bool  $selection_active)
protected

Definition at line 151 of file CopyrightHandlerTest.php.

References ILIAS\__construct().

Referenced by ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightAsString(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightAsStringEntryIdNotFound(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightAsStringInactiveCPSelection(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightAsStringInvalidAsIdentifier(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportEmpty(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportEntryIdNotFound(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportHasFullName(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportHasFullNameAndLink(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportHasLink(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportHasNoFullNameOrLink(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportInactiveCPSelection(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightForExportInvalidAsIdentifier(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportInactiveCPSelection(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportMatchesByFullName(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportMatchesByLink(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportMatchesByLinkButDifferentScheme(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportMultipleMatchesByFullName(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportMultipleMatchesByLink(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportNoMatches(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportNoMatchesContainsFullName(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testCopyrightFromExportURLWithNoMatchesShouldBeUnchanged(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testIsCopyrightSelectionActiveFalse(), and ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\testIsCopyrightSelectionActiveTrue().

152  {
153  return new class ($selection_active) extends NullSettings {
154  public function __construct(protected bool $selection_active)
155  {
156  }
157 
158  public function isCopyrightSelectionActive(): bool
159  {
160  return $this->selection_active;
161  }
162  };
163  }
__construct()
Constructor setup ILIAS global object public.
Definition: class.ilias.php:76
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getURI()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::getURI ( string  $link)
protected

Definition at line 40 of file CopyrightHandlerTest.php.

References $url.

Referenced by ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightEntry().

40  : URI
41  {
42  $url = $this->createMock(URI::class);
43  $url->method('__toString')->willReturn($link);
44  return $url;
45  }
$url
Definition: shib_logout.php:66
+ Here is the caller graph for this function:

◆ testCopyrightAsString()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::testCopyrightAsString ( )

Definition at line 187 of file CopyrightHandlerTest.php.

References $handler, ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightEntry(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightRepository(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getIdentifierHandler(), and ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getSettings().

187  : void
188  {
189  $entries = [
190  $this->getCopyrightEntry(13, 'first entry', 'https://www.example1.com'),
191  $this->getCopyrightEntry(55, 'second entry', 'http://www.example2.com'),
192  $this->getCopyrightEntry(123, 'third entry', 'https://www.example3.com/something')
193  ];
194  $handler = new CopyrightHandler(
195  $this->getCopyrightRepository(...$entries),
196  $this->getIdentifierHandler(),
197  $this->getSettings(true)
198  );
199 
200  $this->assertSame(
201  'http://www.example2.com',
202  $handler->copyrightAsString('valid_identifier_55')
203  );
204  }
getCopyrightEntry(int $id, string $full_name, ?string $link, bool $default=false)
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testCopyrightAsStringEntryIdNotFound()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::testCopyrightAsStringEntryIdNotFound ( )

Definition at line 244 of file CopyrightHandlerTest.php.

References $handler, ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightEntry(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightRepository(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getIdentifierHandler(), and ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getSettings().

244  : void
245  {
246  $entries = [
247  $this->getCopyrightEntry(13, 'first entry', 'https://www.example1.com'),
248  $this->getCopyrightEntry(55, 'second entry', 'http://www.example2.com'),
249  $this->getCopyrightEntry(123, 'third entry', 'https://www.example3.com/something')
250  ];
251  $handler = new CopyrightHandler(
252  $this->getCopyrightRepository(...$entries),
253  $this->getIdentifierHandler(),
254  $this->getSettings(true)
255  );
256 
257  $this->assertSame(
258  '',
259  $handler->copyrightAsString('valid_identifier_678')
260  );
261  }
getCopyrightEntry(int $id, string $full_name, ?string $link, bool $default=false)
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testCopyrightAsStringInactiveCPSelection()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::testCopyrightAsStringInactiveCPSelection ( )

Definition at line 206 of file CopyrightHandlerTest.php.

References $handler, ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightEntry(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightRepository(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getIdentifierHandler(), and ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getSettings().

206  : void
207  {
208  $entries = [
209  $this->getCopyrightEntry(13, 'first entry', 'https://www.example1.com'),
210  $this->getCopyrightEntry(55, 'second entry', 'http://www.example2.com'),
211  $this->getCopyrightEntry(123, 'third entry', 'https://www.example3.com/something')
212  ];
213  $handler = new CopyrightHandler(
214  $this->getCopyrightRepository(...$entries),
215  $this->getIdentifierHandler(),
216  $this->getSettings(false)
217  );
218 
219  $this->assertSame(
220  'valid_identifier_55',
221  $handler->copyrightAsString('valid_identifier_55')
222  );
223  }
getCopyrightEntry(int $id, string $full_name, ?string $link, bool $default=false)
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testCopyrightAsStringInvalidAsIdentifier()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::testCopyrightAsStringInvalidAsIdentifier ( )

Definition at line 225 of file CopyrightHandlerTest.php.

References $handler, ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightEntry(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightRepository(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getIdentifierHandler(), and ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getSettings().

225  : void
226  {
227  $entries = [
228  $this->getCopyrightEntry(13, 'first entry', 'https://www.example1.com'),
229  $this->getCopyrightEntry(55, 'second entry', 'http://www.example2.com'),
230  $this->getCopyrightEntry(123, 'third entry', 'https://www.example3.com/something')
231  ];
232  $handler = new CopyrightHandler(
233  $this->getCopyrightRepository(...$entries),
234  $this->getIdentifierHandler(),
235  $this->getSettings(true)
236  );
237 
238  $this->assertSame(
239  'something invalid',
240  $handler->copyrightAsString('something invalid')
241  );
242  }
getCopyrightEntry(int $id, string $full_name, ?string $link, bool $default=false)
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testCopyrightForExportEmpty()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::testCopyrightForExportEmpty ( )

Definition at line 320 of file CopyrightHandlerTest.php.

References $handler, ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightEntry(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightRepository(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getIdentifierHandler(), and ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getSettings().

320  : void
321  {
322  $entries = [
323  $this->getCopyrightEntry(13, 'first entry', 'https://www.example1.com'),
324  $this->getCopyrightEntry(55, 'second entry', 'http://www.example2.com', true),
325  $this->getCopyrightEntry(123, 'third entry', 'https://www.example3.com/something')
326  ];
327  $handler = new CopyrightHandler(
328  $this->getCopyrightRepository(...$entries),
329  $this->getIdentifierHandler(),
330  $this->getSettings(true)
331  );
332 
333  $this->assertSame(
334  'http://www.example2.com',
335  $handler->copyrightForExport('')
336  );
337  }
getCopyrightEntry(int $id, string $full_name, ?string $link, bool $default=false)
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testCopyrightForExportEntryIdNotFound()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::testCopyrightForExportEntryIdNotFound ( )

Definition at line 282 of file CopyrightHandlerTest.php.

References $handler, ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightEntry(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightRepository(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getIdentifierHandler(), and ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getSettings().

282  : void
283  {
284  $entries = [
285  $this->getCopyrightEntry(13, 'first entry', 'https://www.example1.com'),
286  $this->getCopyrightEntry(55, 'second entry', 'http://www.example2.com'),
287  $this->getCopyrightEntry(123, 'third entry', 'https://www.example3.com/something')
288  ];
289  $handler = new CopyrightHandler(
290  $this->getCopyrightRepository(...$entries),
291  $this->getIdentifierHandler(),
292  $this->getSettings(true)
293  );
294 
295  $this->assertSame(
296  '',
297  $handler->copyrightForExport('valid_identifier_678')
298  );
299  }
getCopyrightEntry(int $id, string $full_name, ?string $link, bool $default=false)
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testCopyrightForExportHasFullName()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::testCopyrightForExportHasFullName ( )

Definition at line 358 of file CopyrightHandlerTest.php.

References $handler, ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightEntry(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightRepository(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getIdentifierHandler(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getSettings(), and null.

358  : void
359  {
360  $entries = [
361  $this->getCopyrightEntry(13, 'first entry', 'https://www.example1.com'),
362  $this->getCopyrightEntry(55, 'second entry', null),
363  $this->getCopyrightEntry(123, 'third entry', 'https://www.example3.com/something')
364  ];
365  $handler = new CopyrightHandler(
366  $this->getCopyrightRepository(...$entries),
367  $this->getIdentifierHandler(),
368  $this->getSettings(true)
369  );
370 
371  $this->assertSame(
372  'second entry',
373  $handler->copyrightForExport('valid_identifier_55')
374  );
375  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getCopyrightEntry(int $id, string $full_name, ?string $link, bool $default=false)
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testCopyrightForExportHasFullNameAndLink()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::testCopyrightForExportHasFullNameAndLink ( )

Definition at line 377 of file CopyrightHandlerTest.php.

References $handler, ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightEntry(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightRepository(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getIdentifierHandler(), and ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getSettings().

377  : void
378  {
379  $entries = [
380  $this->getCopyrightEntry(13, 'first entry', 'https://www.example1.com'),
381  $this->getCopyrightEntry(55, 'second entry', 'http://www.example2.com'),
382  $this->getCopyrightEntry(123, 'third entry', 'https://www.example3.com/something')
383  ];
384  $handler = new CopyrightHandler(
385  $this->getCopyrightRepository(...$entries),
386  $this->getIdentifierHandler(),
387  $this->getSettings(true)
388  );
389 
390  $this->assertSame(
391  'http://www.example2.com',
392  $handler->copyrightForExport('valid_identifier_55')
393  );
394  }
getCopyrightEntry(int $id, string $full_name, ?string $link, bool $default=false)
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testCopyrightForExportHasLink()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::testCopyrightForExportHasLink ( )

Definition at line 339 of file CopyrightHandlerTest.php.

References $handler, ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightEntry(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightRepository(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getIdentifierHandler(), and ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getSettings().

339  : void
340  {
341  $entries = [
342  $this->getCopyrightEntry(13, 'first entry', 'https://www.example1.com'),
343  $this->getCopyrightEntry(55, '', 'http://www.example2.com'),
344  $this->getCopyrightEntry(123, 'third entry', 'https://www.example3.com/something')
345  ];
346  $handler = new CopyrightHandler(
347  $this->getCopyrightRepository(...$entries),
348  $this->getIdentifierHandler(),
349  $this->getSettings(true)
350  );
351 
352  $this->assertSame(
353  'http://www.example2.com',
354  $handler->copyrightForExport('valid_identifier_55')
355  );
356  }
getCopyrightEntry(int $id, string $full_name, ?string $link, bool $default=false)
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testCopyrightForExportHasNoFullNameOrLink()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::testCopyrightForExportHasNoFullNameOrLink ( )

Definition at line 396 of file CopyrightHandlerTest.php.

References $handler, ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightEntry(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightRepository(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getIdentifierHandler(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getSettings(), and null.

396  : void
397  {
398  $entries = [
399  $this->getCopyrightEntry(13, 'first entry', 'https://www.example1.com'),
400  $this->getCopyrightEntry(55, '', null),
401  $this->getCopyrightEntry(123, 'third entry', 'https://www.example3.com/something')
402  ];
403  $handler = new CopyrightHandler(
404  $this->getCopyrightRepository(...$entries),
405  $this->getIdentifierHandler(),
406  $this->getSettings(true)
407  );
408 
409  $this->assertSame(
410  '',
411  $handler->copyrightForExport('valid_identifier_55')
412  );
413  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getCopyrightEntry(int $id, string $full_name, ?string $link, bool $default=false)
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testCopyrightForExportInactiveCPSelection()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::testCopyrightForExportInactiveCPSelection ( )

Definition at line 301 of file CopyrightHandlerTest.php.

References $handler, ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightEntry(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightRepository(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getIdentifierHandler(), and ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getSettings().

301  : void
302  {
303  $entries = [
304  $this->getCopyrightEntry(13, 'first entry', 'https://www.example1.com'),
305  $this->getCopyrightEntry(55, 'second entry', 'http://www.example2.com'),
306  $this->getCopyrightEntry(123, 'third entry', 'https://www.example3.com/something')
307  ];
308  $handler = new CopyrightHandler(
309  $this->getCopyrightRepository(...$entries),
310  $this->getIdentifierHandler(),
311  $this->getSettings(false)
312  );
313 
314  $this->assertSame(
315  'valid_identifier_55',
316  $handler->copyrightForExport('valid_identifier_55')
317  );
318  }
getCopyrightEntry(int $id, string $full_name, ?string $link, bool $default=false)
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testCopyrightForExportInvalidAsIdentifier()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::testCopyrightForExportInvalidAsIdentifier ( )

Definition at line 263 of file CopyrightHandlerTest.php.

References $handler, ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightEntry(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightRepository(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getIdentifierHandler(), and ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getSettings().

263  : void
264  {
265  $entries = [
266  $this->getCopyrightEntry(13, 'first entry', 'https://www.example1.com'),
267  $this->getCopyrightEntry(55, 'second entry', 'http://www.example2.com'),
268  $this->getCopyrightEntry(123, 'third entry', 'https://www.example3.com/something')
269  ];
270  $handler = new CopyrightHandler(
271  $this->getCopyrightRepository(...$entries),
272  $this->getIdentifierHandler(),
273  $this->getSettings(true)
274  );
275 
276  $this->assertSame(
277  'something invalid',
278  $handler->copyrightForExport('something invalid')
279  );
280  }
getCopyrightEntry(int $id, string $full_name, ?string $link, bool $default=false)
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testCopyrightFromExportInactiveCPSelection()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::testCopyrightFromExportInactiveCPSelection ( )

Definition at line 476 of file CopyrightHandlerTest.php.

References $handler, ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightEntry(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightRepository(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getIdentifierHandler(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getSettings(), and null.

476  : void
477  {
478  $entries = [
479  $this->getCopyrightEntry(13, 'first entry', null),
480  $this->getCopyrightEntry(55, 'second entry', 'http://www.example2.com'),
481  $this->getCopyrightEntry(123, 'third entry', 'https://www.example3.com/something')
482  ];
483  $handler = new CopyrightHandler(
484  $this->getCopyrightRepository(...$entries),
485  $this->getIdentifierHandler(),
486  $this->getSettings(false)
487  );
488 
489  $this->assertSame(
490  'some text containing http://www.example2.com',
491  $handler->copyrightFromExport('some text containing http://www.example2.com')
492  );
493  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getCopyrightEntry(int $id, string $full_name, ?string $link, bool $default=false)
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testCopyrightFromExportMatchesByFullName()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::testCopyrightFromExportMatchesByFullName ( )

Definition at line 495 of file CopyrightHandlerTest.php.

References $handler, ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightEntry(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightRepository(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getIdentifierHandler(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getSettings(), and null.

495  : void
496  {
497  $entries = [
498  $this->getCopyrightEntry(13, 'first entry', null),
499  $this->getCopyrightEntry(55, 'second entry', 'http://www.example2.com'),
500  $this->getCopyrightEntry(123, 'third entry', 'https://www.example3.com/something')
501  ];
502  $handler = new CopyrightHandler(
503  $this->getCopyrightRepository(...$entries),
504  $this->getIdentifierHandler(),
505  $this->getSettings(true)
506  );
507 
508  $this->assertSame(
509  'valid_identifier_13',
510  $handler->copyrightFromExport('first entry')
511  );
512  $this->assertSame(
513  'valid_identifier_55',
514  $handler->copyrightFromExport('second entry')
515  );
516  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getCopyrightEntry(int $id, string $full_name, ?string $link, bool $default=false)
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testCopyrightFromExportMatchesByLink()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::testCopyrightFromExportMatchesByLink ( )

Definition at line 537 of file CopyrightHandlerTest.php.

References $handler, ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightEntry(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightRepository(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getIdentifierHandler(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getSettings(), and null.

537  : void
538  {
539  $entries = [
540  $this->getCopyrightEntry(13, 'first entry', null),
541  $this->getCopyrightEntry(55, 'second entry', 'http://www.example2.com'),
542  $this->getCopyrightEntry(123, 'third entry', 'https://www.example3.com/something')
543  ];
544  $handler = new CopyrightHandler(
545  $this->getCopyrightRepository(...$entries),
546  $this->getIdentifierHandler(),
547  $this->getSettings(true)
548  );
549 
550  $this->assertSame(
551  'valid_identifier_55',
552  $handler->copyrightFromExport('some text containing http://www.example2.com')
553  );
554  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getCopyrightEntry(int $id, string $full_name, ?string $link, bool $default=false)
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testCopyrightFromExportMatchesByLinkButDifferentScheme()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::testCopyrightFromExportMatchesByLinkButDifferentScheme ( )

Definition at line 575 of file CopyrightHandlerTest.php.

References $handler, ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightEntry(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightRepository(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getIdentifierHandler(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getSettings(), and null.

575  : void
576  {
577  $entries = [
578  $this->getCopyrightEntry(13, 'first entry', null),
579  $this->getCopyrightEntry(55, 'second entry', 'http://www.example2.com'),
580  $this->getCopyrightEntry(123, 'third entry', 'https://www.example3.com/something')
581  ];
582  $handler = new CopyrightHandler(
583  $this->getCopyrightRepository(...$entries),
584  $this->getIdentifierHandler(),
585  $this->getSettings(true)
586  );
587 
588  $this->assertSame(
589  'valid_identifier_55',
590  $handler->copyrightFromExport('some text containing https://www.example2.com')
591  );
592  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getCopyrightEntry(int $id, string $full_name, ?string $link, bool $default=false)
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testCopyrightFromExportMultipleMatchesByFullName()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::testCopyrightFromExportMultipleMatchesByFullName ( )

Definition at line 518 of file CopyrightHandlerTest.php.

References $handler, ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightEntry(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightRepository(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getIdentifierHandler(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getSettings(), and null.

518  : void
519  {
520  $entries = [
521  $this->getCopyrightEntry(13, 'first entry', null),
522  $this->getCopyrightEntry(55, 'second entry', 'http://www.example2.com'),
523  $this->getCopyrightEntry(123, 'second entry', 'https://www.example3.com/something')
524  ];
525  $handler = new CopyrightHandler(
526  $this->getCopyrightRepository(...$entries),
527  $this->getIdentifierHandler(),
528  $this->getSettings(true)
529  );
530 
531  $this->assertSame(
532  'valid_identifier_55',
533  $handler->copyrightFromExport('second entry')
534  );
535  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getCopyrightEntry(int $id, string $full_name, ?string $link, bool $default=false)
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testCopyrightFromExportMultipleMatchesByLink()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::testCopyrightFromExportMultipleMatchesByLink ( )

Definition at line 556 of file CopyrightHandlerTest.php.

References $handler, ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightEntry(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightRepository(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getIdentifierHandler(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getSettings(), and null.

556  : void
557  {
558  $entries = [
559  $this->getCopyrightEntry(13, 'first entry', null),
560  $this->getCopyrightEntry(55, 'second entry', 'https://www.example3.com/something'),
561  $this->getCopyrightEntry(123, 'third entry', 'https://www.example3.com/something')
562  ];
563  $handler = new CopyrightHandler(
564  $this->getCopyrightRepository(...$entries),
565  $this->getIdentifierHandler(),
566  $this->getSettings(true)
567  );
568 
569  $this->assertSame(
570  'valid_identifier_55',
571  $handler->copyrightFromExport('some text containing https://www.example3.com/something')
572  );
573  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getCopyrightEntry(int $id, string $full_name, ?string $link, bool $default=false)
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testCopyrightFromExportNoMatches()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::testCopyrightFromExportNoMatches ( )

Definition at line 415 of file CopyrightHandlerTest.php.

References $handler, ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightEntry(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightRepository(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getIdentifierHandler(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getSettings(), and null.

415  : void
416  {
417  $entries = [
418  $this->getCopyrightEntry(13, 'first entry', null),
419  $this->getCopyrightEntry(55, 'second entry', 'http://www.example2.com'),
420  $this->getCopyrightEntry(123, 'third entry', 'https://www.example3.com/something')
421  ];
422  $handler = new CopyrightHandler(
423  $this->getCopyrightRepository(...$entries),
424  $this->getIdentifierHandler(),
425  $this->getSettings(true)
426  );
427 
428  $this->assertSame(
429  'just some text',
430  $handler->copyrightFromExport('just some text')
431  );
432  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getCopyrightEntry(int $id, string $full_name, ?string $link, bool $default=false)
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testCopyrightFromExportNoMatchesContainsFullName()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::testCopyrightFromExportNoMatchesContainsFullName ( )

Definition at line 457 of file CopyrightHandlerTest.php.

References $handler, ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightEntry(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightRepository(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getIdentifierHandler(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getSettings(), and null.

457  : void
458  {
459  $entries = [
460  $this->getCopyrightEntry(13, 'first entry', null),
461  $this->getCopyrightEntry(55, 'second entry', 'http://www.example2.com'),
462  $this->getCopyrightEntry(123, 'third entry', 'https://www.example3.com/something')
463  ];
464  $handler = new CopyrightHandler(
465  $this->getCopyrightRepository(...$entries),
466  $this->getIdentifierHandler(),
467  $this->getSettings(true)
468  );
469 
470  $this->assertSame(
471  'just some text which contains first entry',
472  $handler->copyrightFromExport('just some text which contains first entry')
473  );
474  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getCopyrightEntry(int $id, string $full_name, ?string $link, bool $default=false)
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testCopyrightFromExportURLWithNoMatchesShouldBeUnchanged()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::testCopyrightFromExportURLWithNoMatchesShouldBeUnchanged ( )

Definition at line 434 of file CopyrightHandlerTest.php.

References $handler, ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightEntry(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightRepository(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getIdentifierHandler(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getSettings(), and null.

434  : void
435  {
436  $entries = [
437  $this->getCopyrightEntry(13, 'first entry', null),
438  $this->getCopyrightEntry(55, 'second entry', 'http://www.example2.com'),
439  $this->getCopyrightEntry(123, 'third entry', 'https://www.example3.com/something')
440  ];
441  $handler = new CopyrightHandler(
442  $this->getCopyrightRepository(...$entries),
443  $this->getIdentifierHandler(),
444  $this->getSettings(true)
445  );
446 
447  $this->assertSame(
448  'https://www.nonmatching.com',
449  $handler->copyrightFromExport('https://www.nonmatching.com')
450  );
451  $this->assertSame(
452  'http://www.nonmatching.com',
453  $handler->copyrightFromExport('http://www.nonmatching.com')
454  );
455  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getCopyrightEntry(int $id, string $full_name, ?string $link, bool $default=false)
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testIsCopyrightSelectionActiveFalse()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::testIsCopyrightSelectionActiveFalse ( )

Definition at line 176 of file CopyrightHandlerTest.php.

References $handler, ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightRepository(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getIdentifierHandler(), and ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getSettings().

176  : void
177  {
178  $handler = new CopyrightHandler(
179  $this->getCopyrightRepository(),
180  $this->getIdentifierHandler(),
181  $this->getSettings(false)
182  );
183 
184  $this->assertFalse($handler->isCopyrightSelectionActive());
185  }
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

◆ testIsCopyrightSelectionActiveTrue()

ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest::testIsCopyrightSelectionActiveTrue ( )

Definition at line 165 of file CopyrightHandlerTest.php.

References $handler, ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getCopyrightRepository(), ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getIdentifierHandler(), and ILIAS\MetaData\XML\Copyright\CopyrightHandlerTest\getSettings().

165  : void
166  {
167  $handler = new CopyrightHandler(
168  $this->getCopyrightRepository(),
169  $this->getIdentifierHandler(),
170  $this->getSettings(true)
171  );
172 
173  $this->assertTrue($handler->isCopyrightSelectionActive());
174  }
$handler
Definition: oai.php:30
+ Here is the call graph for this function:

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