Definition at line 33 of file UITest.php.
◆ testConstruct()
ILIAS\LegalDocuments\test\ConsumerToolbox\UITest::testConstruct |
( |
| ) |
|
Definition at line 37 of file UITest.php.
39 $this->assertInstanceOf(UI::class,
new UI(
'foo', $this->mock(UIServices::class), $this->mock(ilLanguage::class)));
◆ testCreate()
ILIAS\LegalDocuments\test\ConsumerToolbox\UITest::testCreate |
( |
| ) |
|
Definition at line 42 of file UITest.php.
44 $ui_factory = $this->mock(UIFactory::class);
45 $this->assertSame($ui_factory, (
new UI(
'foo', $this->mockTree(UIServices::class, [
'factory' => $ui_factory]), $this->mock(ilLanguage::class)))->create());
◆ testMainTemplate()
ILIAS\LegalDocuments\test\ConsumerToolbox\UITest::testMainTemplate |
( |
| ) |
|
Definition at line 48 of file UITest.php.
References mainTemplate().
50 $template = $this->mock(ilGlobalTemplateInterface::class);
51 $this->assertSame($template, (
new UI(
'foo', $this->mockTree(UIServices::class, [
'mainTemplate' => $template]), $this->mock(ilLanguage::class)))->
mainTemplate());
◆ testTxt()
ILIAS\LegalDocuments\test\ConsumerToolbox\UITest::testTxt |
( |
| ) |
|
Definition at line 54 of file UITest.php.
References $txt.
56 $language = $this->mockMethod(ilLanguage::class,
'txt', [
'ldoc_foo'],
'baz');
62 ->expects(self::exactly(2))
65 function (
string $txt) use (&$consecutive) {
66 [$expected, $return] = array_shift($consecutive);
67 $this->assertEquals($expected, $txt);
71 $instance =
new UI(
'bar', $this->mock(UIServices::class), $language);
72 $this->assertSame(
'baz', $instance->txt(
'foo'));
◆ testTxtFallback()
ILIAS\LegalDocuments\test\ConsumerToolbox\UITest::testTxtFallback |
( |
| ) |
|
Definition at line 75 of file UITest.php.
References $txt.
77 $consecutive = [
'bar_foo',
'ldoc_foo'];
78 $language = $this->mockMethod(ilLanguage::class,
'txt', [
'foo'],
'baz');
80 ->expects(self::exactly(2))
83 function (
string $txt) use (&$consecutive) {
84 $this->assertEquals(array_shift($consecutive), $txt);
89 $instance =
new UI(
'bar', $this->mock(UIServices::class), $language);
90 $this->assertSame(
'baz', $instance->txt(
'foo'));
The documentation for this class was generated from the following file:
- components/ILIAS/LegalDocuments/tests/ConsumerToolbox/UITest.php