ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
FileListManagerTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use PHPUnit\Framework\TestCase;
25
30{
31 public function testGetAllFileObjIds(): void
32 {
33 $page = $this->getEmptyPageWithDom();
34 $fm = new FileListManager();
35
36 $page = $this->getEmptyPageWithDom();
37 $pc = new \ilPCFileList($page);
38 $pc->create($page, "pg");
39 $pc->appendItem(10, "file_loc", "image/jpeg");
40 $pc->appendItem(12, "file_loc2", "image/jpeg");
41 $pc->appendItem(14, "file_loc3", "image/jpeg");
42 $page->insertPCIds();
43
44 $this->assertEquals(
45 ["il__file_10", "il__file_12", "il__file_14"],
46 $fm->getAllFileObjIds($page->getDomDoc())
47 );
48 }
49}