27 $this->assertEquals(
"FOO", $this->
environment->getResource(
"foo"));
28 $this->assertEquals(
"BAR", $this->
environment->getResource(
"bar"));
29 $this->assertNull($this->
environment->getResource(
"baz"));
34 $env = $this->
environment->withResource(
"baz",
"BAZ");
36 $this->assertEquals(
"FOO", $env->getResource(
"foo"));
37 $this->assertEquals(
"BAR", $env->getResource(
"bar"));
38 $this->assertEquals(
"BAZ", $env->getResource(
"baz"));
43 $this->expectException(\RuntimeException::class);
45 $env = $this->
environment->withResource(
"baz",
"BAZ");
46 $env->withResource(
"baz",
"BAZ");
51 $env = $this->
environment->withConfigFor(
"foo",
"BAR");
52 $this->assertEquals(
"BAR", $env->getConfigFor(
"foo"));
57 $this->expectException(\RuntimeException::class);
59 ->withConfigFor(
"foo",
"BAR")
60 ->withConfigFor(
"foo",
"BAZ")
66 $this->expectException(\RuntimeException::class);
72 $env = $this->
environment->withConfigFor(
"foo",
"BAR");
73 $this->assertTrue($env->hasConfigFor(
"foo"));
74 $this->assertFalse($env->hasConfigFor(
"bar"));
testSetResourceRejectsDuplicates()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...