From ce1f3c8ae6c20483eba25b2b5ebde66266c25734 Mon Sep 17 00:00:00 2001 From: Yanick Witschi Date: Thu, 27 Sep 2018 10:08:24 +0200 Subject: [PATCH] Fixed tags header name not being returned --- src/TagHeaderFormatter/MaxHeaderValueLengthFormatter.php | 2 +- .../MaxHeaderValueLengthFormatterTest.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/TagHeaderFormatter/MaxHeaderValueLengthFormatter.php b/src/TagHeaderFormatter/MaxHeaderValueLengthFormatter.php index 6c0dedae..aab0eff9 100644 --- a/src/TagHeaderFormatter/MaxHeaderValueLengthFormatter.php +++ b/src/TagHeaderFormatter/MaxHeaderValueLengthFormatter.php @@ -53,7 +53,7 @@ public function __construct(TagHeaderFormatter $inner, $maxHeaderValueLength = 4 */ public function getTagsHeaderName() { - $this->inner->getTagsHeaderName(); + return $this->inner->getTagsHeaderName(); } /** diff --git a/tests/Unit/TagHeaderFormatter/MaxHeaderValueLengthFormatterTest.php b/tests/Unit/TagHeaderFormatter/MaxHeaderValueLengthFormatterTest.php index 9f3eccf1..6255f63a 100644 --- a/tests/Unit/TagHeaderFormatter/MaxHeaderValueLengthFormatterTest.php +++ b/tests/Unit/TagHeaderFormatter/MaxHeaderValueLengthFormatterTest.php @@ -18,6 +18,12 @@ class MaxHeaderValueLengthFormatterTest extends TestCase { + public function testGetTagsHeaderName() + { + $formatter = $this->getFormatter(50); + $this->assertSame('X-Cache-Tags', $formatter->getTagsHeaderName()); + } + public function testNotTooLong() { $formatter = $this->getFormatter(50);