ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ILIAS\Cache\CacheTest Class Reference
+ Inheritance diagram for ILIAS\Cache\CacheTest:
+ Collaboration diagram for ILIAS\Cache\CacheTest:

Public Member Functions

 testActivatedComponents ()
 
 testMultipleContainers ()
 
 testLock ()
 
 testInvalidLockTimes (float|int $time)
 
 testDelete ()
 
 testDefaultAdaptor ()
 
 testFlush ()
 
 testAPCAdapter ()
 
 testObjectStorage ()
 
 testTypes ()
 
 testIncomatibleType ()
 
 testIncomatibleNestedType ()
 
 testIncomatibleTypeNested ()
 

Static Public Member Functions

static getInvalidLockTimes ()
 

Data Fields

const TEST_CONTAINER = 'test_container'
 

Protected Member Functions

 setUp ()
 
 getConfig (string $adaptor_name=Config::PHPSTATIC)
 
 getDummyRequest (string $container_key)
 

Private Member Functions

 deactivatedTestMemcachedAdapter ()
 this test cannot be executed in the CI on github sincewe do not have a memcached server there. More...
 

Private Attributes

ilLanguage $language_mock
 
Factory $refinery
 

Detailed Description

Author
Fabian Schmid fabia.nosp@m.n@sr.nosp@m..solu.nosp@m.tion.nosp@m.s

Definition at line 39 of file CacheTest.php.

Member Function Documentation

◆ deactivatedTestMemcachedAdapter()

ILIAS\Cache\CacheTest::deactivatedTestMemcachedAdapter ( )
private

this test cannot be executed in the CI on github sincewe do not have a memcached server there.

I leave it here for local testing if needed.

Definition at line 301 of file CacheTest.php.

References $container, ILIAS\Cache\CacheTest\getConfig(), ILIAS\Cache\CacheTest\getDummyRequest(), and ILIAS\Cache\Config\MEMCACHED.

301  : void
302  {
303  $config = $this->getConfig(Config::MEMCACHED);
304  $services = new Services($config);
305  $container = $services->get($this->getDummyRequest(self::TEST_CONTAINER));
306  $this->assertEquals(Config::MEMCACHED, $container->getAdaptorName());
307  $this->assertEquals(self::TEST_CONTAINER, $container->getContainerName());
308 
309  $apcu = new Memcached($config);
310  if (!$apcu->isAvailable()) {
311  $this->markTestSkipped('Memcached is not available');
312  }
313 
314  $this->assertFalse($container->has('test'));
315  $container->set('test', 'test_value');
316  $this->assertTrue($container->has('test'));
317  $this->assertEquals('test_value', $container->get('test'));
318  $container->delete('test');
319  $this->assertFalse($container->has('test'));
320 
321  $container->set('test2', 'test_value2');
322  $container->set('test3', 'test_value3');
323  $this->assertTrue($container->has('test2'));
324  $this->assertTrue($container->has('test3'));
325 
326  $container->flush();
327 
328  $this->assertFalse($container->has('test2'));
329  $this->assertFalse($container->has('test3'));
330  }
$container
Definition: wac.php:36
getConfig(string $adaptor_name=Config::PHPSTATIC)
Definition: CacheTest.php:63
getDummyRequest(string $container_key)
Definition: CacheTest.php:473
+ Here is the call graph for this function:

◆ getConfig()

ILIAS\Cache\CacheTest::getConfig ( string  $adaptor_name = Config::PHPSTATIC)
protected
Returns
Config

Definition at line 63 of file CacheTest.php.

Referenced by ILIAS\Cache\CacheTest\deactivatedTestMemcachedAdapter(), ILIAS\Cache\CacheTest\setUp(), ILIAS\Cache\CacheTest\testAPCAdapter(), ILIAS\Cache\CacheTest\testDefaultAdaptor(), ILIAS\Cache\CacheTest\testDelete(), ILIAS\Cache\CacheTest\testFlush(), ILIAS\Cache\CacheTest\testIncomatibleNestedType(), ILIAS\Cache\CacheTest\testIncomatibleType(), ILIAS\Cache\CacheTest\testIncomatibleTypeNested(), ILIAS\Cache\CacheTest\testInvalidLockTimes(), ILIAS\Cache\CacheTest\testLock(), ILIAS\Cache\CacheTest\testObjectStorage(), and ILIAS\Cache\CacheTest\testTypes().

