Class FactoryImplTest.
More...
◆ setUp()
ILIAS\GlobalScreen\MainMenu\FactoryImplTest::setUp |
( |
| ) |
|
|
protected |
@inheritDoc
Definition at line 61 of file FactoryImplTest.php.
61 : void
62 {
63 parent::setUp();
64
65 $this->identification = new IdentificationFactory(new NullProviderFactory());
66 $this->provider = $this->getMockBuilder(StaticMainMenuProvider::class)->getMock();
67
68 $this->id = $this->identification->core($this->provider)->identifier('dummy');
69
70 $this->factory = new MainMenuItemFactory();
71 }
◆ testAvailableMethods()
ILIAS\GlobalScreen\MainMenu\FactoryImplTest::testAvailableMethods |
( |
| ) |
|
Definition at line 74 of file FactoryImplTest.php.
74 : void
75 {
76 $r = new ReflectionClass($this->factory);
77
78 $methods = [];
79 foreach ($r->getMethods(ReflectionMethod::IS_PUBLIC) as $method) {
80 $methods[] = $method->getName();
81 }
82 sort($methods);
83 $this->assertEquals(
84 [
85 0 => 'complex',
86 1 => 'custom',
87 2 => 'link',
88 3 => 'linkList',
89 4 => 'repositoryLink',
90 5 => 'separator',
91 6 => 'topLinkItem',
92 7 => 'topParentItem',
93 ],
94 $methods
95 );
96 }
◆ testInterchangeableContraints()
ILIAS\GlobalScreen\MainMenu\FactoryImplTest::testInterchangeableContraints |
( |
| ) |
|
Definition at line 99 of file FactoryImplTest.php.
99 : void
100 {
101 $this->assertInstanceOf(isInterchangeableItem::class, $this->factory->topLinkItem($this->id));
102 $this->assertNotInstanceOf(isInterchangeableItem::class, $this->factory->topParentItem($this->id));
103 $this->assertInstanceOf(isInterchangeableItem::class, $this->factory->complex($this->id));
104 $this->assertInstanceOf(isInterchangeableItem::class, $this->factory->link($this->id));
105 $this->assertInstanceOf(isInterchangeableItem::class, $this->factory->repositoryLink($this->id));
106 $this->assertNotInstanceOf(isInterchangeableItem::class, $this->factory->separator($this->id));
107 }
◆ $factory
ILIAS\GlobalScreen\MainMenu\FactoryImplTest::$factory |
|
protected |
◆ $id
ILIAS\GlobalScreen\MainMenu\FactoryImplTest::$id |
|
protected |
◆ $identification
ILIAS\GlobalScreen\MainMenu\FactoryImplTest::$identification |
|
protected |
◆ $provider
ILIAS\GlobalScreen\MainMenu\FactoryImplTest::$provider |
|
protected |
The documentation for this class was generated from the following file: