ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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 32 of file StartUpStepTest.php.

Member Function Documentation

◆ testConstruct()

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

Definition at line 36 of file StartUpStepTest.php.

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

◆ testExecute()

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

Definition at line 57 of file StartUpStepTest.php.

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

◆ testIsInFulfillment()

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

Definition at line 72 of file StartUpStepTest.php.

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

◆ testShouldInterceptRequest()

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

Definition at line 47 of file StartUpStepTest.php.

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

◆ testShouldStoreRequestTarget()

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

Definition at line 41 of file StartUpStepTest.php.

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

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