ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
StorageOnPathWrapperTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
22 
26 
27 class StorageOnPathWrapperTest extends TestCase
28 {
29  public const PATH = "path";
30 
31  public function setUp(): void
32  {
33  $this->storage = $this->createMock(Metrics\Storage::class);
34  $this->wrapper = new Metrics\StorageOnPathWrapper(self::PATH, $this->storage);
35  }
36 
37  public function testStoresToPath(): void
38  {
39  $key = "key";
40  $m = new M(M::STABILITY_CONFIG, M::TYPE_BOOL, true, "desc");
41 
42  $this->storage->expects($this->once())
43  ->method("store")
44  ->with(self::PATH . "." . $key, $m);
45 
46  $this->wrapper->store($key, $m);
47  }
48 }
const PATH
Definition: proxy_ylocal.php:8
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
string $key
Consumer key/client ID value.
Definition: System.php:193
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...