From 09f4a1c94f4f38c7c7e75345a7eb18c6f9c55b22 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Tue, 29 May 2018 13:46:36 +0200 Subject: [PATCH] AssignRenderTest: found in an orphaned branch... ...cannot hurt --- .../Director/IcingaConfig/AssignRendererTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/php/library/Director/IcingaConfig/AssignRendererTest.php b/test/php/library/Director/IcingaConfig/AssignRendererTest.php index 38336b74..4b9a173b 100644 --- a/test/php/library/Director/IcingaConfig/AssignRendererTest.php +++ b/test/php/library/Director/IcingaConfig/AssignRendererTest.php @@ -87,6 +87,18 @@ class AssignRendererTest extends BaseTestCase ); } + public function testWhetherSlashesAreNotEscaped() + { + $string = 'host.name=' . json_encode('a/b'); + + $expected = 'assign where host.name == "a/b"'; + + $this->assertEquals( + $expected, + $this->renderer($string)->renderAssign() + ); + } + protected function renderer($string) { return AssignRenderer::forFilter(Filter::fromQueryString($string));