63  : Config
64  {
65  return new Config(
66  $adaptor_name,
67  true,
68  [self::TEST_CONTAINER],
69  new class () extends NullNodeRepository {
70  public function getNodes(): array
71  {
72  return [new Node('127.0.0.1', 11211, 100)];
73  }
74  }
75  );
76  }
+ Here is the caller graph for this function:

◆ getDummyRequest()

◆ getInvalidLockTimes()

static ILIAS\Cache\CacheTest::getInvalidLockTimes ( )
static

Definition at line 174 of file CacheTest.php.

174  : array
175  {
176  return [
177  [-10],
178  [-1],
179  [301],
180  [300.1],
181  ];
182  }

◆ setUp()

ILIAS\Cache\CacheTest::setUp ( )
protected

Definition at line 48 of file CacheTest.php.

References ILIAS\Cache\CacheTest\getConfig(), ILIAS\Cache\Config\PHPSTATIC, and ILIAS\Repository\refinery().

48  : void
49  {
50  $this->language_mock = $this->createMock(\ilLanguage::class);
51  $this->refinery = new Factory(
52  new \ILIAS\Data\Factory(),
53  $this->language_mock
54  );
55  // prevent chached values between tests
56  $static_flush = new PHPStatic($this->getConfig(Config::PHPSTATIC));
57  $static_flush->flush();
58  }
Interface Observer Contains several chained tasks and infos about them.
getConfig(string $adaptor_name=Config::PHPSTATIC)
Definition: CacheTest.php:63
+ Here is the call graph for this function:

◆ testActivatedComponents()

ILIAS\Cache\CacheTest::testActivatedComponents ( )

Definition at line 78 of file CacheTest.php.

References ILIAS\Cache\Config\PHPSTATIC.

78  : void
79  {
80  $config = new Config(
82  true,
83  ['one', 'two']
84  );
85 
86  $services = new Services($config);
87  $this->assertInstanceOf(ActiveContainer::class, $services->get($this->getDummyRequest('one')));
88  $this->assertInstanceOf(ActiveContainer::class, $services->get($this->getDummyRequest('two')));
89  $this->assertInstanceOf(VoidContainer::class, $services->get($this->getDummyRequest('three')));
90 
91  $config = new Config(
93  true,
94  ['*']
95  );
96  $services = new Services($config);
97  $this->assertInstanceOf(ActiveContainer::class, $services->get($this->getDummyRequest('one')));
98  $this->assertInstanceOf(ActiveContainer::class, $services->get($this->getDummyRequest('two')));
99  $this->assertInstanceOf(ActiveContainer::class, $services->get($this->getDummyRequest('three')));
100  }

◆ testAPCAdapter()

ILIAS\Cache\CacheTest::testAPCAdapter ( )

Definition at line 264 of file CacheTest.php.

References $container, ILIAS\Cache\Config\APCU, ILIAS\Cache\CacheTest\getConfig(), ILIAS\Cache\CacheTest\getDummyRequest(), and ILIAS\Repository\refinery().

264  : void
265  {
266  $config = $this->getConfig(Config::APCU);
267  $services = new Services($config);
268  $container = $services->get($this->getDummyRequest(self::TEST_CONTAINER));
269  $this->assertEquals(Config::APCU, $container->getAdaptorName());
270  $this->assertEquals(self::TEST_CONTAINER, $container->getContainerName());
271 
272  $apcu = new APCu($config);
273  if (!$apcu->isAvailable() || !(bool) ini_get('apc.enable_cli')) {
274  $this->markTestSkipped('APCu is not available or not enabled for CLI');
275  }
276 
277  $to_string = $this->refinery->kindlyTo()->string();
278 
279  $this->assertFalse($container->has('test'));
280  $container->set('test', 'test_value');
281  $this->assertTrue($container->has('test'));
282  $this->assertEquals('test_value', $container->get('test', $to_string));
283  $container->delete('test');
284  $this->assertFalse($container->has('test'));
285 
286  $container->set('test2', 'test_value2');
287  $container->set('test3', 'test_value3');
288  $this->assertTrue($container->has('test2'));
289  $this->assertTrue($container->has('test3'));
290 
291  $container->flush();
292 
293  $this->assertFalse($container->has('test2'));
294  $this->assertFalse($container->has('test3'));
295  }
$container
Definition: wac.php:36
getConfig(string $adaptor_name=Config::PHPSTATIC)
Definition: CacheTest.php:63
getDummyRequest(string $container_key)
Definition: CacheTest.php:473
+ Here is the call graph for this function:

