19declare(strict_types=1);
21require_once(
"vendor/composer/vendor/autoload.php");
22require_once(__DIR__ .
"/../../../Base.php");
55 $this->sig_gen =
new I\SignalGenerator();
56 $this->button_factory =
new I\Button\Factory();
57 $this->icon_factory =
new I\Symbol\Icon\Factory();
63 $icon = $this->icon_factory->custom(
'',
'');
66 $this->assertInstanceOf(
67 "ILIAS\\UI\\Component\\MainControls\\Slate\\Slate",
70 $this->assertEquals($name, $slate->getName());
71 $this->assertEquals($icon, $slate->getSymbol());
72 $this->assertFalse($slate->getEngaged());
76 #[\PHPUnit\Framework\Attributes\Depends('testConstruction')]
83 #[\PHPUnit\Framework\Attributes\Depends('testConstruction')]
89 }
catch (InvalidArgumentException
$e) {
90 $this->assertFalse(
"This should not happen");
94 #[\PHPUnit\Framework\Attributes\Depends('testConstruction')]
99 $this->assertFalse(
"This should not happen");
100 }
catch (InvalidArgumentException
$e) {
101 $this->assertTrue(
true);
105 #[\PHPUnit\Framework\Attributes\Depends('testConstruction')]
113 foreach ($signals as $signal) {
114 $this->assertInstanceOf(Signal::class, $signal);
119 #[\PHPUnit\Framework\Attributes\Depends('testSignals')]
124 array_unique($signals)
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)
testSignals(Slate $slate)
testWithAriaRole(Slate $slate)
I Symbol Icon Factory $icon_factory
testDifferentSignals(array $signals)
I SignalGenerator $sig_gen
I Button Factory $button_factory
testWithAriaRoleIncorrect(Slate $slate)
withMappedSubNodes(callable $f)