ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
StorageOnPathWrapperTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
25use PHPUnit\Framework\TestCase;
26
27class StorageOnPathWrapperTest extends TestCase
28{
29 public const PATH = "path";
30
33
34 public function setUp(): void
35 {
36 $this->storage = $this->createMock(Metrics\Storage::class);
37 $this->wrapper = new Metrics\StorageOnPathWrapper(self::PATH, $this->storage);
38 }
39
40 public function testStoresToPath(): void
41 {
42 $key = "key";
43 $m = new M(M::STABILITY_CONFIG, M::TYPE_BOOL, true, "desc");
44
45 $this->storage->expects($this->once())
46 ->method("store")
47 ->with(self::PATH . "." . $key, $m);
48
49 $this->wrapper->store($key, $m);
50 }
51}
A metric is something we can measure about the system.
Definition: Metric.php:34