◆ testDefaultAdaptor()

ILIAS\Cache\CacheTest::testDefaultAdaptor ( )

Definition at line 207 of file CacheTest.php.

References $container, ILIAS\Cache\CacheTest\getConfig(), ILIAS\Cache\CacheTest\getDummyRequest(), ILIAS\Cache\Config\PHPSTATIC, and ILIAS\Repository\refinery().

207  : void
208  {
209  $request = $this->getDummyRequest(self::TEST_CONTAINER);
210 
211  $to_string = $this->refinery->kindlyTo()->string();
212 
213  $config = $this->getConfig();
214 
215  $static = new PHPStatic($config);
216  $this->assertTrue($static->isAvailable());
217 
218  $services = new Services($config);
219  $container = $services->get($request);
220  $this->assertInstanceOf(ActiveContainer::class, $container);
221  $this->assertEquals(Config::PHPSTATIC, $container->getAdaptorName());
222  $this->assertEquals(self::TEST_CONTAINER, $container->getContainerName());
223 
224  $this->assertFalse($container->has('test'));
225  $container->set('test', 'test_value');
226  $this->assertTrue($container->has('test'));
227  $this->assertEquals('test_value', $container->get('test', $to_string));
228  $container->delete('test');
229  $this->assertFalse($container->has('test'));
230 
231  $container->set('test2', 'test_value2');
232  $container->set('test3', 'test_value3');
233  $this->assertTrue($container->has('test2'));
234  $this->assertTrue($container->has('test3'));
235 
236  $container->flush();
237 
238  $this->assertFalse($container->has('test2'));
239  $this->assertFalse($container->has('test3'));
240  }
$container
Definition: wac.php:36
getConfig(string $adaptor_name=Config::PHPSTATIC)
Definition: CacheTest.php:63
getDummyRequest(string $container_key)
Definition: CacheTest.php:473
+ Here is the call graph for this function:

◆ testDelete()

ILIAS\Cache\CacheTest::testDelete ( )

Definition at line 193 of file CacheTest.php.

References $container, ILIAS\Cache\CacheTest\getConfig(), and ILIAS\Cache\CacheTest\getDummyRequest().

193  : void
194  {
195  $services = new Services($this->getConfig());
196  $container = $services->get($this->getDummyRequest(self::TEST_CONTAINER));
197 
198  $container->set('test', 'test_value');
199  $this->assertTrue($container->has('test'));
200  $this->assertEquals('test_value', $container->get('test', $this->refinery->to()->string()));
201 
202  $container->delete('test');
203  $this->assertFalse($container->has('test'));
204  $this->assertNull($container->get('test', $this->refinery->to()->string()));
205  }
$container
Definition: wac.php:36
getConfig(string $adaptor_name=Config::PHPSTATIC)
Definition: CacheTest.php:63
getDummyRequest(string $container_key)
Definition: CacheTest.php:473
+ Here is the call graph for this function:

◆ testFlush()

ILIAS\Cache\CacheTest::testFlush ( )

Definition at line 242 of file CacheTest.php.

References $container, ILIAS\Cache\CacheTest\getConfig(), and ILIAS\Cache\CacheTest\getDummyRequest().

242  : void
243  {
244  $services = new Services($this->getConfig());
245  $container = $services->get($this->getDummyRequest(self::TEST_CONTAINER));
246 
247  $container->set('test', 'test_value');
248  $this->assertTrue($container->has('test'));
249  $this->assertEquals('test_value', $container->get('test', $this->refinery->to()->string()));
250 
251  $container->flush();
252  $this->assertFalse($container->has('test'));
253  $this->assertNull($container->get('test', $this->refinery->to()->string()));
254 
255  $container->set('test', 'test_value');
256  $this->assertTrue($container->has('test'));
257  $this->assertEquals('test_value', $container->get('test', $this->refinery->to()->string()));
258 
259  $services->flushAdapter();
260  $this->assertFalse($container->has('test'));
261  $this->assertNull($container->get('test', $this->refinery->to()->string()));
262  }
$container
Definition: wac.php:36
getConfig(string $adaptor_name=Config::PHPSTATIC)
Definition: CacheTest.php:63
getDummyRequest(string $container_key)
Definition: CacheTest.php:473
+ Here is the call graph for this function:

◆ testIncomatibleNestedType()

ILIAS\Cache\CacheTest::testIncomatibleNestedType ( )

Definition at line 441 of file CacheTest.php.

References $container, ILIAS\Cache\CacheTest\getConfig(), and ILIAS\Cache\CacheTest\getDummyRequest().

441  : void
442  {
443  $services = new Services($this->getConfig());
444  $container = $services->get(
445  $this->getDummyRequest(self::TEST_CONTAINER)
446  );
447  $array_with_incompatible_type_in_it = [
448  'test' => 'test',
449  'test2' => 'test2',
450  'test3' => ['test' => new \stdClass()]
451  ];
452  $this->expectException(\InvalidArgumentException::class);
453  $container->set(
454  'array_with_incompatible_type_in_it',
455  $array_with_incompatible_type_in_it
456  );
457  }
$container
Definition: wac.php:36
getConfig(string $adaptor_name=Config::PHPSTATIC)
Definition: CacheTest.php:63
getDummyRequest(string $container_key)
Definition: CacheTest.php:473
+ Here is the call graph for this function:

◆ testIncomatibleType()

ILIAS\Cache\CacheTest::testIncomatibleType ( )

Definition at line 430 of file CacheTest.php.

References $container, ILIAS\Cache\CacheTest\getConfig(), and ILIAS\Cache\CacheTest\getDummyRequest().

430  : void
431  {
432  $services = new Services($this->getConfig());
433  $container = $services->get(
434  $this->getDummyRequest(self::TEST_CONTAINER)
435  );
436 
437  $this->expectException(\TypeError::class);
438  $container->set('test', new \stdClass());
439  }
$container
Definition: wac.php:36
getConfig(string $adaptor_name=Config::PHPSTATIC)
Definition: CacheTest.php:63
getDummyRequest(string $container_key)
Definition: CacheTest.php:473
+ Here is the call graph for this function:

◆ testIncomatibleTypeNested()

ILIAS\Cache\CacheTest::testIncomatibleTypeNested ( )

Definition at line 459 of file CacheTest.php.

References $container, ILIAS\Cache\CacheTest\getConfig(), and ILIAS\Cache\CacheTest\getDummyRequest().

459  : void
460  {
461  $services = new Services($this->getConfig());
462  $container = $services->get($this->getDummyRequest(self::TEST_CONTAINER));
463 
464  $array_with_incompatible_type_in_it = [
465  'test' => 'test',
466  'test2' => 'test2',
467  'test3' => ['test' => new \stdClass()]
468  ];
469  $this->expectException(\InvalidArgumentException::class);
470  $container->set('array_with_incompatible_type_in_it', $array_with_incompatible_type_in_it);
471  }
$container
Definition: wac.php:36
getConfig(string $adaptor_name=Config::PHPSTATIC)
Definition: CacheTest.php:63
getDummyRequest(string $container_key)
Definition: CacheTest.php:473
+ Here is the call graph for this function:

◆ testInvalidLockTimes()

ILIAS\Cache\CacheTest::testInvalidLockTimes ( float|int  $time)

Definition at line 185 of file CacheTest.php.

References $container, ILIAS\Cache\CacheTest\getConfig(), and ILIAS\Cache\CacheTest\getDummyRequest().

185  : void
186  {
187  $services = new Services($this->getConfig());
188  $container = $services->get($this->getDummyRequest(self::TEST_CONTAINER));
189  $this->expectException(\InvalidArgumentException::class);
190  $container->lock($time);
191  }
$container
Definition: wac.php:36
getConfig(string $adaptor_name=Config::PHPSTATIC)
Definition: CacheTest.php:63
getDummyRequest(string $container_key)
Definition: CacheTest.php:473
+ Here is the call graph for this function:

◆ testLock()

ILIAS\Cache\CacheTest::testLock ( )

Definition at line 141 of file CacheTest.php.

References $container, ILIAS\Cache\CacheTest\getConfig(), and ILIAS\Cache\CacheTest\getDummyRequest().

