◆ getUIFactory()
| Component\Progress\BarTest::getUIFactory |
( |
| ) |
|
Definition at line 104 of file BarTest.php.
References ILIAS\GlobalScreen\Provider\__construct(), and ILIAS\Repository\symbol().
Referenced by Component\Progress\BarTest\testRender(), and Component\Progress\BarTest\testRenderWithAsyncUrl().
106 $symbol_factory =
new I\Symbol\Factory(
107 $this->createMock(
I\Symbol\
Icon\Factory::class),
108 $this->glyph_factory,
109 $this->createMock(
I\Symbol\Avatar\Factory::class),
112 $progress_factory =
new I\Progress\Factory(
113 $this->createMock(
C\Progress\AsyncRefreshInterval::class),
114 $this->signal_generator,
115 $this->createMock(
C\Progress\State\Factory::class),
118 return new class ($progress_factory, $symbol_factory) extends \
NoUIFactory {
120 protected C\Progress\Factory $progress_factory,
121 protected C\Symbol\Factory $symbol_factory,
124 public function progress():
C\Progress\Factory
126 return $this->progress_factory;
128 public function symbol():
C\Symbol\Factory
130 return $this->symbol_factory;
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
◆ setUp()
| Component\Progress\BarTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 39 of file BarTest.php.
41 $this->glyph_html = sha1(
C\Symbol\Glyph\Glyph::class);
43 $this->glyph_mock = $this->createMock(
C\Symbol\Glyph\Glyph::class);
44 $this->glyph_mock->method(
'getCanonicalName')->willReturn($this->glyph_html);
46 $this->glyph_factory = $this->createMock(
I\Symbol\Glyph\Factory::class);
47 $this->glyph_factory->method(
'apply')->willReturn($this->glyph_mock);
48 $this->glyph_factory->method(
'close')->willReturn($this->glyph_mock);
50 $this->uri = sha1(
'https://example.com?foo=bar&bar=foobar');
52 $this->uri_mock = $this->createMock(\
ILIAS\
Data\URI::class);
53 $this->uri_mock->method(
'__toString')->willReturn($this->uri);
55 $this->signal_generator = new \IncrementalSignalGenerator();
Interface Observer Contains several chained tasks and infos about them.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ testRender()
| Component\Progress\BarTest::testRender |
( |
| ) |
|
Definition at line 60 of file BarTest.php.
References $renderer, and Component\Progress\BarTest\getUIFactory().
62 $label = sha1(
'progress_bar_label');
64 $progress_bar = $this->
getUIFactory()->progress()->bar($label);
66 $renderer = $this->getDefaultRenderer(null, [$this->glyph_mock]);
68 $actual_html =
$renderer->render($progress_bar);
70 $expected_html = <<<EOT
71 <div
class=
"c-progress c-progress-bar">
72 <div
class=
"c-progress-bar__label"><label
for=
"id_1">$label</label>
73 <span data-status=
"success" class=
"c-progress-bar--success hidden">$this->glyph_html</span>
74 <span data-status=
"failure" class=
"c-progress-bar--failure hidden">$this->glyph_html</span>
76 <progress
id=
"id_1" class=
"c-progress-bar__progress" value=
"0" max=
"100"></progress>
77 <div
class=
"c-progress-bar__message text-left invisible" aria-live=
"polite"></div>
82 $this->brutallyTrimHTML($expected_html),
83 $this->brutallyTrimHTML($actual_html),
◆ testRenderWithAsyncUrl()
| Component\Progress\BarTest::testRenderWithAsyncUrl |
( |
| ) |
|
◆ $glyph_factory
| I Symbol Glyph Factory Component\Progress\BarTest::$glyph_factory |
|
protected |
◆ $glyph_html
| string Component\Progress\BarTest::$glyph_html |
|
protected |
◆ $glyph_mock
| C Symbol Glyph Glyph Component\Progress\BarTest::$glyph_mock |
|
protected |
◆ $signal_generator
| I SignalGeneratorInterface Component\Progress\BarTest::$signal_generator |
|
protected |
◆ $uri
| string Component\Progress\BarTest::$uri |
|
protected |
◆ $uri_mock
| ILIAS Data URI Component\Progress\BarTest::$uri_mock |
|
protected |
The documentation for this class was generated from the following file:
- components/ILIAS/UI/tests/Component/Progress/BarTest.php