Class FactoryImplTest.
More...
◆ setUp()
| ILIAS\GlobalScreen\MainMenu\FactoryImplTest::setUp |
( |
| ) |
|
|
protected |
@inheritDoc
Definition at line 33 of file FactoryImplTest.php.
33 : void
34 {
35 parent::setUp();
36
37 $this->identification = new IdentificationFactory(new NullProviderFactory());
38 $this->provider = $this->getMockBuilder(StaticMainMenuProvider::class)->getMock();
39
40 $this->id = $this->identification->core($this->provider)->identifier('dummy');
41
42 $this->factory = new MainMenuItemFactory();
43 }
◆ testAvailableMethods()
| ILIAS\GlobalScreen\MainMenu\FactoryImplTest::testAvailableMethods |
( |
| ) |
|
Definition at line 46 of file FactoryImplTest.php.
46 : void
47 {
48 $r = new ReflectionClass($this->factory);
49
50 $methods = [];
51 foreach ($r->getMethods(ReflectionMethod::IS_PUBLIC) as $method) {
52 $methods[] = $method->getName();
53 }
54 sort($methods);
55 $this->assertEquals(
56 [
57 0 => 'complex',
58 1 => 'custom',
59 2 => 'link',
60 3 => 'linkList',
61 4 => 'repositoryLink',
62 5 => 'separator',
63 6 => 'topLinkItem',
64 7 => 'topParentItem',
65 ],
66 $methods
67 );
68 }
◆ testInterchangeableContraints()
| ILIAS\GlobalScreen\MainMenu\FactoryImplTest::testInterchangeableContraints |
( |
| ) |
|
Definition at line 71 of file FactoryImplTest.php.
71 : void
72 {
73 $this->assertInstanceOf(isInterchangeableItem::class, $this->factory->topLinkItem($this->id));
74 $this->assertNotInstanceOf(isInterchangeableItem::class, $this->factory->topParentItem($this->id));
75 $this->assertInstanceOf(isInterchangeableItem::class, $this->factory->complex($this->id));
76 $this->assertInstanceOf(isInterchangeableItem::class, $this->factory->link($this->id));
77 $this->assertInstanceOf(isInterchangeableItem::class, $this->factory->repositoryLink($this->id));
78 $this->assertNotInstanceOf(isInterchangeableItem::class, $this->factory->separator($this->id));
79 }
◆ $factory
◆ $id
◆ $identification
◆ $provider
The documentation for this class was generated from the following file: