pixelfed/tests/Unit/HttpSignatures/HeaderListTest.php

21 lines
528 B
PHP
Raw Normal View History

2018-11-19 03:33:40 +00:00
<?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());
}
}