Harden quarantine provisioning; enforce strict permissions and update Ansible and docs
This commit is contained in:
21
tests/ContextTest.php
Normal file
21
tests/ContextTest.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use UploadLogger\Core\Context;
|
||||
|
||||
final class ContextTest extends TestCase
|
||||
{
|
||||
public function testContextAccessors(): void
|
||||
{
|
||||
$ctx = new Context('r1', '1.2.3.4', '/u', 'POST', 'application/json', 1000, 'user1', 'ua', '');
|
||||
|
||||
$this->assertEquals('r1', $ctx->getRequestId());
|
||||
$this->assertEquals('1.2.3.4', $ctx->getIp());
|
||||
$this->assertEquals('/u', $ctx->getUri());
|
||||
$this->assertEquals('POST', $ctx->getMethod());
|
||||
$this->assertEquals('application/json', $ctx->getContentType());
|
||||
$this->assertEquals(1000, $ctx->getContentLength());
|
||||
$this->assertEquals('user1', $ctx->getUser());
|
||||
$this->assertEquals('ua', $ctx->getUserAgent());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user