Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions tests/src/Unit/Adapter/Psr7/RequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Deviantintegral\Har\Tests\Unit\HarTestBase;
use GuzzleHttp\Psr7\Uri;
use GuzzleHttp\Psr7\Utils;
use Psr\Http\Message\StreamInterface;

class RequestTest extends HarTestBase
{
Expand Down Expand Up @@ -69,7 +68,6 @@ public function testWithRequestTargetThrowsExceptionWhenMissingHost(): void
public function testGetBody(): void
{
$stream = $this->postRequest->getBody();
$this->assertInstanceOf(StreamInterface::class, $stream);
$this->assertEquals('log=&pwd=&wp-submit=Log+In&redirect_to=http%3A%2F%2Fwww.softwareishard.com%2Fblog%2Fwp-admin%2F&testcookie=1', (string) $stream);
}

Expand Down Expand Up @@ -164,9 +162,6 @@ public function testWithUriPreservesHostWhenRequested(): void

// The Host header should remain unchanged
$this->assertEquals($originalHost, $modified->getHeader('Host'));

// Verify it's NOT set to the new URI's host
$this->assertNotEquals(['newhost.example.com'], $modified->getHeader('Host'));
}

public function testWithUriWithEmptyHostDoesNotSetHeader(): void
Expand All @@ -192,7 +187,6 @@ public function testHasHeader(): void
public function testHasHeaderCaseInsensitive(): void
{
// Test that hasHeader works with different case variations
$this->assertTrue($this->getRequest->hasHeader('Accept'));
$this->assertTrue($this->getRequest->hasHeader('accept'));
$this->assertTrue($this->getRequest->hasHeader('ACCEPT'));
$this->assertTrue($this->getRequest->hasHeader('AcCePt'));
Expand Down Expand Up @@ -251,15 +245,12 @@ public function testWithoutHeaderCaseInsensitive(): void
// Test that withoutHeader works with different case variations
$without_accept_lower = $this->getRequest->withoutHeader('accept');
$this->assertFalse($without_accept_lower->hasHeader('Accept'));
$this->assertFalse($without_accept_lower->hasHeader('accept'));

$without_accept_upper = $this->getRequest->withoutHeader('ACCEPT');
$this->assertFalse($without_accept_upper->hasHeader('Accept'));
$this->assertFalse($without_accept_upper->hasHeader('ACCEPT'));

$without_accept_mixed = $this->getRequest->withoutHeader('AcCePt');
$this->assertFalse($without_accept_mixed->hasHeader('Accept'));
$this->assertFalse($without_accept_mixed->hasHeader('AcCePt'));
}

public function testWithAddedHeader(): void
Expand Down Expand Up @@ -294,7 +285,6 @@ public function testWithHeaderDoesNotModifyOriginal(): void
$modified = $original->withHeader('X-Test', 'value');

// Original should not have the new header
$this->assertFalse($original->hasHeader('X-Test'));
$this->assertEquals($originalHeaders, $original->getHeaders());

// Modified should have the new header
Expand Down