ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
FileTestBase.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23require_once(__DIR__ . "/../../../../../../../vendor/composer/vendor/autoload.php");
24require_once(__DIR__ . "/../../../Base.php");
25
30
34abstract class FileTestBase extends \ILIAS_UI_TestBase
35{
36 protected C\Dropzone\File\Factory $factory;
37 protected I\Component\Input\Field\File $input;
38 private I\Component\Button\Factory $button_factory;
39
40 public function setUp(): void
41 {
42 $this->button_factory = new I\Component\Button\Factory();
43
44 $signal_generator = new I\Component\SignalGenerator();
45 $field_factory = new I\Component\Input\Field\Factory(
46 $this->createMock(\ILIAS\UI\Implementation\Component\Input\Field\Node\Factory::class),
47 $this->createMock(I\Component\Input\UploadLimitResolver::class),
48 $signal_generator,
49 $this->getDataFactory(),
50 $this->getRefinery(),
51 $this->getLanguage()
52 );
53
54 $this->factory = new I\Component\Dropzone\File\Factory(
55 $signal_generator,
56 $field_factory,
57 );
58
59 $this->input = $field_factory->file($this->createMock(C\Input\Field\UploadHandler::class), '');
60
61 parent::setUp();
62 }
63
68 public function getUIFactory(): \NoUIFactory
69 {
70 return new class ($this->button_factory) extends \NoUIFactory {
71 public function __construct(
73 ) {
74 }
75
76 public function button(): I\Component\Button\Factory
77 {
79 }
80 };
81 }
82}
factory()
Builds data types.
Definition: Factory.php:36
getUIFactory()
Returns the factory with an actual implementation of the button factory.
Definition: UI.php:24
Provides common functionality for UI tests.
Definition: Base.php:337
__construct()
Constructor setup ILIAS global object @access public.
Definition: class.ilias.php:76
button(string $caption, string $cmd)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Bulky.php:21
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
getLanguage()