We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6a6d04 commit 3012c15Copy full SHA for 3012c15
tests/Framework/ConfigTest.php
@@ -48,6 +48,16 @@ public function test_get_and_set()
48
49
$this->assertSame(4190, $object->get('test_int'));
50
51
+ // If the configured value is `null`, expect the fallback value (which is `null` by default).
52
+ $object->set('test', null);
53
+ $this->assertNull($object->get('test'));
54
+ $this->assertSame('fallback', $object->get('test', 'fallback'));
55
+
56
+ // If the configured value is `false`, expect `false`, regardless of the fallback value.
57
+ $object->set('test', false);
58
+ $this->assertFalse($object->get('test'));
59
+ $this->assertFalse($object->get('test', 'wrong'));
60
61
// TODO: test more code paths in get() and set()
62
}
63
0 commit comments