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

Public Member Functions

 testImage ()
 
 testHasImage ()
 
 testIsImageLink ()
 

Protected Member Functions

 getMockURI ()
 
 getData (?URI $image_link, string $image_file)
 

Detailed Description

Definition at line 27 of file CopyrightDataTest.php.

Member Function Documentation

◆ getData()

ILIAS\MetaData\Copyright\CopyrightDataTest::getData ( ?URI  $image_link,
string  $image_file 
)
protected

Definition at line 34 of file CopyrightDataTest.php.

References ILIAS\MetaData\Copyright\CopyrightDataTest\getMockURI().

Referenced by ILIAS\MetaData\Copyright\CopyrightDataTest\testHasImage(), ILIAS\MetaData\Copyright\CopyrightDataTest\testImage(), and ILIAS\MetaData\Copyright\CopyrightDataTest\testIsImageLink().

34  : CopyrightData
35  {
36  return new CopyrightData(
37  'name',
38  $this->getMockURI(),
39  $image_link,
40  $image_file,
41  'alt',
42  false
43  );
44  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMockURI()

ILIAS\MetaData\Copyright\CopyrightDataTest::getMockURI ( )
protected

◆ testHasImage()

ILIAS\MetaData\Copyright\CopyrightDataTest::testHasImage ( )

Definition at line 64 of file CopyrightDataTest.php.

References ILIAS\MetaData\Copyright\CopyrightDataTest\getData(), ILIAS\MetaData\Copyright\CopyrightDataTest\getMockURI(), and null.

64  : void
65  {
66  $data_without_image = $this->getData(null, '');
67  $data_with_file_image = $this->getData(null, 'file identifier');
68  $data_with_link_image = $this->getData($this->getMockURI(), '');
69 
70  $this->assertFalse($data_without_image->hasImage());
71  $this->assertTrue($data_with_file_image->hasImage());
72  $this->assertTrue($data_with_link_image->hasImage());
73  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getData(?URI $image_link, string $image_file)
+ Here is the call graph for this function:

◆ testImage()

ILIAS\MetaData\Copyright\CopyrightDataTest::testImage ( )

Definition at line 46 of file CopyrightDataTest.php.

References ILIAS\MetaData\Copyright\CopyrightDataTest\getData(), ILIAS\MetaData\Copyright\CopyrightDataTest\getMockURI(), and null.

46  : void
47  {
48  $uri = $this->getMockURI();
49 
50  $data_without_image = $this->getData(null, '');
51  $data_with_file_image = $this->getData(null, 'file identifier');
52  $data_with_link_image = $this->getData($uri, '');
53 
54  $this->assertSame('', $data_without_image->imageFile());
55  $this->assertNull($data_without_image->imageLink());
56 
57  $this->assertSame('file identifier', $data_with_file_image->imageFile());
58  $this->assertNull($data_with_file_image->imageLink());
59 
60  $this->assertSame('', $data_with_link_image->imageFile());
61  $this->assertSame($uri, $data_with_link_image->imageLink());
62  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getData(?URI $image_link, string $image_file)
+ Here is the call graph for this function:

◆ testIsImageLink()

ILIAS\MetaData\Copyright\CopyrightDataTest::testIsImageLink ( )

Definition at line 75 of file CopyrightDataTest.php.

References ILIAS\MetaData\Copyright\CopyrightDataTest\getData(), ILIAS\MetaData\Copyright\CopyrightDataTest\getMockURI(), and null.

75  : void
76  {
77  $data_without_image = $this->getData(null, '');
78  $data_with_file_image = $this->getData(null, 'file identifier');
79  $data_with_link_image = $this->getData($this->getMockURI(), '');
80 
81  $this->assertFalse($data_without_image->isImageLink());
82  $this->assertFalse($data_with_file_image->isImageLink());
83  $this->assertTrue($data_with_link_image->isImageLink());
84  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getData(?URI $image_link, string $image_file)
+ Here is the call graph for this function:

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