ILIAS  release_8 Revision v8.24
FileTestBase.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23require_once(__DIR__ . "/../../../../../libs/composer/vendor/autoload.php");
24require_once(__DIR__ . "/../../../Base.php");
25
29
33abstract class FileTestBase extends \ILIAS_UI_TestBase
34{
35 protected C\Dropzone\File\Factory $factory;
36 protected I\Component\Input\Field\File $input;
37 protected string $input_html = 'test_file_input';
38
39 public function setUp(): void
40 {
41 $this->input = $this->createMock(I\Component\Input\Field\File::class);
42 $this->input->method('getCanonicalName')->willReturn($this->input_html);
43
44 $group_mock = $this->createMock(I\Component\Input\Field\Group::class);
45 $group_mock->method('withNameFrom')->willReturnSelf();
46
47 $factory_mock = $this->createMock(C\Input\Field\Factory::class);
48 $factory_mock->method('group')->willReturn($group_mock);
49
50 $this->factory = new I\Component\Dropzone\File\Factory(
51 new I\Component\SignalGenerator(),
52 $factory_mock
53 );
54
55 parent::setUp();
56 }
57}
Provides common functionality for UI tests.
Definition: Base.php:299
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...