ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilHandlerTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
24 use ILIAS\Export\ImportHandler\File\Validation\Set\ilHandler as ilFileValidationSetHandler;
25 use ILIAS\Export\ImportHandler\File\Path\ilHandler as ilFilePathHandler;
26 use ILIAS\Export\ImportHandler\File\XML\ilHandler as ilXMLFileHandler;
27 use ILIAS\Export\ImportHandler\File\XSD\ilHandler as ilXSDFileHandler;
28 
29 class ilHandlerTest extends TestCase
30 {
31  public function testFileValidationSetHandler(): void
32  {
33  $xsd_file = $this->createMock(ilXSDFileHandler::class);
34  $xml_file = $this->createMock(ilXMLFileHandler::class);
35  $file_path = $this->createMock(ilFilePathHandler::class);
36 
37  $set = (new ilFileValidationSetHandler())
38  ->withFilePathHandler($file_path)
39  ->withXMLFileHandler($xml_file)
40  ->withXSDFileHanlder($xsd_file);
41 
42  $this->assertEquals($file_path, $set->getFilePathHandler());
43  $this->assertEquals($xsd_file, $set->getXSDFileHandler());
44  $this->assertEquals($xml_file, $set->getXMLFileHandler());
45  }
46 }