Definition at line 38 of file ProvideTest.php.
◆ testAllowEditing()
| ILIAS\LegalDocuments\test\ProvideTest::testAllowEditing |
( |
| ) |
|
Definition at line 87 of file ProvideTest.php.
89 $document = $this->mock(ProvideDocument::class);
91 $internal = $this->mock(Internal::class);
92 $internal->expects(self::exactly(2))->method(
'get')->withConsecutive([
'document',
'foo'], [
'writable-document',
'foo'])->willReturn($document);
94 $instance =
new Provide(
'foo', $internal, $this->mock(Container::class));
95 $instance->document();
96 $instance->allowEditing()->document();
◆ testConstruct()
| ILIAS\LegalDocuments\test\ProvideTest::testConstruct |
( |
| ) |
|
Definition at line 42 of file ProvideTest.php.
44 $this->assertInstanceOf(Provide::class,
new Provide(
'foo', $this->mock(Internal::class), $this->mock(Container::class)));
◆ testDocument()
| ILIAS\LegalDocuments\test\ProvideTest::testDocument |
( |
| ) |
|
Definition at line 69 of file ProvideTest.php.
71 $document = $this->mock(ProvideDocument::class);
72 $internal = $this->mockMethod(Internal::class,
'get', [
'document',
'foo'], $document);
74 $instance =
new Provide(
'foo', $internal, $this->mock(Container::class));
75 $this->assertSame($document, $instance->document());
◆ testHistory()
| ILIAS\LegalDocuments\test\ProvideTest::testHistory |
( |
| ) |
|
Definition at line 78 of file ProvideTest.php.
80 $history = $this->mock(ProvideHistory::class);
81 $internal = $this->mockMethod(Internal::class,
'get', [
'history',
'foo'], $history);
83 $instance =
new Provide(
'foo', $internal, $this->mock(Container::class));
84 $this->assertSame($history, $instance->history());
◆ testId()
| ILIAS\LegalDocuments\test\ProvideTest::testId |
( |
| ) |
|
Definition at line 109 of file ProvideTest.php.
111 $this->assertSame(
'foo', (
new Provide(
'foo', $this->mock(Internal::class), $this->mock(Container::class)))->
id());
◆ testPublicApi()
| ILIAS\LegalDocuments\test\ProvideTest::testPublicApi |
( |
| ) |
|
Definition at line 99 of file ProvideTest.php.
101 $public_api = $this->mock(PublicApi::class);
102 $internal = $this->mockMethod(Internal::class,
'get', [
'public-api',
'foo'], $public_api);
104 $instance =
new Provide(
'foo', $internal, $this->mock(Container::class));
106 $this->assertSame($public_api, $instance->publicApi());
◆ testPublicPage()
| ILIAS\LegalDocuments\test\ProvideTest::testPublicPage |
( |
| ) |
|
Definition at line 57 of file ProvideTest.php.
References $container.
59 $container = $this->mockTree(Container::class, [
'ctrl' => $this->mock(ilCtrl::class)]);
61 $this->assertInstanceOf(ProvidePublicPage::class, (
new Provide(
'foo', $this->mockMethod(
64 [
'public-page',
'foo'],
◆ testWithdrawal()
| ILIAS\LegalDocuments\test\ProvideTest::testWithdrawal |
( |
| ) |
|
Definition at line 47 of file ProvideTest.php.
References $container.
49 $container = $this->mockTree(Container::class, [
'ctrl' => $this->mock(ilCtrl::class)]);
50 $container->expects(self::once())->method(
'offsetGet')->with(
'ilAuthSession')->willReturn($this->mock(ilAuthSession::class));
52 $instance =
new Provide(
'foo', $this->mockMethod(Internal::class,
'get', [
'withdraw'],
'foo'),
$container);
54 $this->assertInstanceOf(ProvideWithdrawal::class, $instance->withdrawal());
The documentation for this class was generated from the following file: