ILIAS  release_8 Revision v8.24
StorageOnPathWrapperTest.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
22
25use PHPUnit\Framework\TestCase;
26
27class 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}
A metric is something we can measure about the system.
Definition: Metric.php:34
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const PATH
Definition: proxy_ylocal.php:8