-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix header collection from array (#18883)
* Fixed HeaderCollection::fromArray() key case * Added CHANGELOG.md line for #18883 (Fixed HeaderCollection::fromArray() key case)
- Loading branch information
Showing
3 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/** | ||
* @link http://www.yiiframework.com/ | ||
* @copyright Copyright (c) 2008 Yii Software LLC | ||
* @license http://www.yiiframework.com/license/ | ||
*/ | ||
|
||
namespace yiiunit\framework\web; | ||
|
||
use yii\web\HeaderCollection; | ||
use yiiunit\TestCase; | ||
|
||
/** | ||
* @group web | ||
*/ | ||
class HeaderCollectionTest extends TestCase | ||
{ | ||
public function testFromArray() | ||
{ | ||
$headerCollection = new HeaderCollection(); | ||
$location = 'my-test-location'; | ||
$headerCollection->fromArray([ | ||
'Location' => [$location], | ||
]); | ||
$this->assertEquals($location, $headerCollection->get('Location')); | ||
} | ||
} |