ILIAS  release_8 Revision v8.24
ilWACCheckingInstanceTest.php
Go to the documentation of this file.
1<?php
2
21use Mockery\Adapter\Phpunit\MockeryTestCase;
22use Mockery\MockInterface;
23use org\bovigo\vfs;
24use Psr\Http\Message\ServerRequestInterface;
25use Psr\Http\Message\UriInterface;
26
38class ilWACCheckingInstanceTest //extends MockeryTestCase
39{
43 protected $file_one;
47 protected $root;
48
49
53 protected function setUp(): void
54 {
55 $this->root = vfs\vfsStream::setup('ilias.de');
56 $this->file_one = vfs\vfsStream::newFile('data/trunk/mobs/mm_123/dummy.jpg')
57 ->at($this->root)->setContent('dummy');
58
59 //setup container for HttpServiceAware classes
60 $container = new \ILIAS\DI\Container();
61 $container['http'] = fn ($c) => Mockery::mock(Services::class);
62
63
64 $GLOBALS["DIC"] = $container;
65 ilWACToken::setSALT('TOKEN');
66 }
67
68
75 public function testDeliver(): void
76 {
77 self::markTestSkipped("WIP");
78 }
79
80
81 public function testBasic(): void
82 {
83 self::markTestSkipped("Can't run test without db.");
84 }
85
86
87 public function testBasicWithFileSigning(): void
88 {
89 self::markTestSkipped("WIP");
90 }
91
92
93 public function testBasicWithFolderSigning(): void
94 {
95 self::markTestSkipped("WIP");
96 }
97
98
102 public function testNonCheckingInstanceNoSec(): void
103 {
104 self::markTestSkipped("Can't run test without db.");
105
106 return;
107 // $this->assertTrue($check); // Currently not able to init ILIAS in WAC during PHPUnit
108 // $this->assertEquals(array(
109 // $ilWebAccessChecker::CM_SECFOLDER,
110 // ), $ilWebAccessChecker->getAppliedCheckingMethods());
111 }
112}
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
Class Services.
Definition: Services.php:38
TestCase for the ilWACCheckingInstanceTest.
testDeliver()
@runInSeparateProcess @preserveGlobalState disabled @backupGlobals disabled @backupStaticAttributes d...
static setSALT(string $salt)
$c
Definition: cli.php:38
$container
@noRector
Definition: wac.php:14