Skip to content

Commit dd54d82

Browse files
committed
:octocat: renamed Header -> HeaderUtil
1 parent 32625a7 commit dd54d82

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/Header.php renamed to src/HeaderUtil.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Class Header
3+
* Class HeaderUtil
44
*
55
* @created 28.03.2021
66
* @author smiley <smiley@chillerlan.net>
@@ -16,7 +16,7 @@
1616
/**
1717
*
1818
*/
19-
class Header{
19+
class HeaderUtil{
2020

2121
/**
2222
* Normalizes an array of header lines to format ["Name" => "Value (, Value2, Value3, ...)", ...]

tests/HeaderTest.php renamed to tests/HeaderUtilTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010

1111
namespace chillerlan\HTTPTest\Utils;
1212

13-
use chillerlan\HTTP\Utils\Header;
13+
use chillerlan\HTTP\Utils\HeaderUtil;
1414

1515
/**
1616
*
1717
*/
18-
class HeaderTest extends TestAbstract{
18+
class HeaderUtilTest extends TestAbstract{
1919

2020
public function headerDataProvider():array{
2121
return [
@@ -40,7 +40,7 @@ public function headerDataProvider():array{
4040
* @param array $normalized
4141
*/
4242
public function testNormalizeHeaders(array $headers, array $normalized):void{
43-
$this::assertSame($normalized, Header::normalize($headers));
43+
$this::assertSame($normalized, HeaderUtil::normalize($headers));
4444
}
4545

4646
public function testCombineHeaderFields():void{
@@ -60,11 +60,11 @@ public function testCombineHeaderFields():void{
6060
'Accept' => 'foo, bar',
6161
'X-Whatever' => 'nope',
6262
'X-Foo' => 'bar, baz, what, nope'
63-
], Header::normalize($headers));
63+
], HeaderUtil::normalize($headers));
6464

6565
$r = $this->responseFactory->createResponse();
6666

67-
foreach(Header::normalize($headers) as $k => $v){
67+
foreach(HeaderUtil::normalize($headers) as $k => $v){
6868
$r = $r->withAddedHeader($k, $v);
6969
}
7070

@@ -89,7 +89,7 @@ public function testCombinedCookieHeaders():void{
8989
'foo' => 'foo=baz',
9090
'whatever' => 'whatever=nope; HttpOnly'
9191
]
92-
], Header::normalize($headers));
92+
], HeaderUtil::normalize($headers));
9393
}
9494

9595

0 commit comments

Comments
 (0)