1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-27 10:16:47 +00:00
pixelfed/tests/Unit/HttpSignatures/HeaderListTest.php
2018-11-18 20:33:40 -07:00

20 lines
528 B
PHP

<?php
namespace Tests\Unit\HttpSignatures;
use App\Util\HttpSignatures\HeaderList;
class HeaderListTest extends \PHPUnit\Framework\TestCase
{
public function testToString()
{
$hl = new HeaderList(['(request-target)', 'Date']);
$this->assertEquals('(request-target) date', $hl->string());
}
public function testFromStringRoundTripNormalized()
{
$hl = HeaderList::fromString('(request-target) Accept');
$this->assertEquals('(request-target) accept', $hl->string());
}
}