141  : void
142  {
143  $services = new Services($this->getConfig());
144  $container = $services->get($this->getDummyRequest(self::TEST_CONTAINER));
145  $container->unlock();
146 
147  $container->set('test', 'test_value');
148  $this->assertTrue($container->has('test'));
149  $this->assertEquals('test_value', $container->get('test', $this->refinery->to()->string()));
150 
151  $container->lock(1 / 1000);
152  $this->assertTrue($container->isLocked());
153  $this->assertFalse($container->has('test'));
154  $this->assertNull($container->get('test', $this->refinery->to()->string()));
155  usleep(1000);
156  $this->assertFalse($container->isLocked());
157  $this->assertTrue($container->has('test'));
158  $this->assertEquals('test_value', $container->get('test', $this->refinery->to()->string()));
159 
160  // Second Run
161  $container->lock(1 / 1000);
162  $this->assertTrue($container->isLocked());
163  $this->assertFalse($container->has('test'));
164  $this->assertNull($container->get('test', $this->refinery->to()->string()));
165  usleep(100);
166  $this->assertTrue($container->isLocked());
167  $this->assertFalse($container->has('test'));
168  $this->assertNull($container->get('test', $this->refinery->to()->string()));
169 
170  usleep(5000); // to avoid problems with the next test
171  $this->assertFalse($container->isLocked());
172  }
$container
Definition: wac.php:36
getConfig(string $adaptor_name=Config::PHPSTATIC)
Definition: CacheTest.php:63
getDummyRequest(string $container_key)
Definition: CacheTest.php:473
+ Here is the call graph for this function:

◆ testMultipleContainers()

ILIAS\Cache\CacheTest::testMultipleContainers ( )

Definition at line 102 of file CacheTest.php.

References ILIAS\Cache\CacheTest\getDummyRequest(), and ILIAS\Cache\Config\PHPSTATIC.

102  : void
103  {
104  $config = new Config(
106  true,
107  ['one', 'two']
108  );
109 
110  $services = new Services($config);
111 
112  $one = $this->getDummyRequest('one');
113  $two = $this->getDummyRequest('two');
114  $three = $this->getDummyRequest('three');
115 
116  $this->assertEquals('one', $one->getContainerKey());
117  $this->assertEquals('two', $two->getContainerKey());
118  $this->assertEquals('three', $three->getContainerKey());
119 
120  $container_one = $services->get($one);
121  $container_two = $services->get($two);
122  $container_three = $services->get($three);
123 
124  $this->assertInstanceOf(ActiveContainer::class, $container_one);
125  $this->assertInstanceOf(ActiveContainer::class, $container_two);
126  $this->assertInstanceOf(VoidContainer::class, $container_three);
127 
128  $container_one->set('test', 'test_value');
129  $this->assertTrue($container_one->has('test'));
130  $this->assertEquals('test_value', $container_one->get('test', $this->refinery->to()->string()));
131 
132  $container_two->set('test', 'test_value');
133  $this->assertTrue($container_two->has('test'));
134  $this->assertEquals('test_value', $container_two->get('test', $this->refinery->to()->string()));
135 
136  $container_three->set('test', 'test_value');
137  $this->assertFalse($container_three->has('test'));
138  $this->assertNull($container_three->get('test', $this->refinery->to()->string()));
139  }
getDummyRequest(string $container_key)
Definition: CacheTest.php:473
+ Here is the call graph for this function:

◆ testObjectStorage()

ILIAS\Cache\CacheTest::testObjectStorage ( )

Definition at line 332 of file CacheTest.php.

References $container, $data, ILIAS\Cache\CacheTest\getConfig(), ILIAS\Cache\CacheTest\getDummyRequest(), and ILIAS\Repository\refinery().

332  : void
333  {
334  $services = new Services($this->getConfig());
335  $container = $services->get($this->getDummyRequest(self::TEST_CONTAINER));
336 
337  $first_object = new \stdClass();
338  $first_object->test = 'test';
339  $container->set('first_object', serialize($first_object));
340 
341  $this->assertTrue($container->has('first_object'));
342 
343  $to_string = $this->refinery->kindlyTo()->string();
344 
345  $data = $container->get('first_object', $to_string);
346  $first_object_from_cache = unserialize($data, ['allowed_classes' => [\stdClass::class]]);
347  $this->assertInstanceOf(\stdClass::class, $first_object_from_cache);
348  $this->assertEquals($first_object, $first_object_from_cache);
349  }
$container
Definition: wac.php:36
getConfig(string $adaptor_name=Config::PHPSTATIC)
Definition: CacheTest.php:63
getDummyRequest(string $container_key)
Definition: CacheTest.php:473
+ Here is the call graph for this function:

◆ testTypes()

ILIAS\Cache\CacheTest::testTypes ( )

Definition at line 351 of file CacheTest.php.

References $container, ILIAS\Cache\CacheTest\getConfig(), ILIAS\Cache\CacheTest\getDummyRequest(), null, and ILIAS\Repository\refinery().

351  : void
352  {
353  $services = new Services($this->getConfig());
354  $container = $services->get($this->getDummyRequest(self::TEST_CONTAINER));
355 
356  // TRANSFORMATION
357  $to_string = $this->refinery->to()->string();
358  $to_int = $this->refinery->to()->int();
359  $to_array = $this->refinery->to()->listOf($to_string);
360  $to_bool = $this->refinery->to()->bool();
361 
362  // STRING
363  $string = 'test';
364  $container->set('string', $string);
365  $this->assertTrue($container->has('string'));
366  $string_from_cache = $container->get('string', $to_string);
367  $this->assertEquals($string, $string_from_cache);
368  $this->assertEquals(null, $container->get('string', $to_int));
369  $this->assertEquals(null, $container->get('string', $to_bool));
370  $this->assertEquals(null, $container->get('string', $to_array));
371  $this->assertIsString($string_from_cache);
372 
373  // ARRAY
374  $array = ['test', 'test2', 'test3'];
375  $container->set('array', $array);
376  $this->assertTrue($container->has('array'));
377  $array_from_cache = $container->get('array', $to_array);
378  $this->assertEquals($array, $array_from_cache);
379  $this->assertEquals(null, $container->get('array', $to_int));
380  $this->assertEquals(null, $container->get('array', $to_bool));
381  $this->assertEquals(null, $container->get('array', $to_string));
382  $this->assertIsArray($array_from_cache);
383 
384  // BOOL
385  $bool = true;
386  $container->set('bool', $bool);
387  $this->assertTrue($container->has('bool'));
388  $bool_from_cache = $container->get('bool', $to_bool);
389  $this->assertEquals($bool, $bool_from_cache);
390  $this->assertEquals(null, $container->get('bool', $to_int));
391  $this->assertEquals(null, $container->get('bool', $to_array));
392  $this->assertEquals(null, $container->get('bool', $to_string));
393  $this->assertIsBool($bool_from_cache);
394 
395  // ARRAY Different values
396  $array_with_different_values = ['test' => true, 'test2' => 123, 'test3' => ['test' => 'test'], 'test4' => null];
397  $container->set('array_with_different_values', $array_with_different_values);
398  $this->assertTrue($container->has('array_with_different_values'));
399 
400  $trafo = $this->refinery->to()->dictOf(
401  $this->refinery->custom()->transformation(
402  fn($value) => $value
403  )
404  );
405 
406  $array_with_different_values_from_cache = $container->get('array_with_different_values', $trafo);
407  $this->assertEquals($array_with_different_values, $array_with_different_values_from_cache);
408  $this->assertIsArray($array_with_different_values_from_cache);
409  $this->assertIsBool($array_with_different_values_from_cache['test']);
410  $this->assertIsInt($array_with_different_values_from_cache['test2']);
411  $this->assertIsArray($array_with_different_values_from_cache['test3']);
412  $this->assertNull($array_with_different_values_from_cache['test4']);
413 
414  $this->assertEquals(null, $container->get('array_with_different_values', $to_int));
415  $this->assertEquals(null, $container->get('array_with_different_values', $to_bool));
416  $this->assertEquals(null, $container->get('array_with_different_values', $to_string));
417 
418  // INT
419  $int = 123;
420  $container->set('int', $int);
421  $this->assertTrue($container->has('int'));
422  $int_from_cache = $container->get('int', $to_int);
423  $this->assertEquals($int, $int_from_cache);
424  $this->assertEquals(null, $container->get('int', $to_string));
425  $this->assertEquals(null, $container->get('int', $to_bool));
426  $this->assertEquals(null, $container->get('int', $to_array));
427  $this->assertIsInt($int_from_cache);
428  }
$container
Definition: wac.php:36
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getConfig(string $adaptor_name=Config::PHPSTATIC)
Definition: CacheTest.php:63
getDummyRequest(string $container_key)
Definition: CacheTest.php:473
+ Here is the call graph for this function:

Field Documentation

◆ $language_mock

ilLanguage ILIAS\Cache\CacheTest::$language_mock
private

Definition at line 45 of file CacheTest.php.

◆ $refinery

Factory ILIAS\Cache\CacheTest::$refinery
private

Definition at line 46 of file CacheTest.php.

◆ TEST_CONTAINER

const ILIAS\Cache\CacheTest::TEST_CONTAINER = 'test_container'

Definition at line 41 of file CacheTest.php.


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