ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\LegalDocuments\test\StartUpStepTest Class Reference
+ Inheritance diagram for ILIAS\LegalDocuments\test\StartUpStepTest:
+ Collaboration diagram for ILIAS\LegalDocuments\test\StartUpStepTest:

Public Member Functions

 testConstruct ()
 
 testShouldStoreRequestTarget ()
 
 testShouldInterceptRequest ()
 
 testExecute ()
 
 testIsInFulfillment ()
 

Detailed Description

Definition at line 31 of file StartUpStepTest.php.

Member Function Documentation

◆ testConstruct()

ILIAS\LegalDocuments\test\StartUpStepTest::testConstruct ( )

Definition at line 35 of file StartUpStepTest.php.

35  : void
36  {
37  $this->assertInstanceOf(StartUpStep::class, new StartUpStep($this->mock(ilCtrl::class), $this->mock(Conductor::class)));
38  }

◆ testExecute()

ILIAS\LegalDocuments\test\StartUpStepTest::testExecute ( )

Definition at line 56 of file StartUpStepTest.php.

56  : void
57  {
58  $ctrl = $this->mock(ilCtrl::class);
59  $ctrl->expects(self::once())->method('setParameterByClass')->with('foo', 'id', 'baz');
60  $ctrl->expects(self::once())->method('getLinkTargetByClass')->with(['foo'], 'bar')->willReturn('link');
61  $ctrl->expects(self::once())->method('redirectToURL')->with('link');
62 
63  $instance = new StartUpStep($ctrl, $this->mockTree(Conductor::class, ['intercepting' => [
64  $this->mockTree(Intercept::class, ['intercept' => false, 'id' => 'ho', 'target' => ['guiName' => 'dummy', 'guiPath' => ['dummy'], 'command' => 'hej']]),
65  $this->mockTree(Intercept::class, ['intercept' => true, 'id' => 'baz', 'target' => ['guiName' => 'foo', 'guiPath' => ['foo'], 'command' => 'bar']]),
66  ]]));
67 
68  $instance->execute();
69  }

◆ testIsInFulfillment()

ILIAS\LegalDocuments\test\StartUpStepTest::testIsInFulfillment ( )

Definition at line 71 of file StartUpStepTest.php.

71  : void
72  {
73  $ctrl = $this->mockTree(ilCtrl::class, ['getCmdClass' => 'foo']);
74 
75  $instance = new StartUpStep($ctrl, $this->mockTree(Conductor::class, ['intercepting' => [
76  $this->mockTree(Intercept::class, ['intercept' => true, 'target' => ['guiName' => 'HEJ']]),
77  $this->mockTree(Intercept::class, ['intercept' => true, 'target' => ['guiName' => 'FOO']]),
78  ]]));
79 
80  $this->assertTrue($instance->isInFulfillment());
81  }

◆ testShouldInterceptRequest()

ILIAS\LegalDocuments\test\StartUpStepTest::testShouldInterceptRequest ( )

Definition at line 46 of file StartUpStepTest.php.

46  : void
47  {
48  $instance = new StartUpStep($this->mock(ilCtrl::class), $this->mockTree(Conductor::class, ['intercepting' => [
49  $this->mockTree(Intercept::class, ['intercept' => false]),
50  $this->mockTree(Intercept::class, ['intercept' => true]),
51  ]]));
52 
53  $this->assertTrue($instance->shouldInterceptRequest());
54  }

◆ testShouldStoreRequestTarget()

ILIAS\LegalDocuments\test\StartUpStepTest::testShouldStoreRequestTarget ( )

Definition at line 40 of file StartUpStepTest.php.

40  : void
41  {
42  $instance = new StartUpStep($this->mock(ilCtrl::class), $this->mock(Conductor::class));
43  $this->assertTrue($instance->shouldStoreRequestTarget());
44  }

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