ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ILIAS\Component\Tests\Dependencies\OfComponentTest Class Reference
+ Inheritance diagram for ILIAS\Component\Tests\Dependencies\OfComponentTest:
+ Collaboration diagram for ILIAS\Component\Tests\Dependencies\OfComponentTest:

Public Member Functions

 setUp ()
 
 testGetComponent ()
 
 testInDependencies ()
 

Protected Attributes

PHPUnit Framework MockObject Stub $component
 
D OfComponent $of_component
 

Detailed Description

Definition at line 27 of file OfComponentTest.php.

Member Function Documentation

◆ setUp()

ILIAS\Component\Tests\Dependencies\OfComponentTest::setUp ( )

Definition at line 35 of file OfComponentTest.php.

35 : void
36 {
37 $this->component = $this->createStub(Component::class);
38 $this->of_component = new D\OfComponent(
39 $this->component
40 );
41 }

◆ testGetComponent()

ILIAS\Component\Tests\Dependencies\OfComponentTest::testGetComponent ( )

Definition at line 43 of file OfComponentTest.php.

43 : void
44 {
45 $this->assertEquals($this->component, $this->of_component->getComponent());
46 }

◆ testInDependencies()

ILIAS\Component\Tests\Dependencies\OfComponentTest::testInDependencies ( )

Definition at line 48 of file OfComponentTest.php.

48 : void
49 {
50 $name = TestInterface::class;
51
52 $out = new D\Out(D\OutType::PROVIDE, $name, "Some\\Class", []);
53 $in = new D\In(D\InType::PULL, $name);
54
56 $this->component,
57 $in,
58 $out
59 );
60
61 $result = iterator_to_array($of_component->getInDependencies());
62
63 $this->assertEquals([$in], $result);
64 }
$out
Definition: buildRTE.php:24
A dependency where the component needs something from the world.
Definition: In.php:27
A dependency where the component gives something to the world.
Definition: Out.php:27

References ILIAS\Component\Tests\Dependencies\OfComponentTest\$of_component, and $out.

Field Documentation

◆ $component

PHPUnit Framework MockObject Stub ILIAS\Component\Tests\Dependencies\OfComponentTest::$component
protected

Definition at line 32 of file OfComponentTest.php.

◆ $of_component

D OfComponent ILIAS\Component\Tests\Dependencies\OfComponentTest::$of_component
protected

The documentation for this class was generated from the following file: