Definition at line 37 of file WithdrawProcessTest.php.
◆ testConstruct()
ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\WithdrawProcessTest::testConstruct |
( |
| ) |
|
Definition at line 41 of file WithdrawProcessTest.php.
43 $this->assertInstanceOf(WithdrawProcess::class,
new WithdrawProcess(
44 $this->mock(User::class),
45 $this->mock(UI::class),
46 $this->mock(Routing::class),
47 $this->mock(Settings::class),
49 $this->mock(Provide::class),
◆ testIsOnGoing()
ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\WithdrawProcessTest::testIsOnGoing |
( |
| ) |
|
Definition at line 72 of file WithdrawProcessTest.php.
74 $instance =
new WithdrawProcess(
75 $this->mockTree(User::class, [
'withdrawalRequested' => [
'value' =>
true]]),
76 $this->mock(UI::class),
77 $this->mock(Routing::class),
78 $this->mock(Settings::class),
80 $this->mock(Provide::class),
84 $this->assertTrue($instance->isOnGoing());
◆ testShowValidatePasswordMessage()
ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\WithdrawProcessTest::testShowValidatePasswordMessage |
( |
| ) |
|
Definition at line 54 of file WithdrawProcessTest.php.
56 $instance =
new WithdrawProcess(
57 $this->mock(User::class),
58 $this->mock(UI::class),
59 $this->mock(Routing::class),
60 $this->mock(Settings::class),
62 $this->mock(Provide::class),
66 $array = $instance->showValidatePasswordMessage();
67 $this->assertSame(2, count($array));
68 $this->assertInstanceOf(Component::class, $array[0]);
69 $this->assertInstanceOf(Component::class, $array[1]);
◆ testShowWithdraw()
ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\WithdrawProcessTest::testShowWithdraw |
( |
| ) |
|
Definition at line 143 of file WithdrawProcessTest.php.
145 $instance =
new WithdrawProcess(
146 $this->mock(User::class),
147 $this->mock(UI::class),
148 $this->mock(Routing::class),
149 $this->mock(Settings::class),
151 $this->mock(Provide::class),
155 $this->assertInstanceOf(PageFragment::class, $instance->showWithdraw(
'foo',
''));
◆ testWithdrawalFinished()
ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\WithdrawProcessTest::testWithdrawalFinished |
( |
| ) |
|
Definition at line 125 of file WithdrawProcessTest.php.
References null.
127 $main_template = $this->mock(ilGlobalTemplateInterface::class);
128 $main_template->expects(self::once())->method(
'setOnScreenMessage');
130 $instance =
new WithdrawProcess(
131 $this->mock(User::class),
132 $this->mockTree(UI::class, [
'mainTemplate' => $main_template]),
133 $this->mock(Routing::class),
134 $this->mock(Settings::class),
136 $this->mock(Provide::class),
140 $instance->withdrawalFinished();
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
◆ testWithdrawalRequested()
ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\WithdrawProcessTest::testWithdrawalRequested |
( |
| ) |
|
Definition at line 87 of file WithdrawProcessTest.php.
References ILIAS\$setting.
89 $setting = $this->mock(Setting::class);
90 $setting->expects(self::once())->method(
'update')->with(
true);
92 $instance =
new WithdrawProcess(
93 $this->mockTree(User::class, [
'cannotAgree' =>
false,
'neverAgreed' =>
false,
'withdrawalRequested' =>
$setting]),
94 $this->mock(UI::class),
95 $this->mock(Routing::class),
96 $this->mock(Settings::class),
98 $this->mock(Provide::class),
102 $reflection = new \ReflectionClass($instance);
103 $method = $reflection->getMethod(
'withdrawalRequested');
104 $method->invoke($instance);
◆ testWithdrawalRequestedWithInvalidUser()
ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\WithdrawProcessTest::testWithdrawalRequestedWithInvalidUser |
( |
| ) |
|
Definition at line 107 of file WithdrawProcessTest.php.
109 $instance =
new WithdrawProcess(
110 $this->mockTree(User::class, [
'cannotAgree' =>
true,
'neverAgreed' =>
false]),
111 $this->mock(UI::class),
112 $this->mock(Routing::class),
113 $this->mock(Settings::class),
115 $this->mock(Provide::class),
119 $reflection = new \ReflectionClass($instance);
120 $method = $reflection->getMethod(
'withdrawalRequested');
121 $method->invoke($instance);
122 $this->assertTrue(
true);
The documentation for this class was generated from the following file: