ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilWACCheckingInstanceTest.php
Go to the documentation of this file.
1<?php
2
19use org\bovigo\vfs\vfsStream;
21use PHPUnit\Framework\Attributes\Test;
22
23require_once("vendor/composer/vendor/autoload.php");
25use PHPUnit\Framework\Testcase;
26use org\bovigo\vfs;
27
34class ilWACCheckingInstanceTest extends Testcase
35{
39 protected $file_one;
43 protected $root;
44
45
49 protected function setUp(): void
50 {
51 $this->root = vfsStream::setup('ilias.de');
52 $this->file_one = vfsStream::newFile('data/trunk/mobs/mm_123/dummy.jpg')
53 ->at($this->root)->setContent('dummy');
54
55 //setup container for HttpServiceAware classes
56 $container = new Container();
57 $container['http'] = fn($c) => Mockery::mock(Services::class);
58
59
60 $GLOBALS["DIC"] = $container;
61 ilWACToken::setSALT('TOKEN');
62 }
63
64
65 public function testDeliver(): void
66 {
67 self::markTestSkipped("WIP");
68 }
69
70
71 public function testBasic(): void
72 {
73 self::markTestSkipped("Can't run test without db.");
74 }
75
76
77 public function testBasicWithFileSigning(): void
78 {
79 self::markTestSkipped("WIP");
80 }
81
82
83 public function testBasicWithFolderSigning(): void
84 {
85 self::markTestSkipped("WIP");
86 }
87
88
89 #[Test]
90 public function testNonCheckingInstanceNoSec(): void
91 {
92 self::markTestSkipped("Can't run test without db.");
93
94 return;
95 // $this->assertTrue($check); // Currently not able to init ILIAS in WAC during PHPUnit
96 // $this->assertEquals(array(
97 // $ilWebAccessChecker::CM_SECFOLDER,
98 // ), $ilWebAccessChecker->getAppliedCheckingMethods());
99 }
100}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
Class Services.
Definition: Services.php:38
TestCase for the ilWACCheckingInstanceTest.
static setSALT(string $salt)
$c
Definition: deliver.php:25
$container
@noRector
Definition: wac.php:37
$GLOBALS["DIC"]
Definition: wac.php:54