19 declare(strict_types=1);
31 return $this->createMock(URI::class);
51 $data_with_file_image = $this->
getData(
null,
'file identifier');
52 $data_with_link_image = $this->
getData($uri,
'');
54 $this->assertSame(
'', $data_without_image->imageFile());
55 $this->assertNull($data_without_image->imageLink());
57 $this->assertSame(
'file identifier', $data_with_file_image->imageFile());
58 $this->assertNull($data_with_file_image->imageLink());
60 $this->assertSame(
'', $data_with_link_image->imageFile());
61 $this->assertSame($uri, $data_with_link_image->imageLink());
67 $data_with_file_image = $this->
getData(
null,
'file identifier');
70 $this->assertFalse($data_without_image->hasImage());
71 $this->assertTrue($data_with_file_image->hasImage());
72 $this->assertTrue($data_with_link_image->hasImage());
78 $data_with_file_image = $this->
getData(
null,
'file identifier');
81 $this->assertFalse($data_without_image->isImageLink());
82 $this->assertFalse($data_with_file_image->isImageLink());
83 $this->assertTrue($data_with_link_image->isImageLink());
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null