19 declare(strict_types=1);
44 $test_key =
'test_key_1';
45 $this->expectException(LogicException::class);
46 $this->expectExceptionMessage(
"'$test_key' is not contained in stack of input.");
47 $this->input->get($test_key);
52 $test_key =
'test_key_1';
53 $expected_value =
'expected_value_1';
56 $this->input->getOr($test_key, $expected_value)
62 $this->assertEquals(
"a", $this->input->get(
"in_a"));
67 $this->assertEquals(
"a", $this->input->getOr(
"in_a",
"default"));
72 $this->assertEquals(
"b", $this->input->get(
"in_b"));
77 $this->assertEquals(
"b", $this->input->getOr(
"in_b",
"default"));
82 $this->assertEquals(
"a", $this->input->get(
"in_both"));
87 $this->assertEquals(
"a", $this->input->getOr(
"in_both",
"default"));