5require_once(
"libs/composer/vendor/autoload.php");
6require_once(__DIR__ .
"/../../../Base.php");
8use \ILIAS\UI\Component as
C;
9use \ILIAS\UI\Implementation\Component as I;
10use \ILIAS\UI\Implementation\Component\MainControls\Slate\Slate;
11use \ILIAS\UI\Implementation\Component\MainControls\Slate\Combined;
12use \ILIAS\UI\Component\Signal;
36 $this->sig_gen =
new I\SignalGenerator();
37 $this->button_factory =
new I\Button\Factory($this->sig_gen);
38 $this->icon_factory =
new I\Symbol\Icon\Factory();
44 $icon = $this->icon_factory->custom(
'',
'');
47 $this->assertInstanceOf(
48 "ILIAS\\UI\\Component\\MainControls\\Slate\\Slate",
51 $this->assertEquals(
$name, $slate->getName());
52 $this->assertEquals($icon, $slate->getSymbol());
53 $this->assertFalse($slate->getEngaged());
74 }
catch (\InvalidArgumentException
$e) {
75 $this->assertFalse(
"This should not happen");
86 $this->assertFalse(
"This should not happen");
87 }
catch (\InvalidArgumentException
$e) {
88 $this->assertTrue(
true);
102 foreach ($signals as $signal) {
103 $this->assertInstanceOf(Signal::class, $signal);
115 array_unique($signals)
An exception for terminatinating execution or to throw for unit testing.
getAriaRole()
Get the ARIA role on the slate.
withAriaRole(string $aria_role)
Get a slate like this, but with an additional ARIA role.
Provides common functionality for UI tests.
testWithEngaged(Slate $slate)
@depends testConstruction
testSignals(Slate $slate)
@depends testConstruction
testWithAriaRole(Slate $slate)
@depends testConstruction
testDifferentSignals(array $signals)
@depends testSignals
testWithAriaRoleIncorrect(Slate $slate)
@depends testConstruction
withMappedSubNodes(callable $f)