Page MenuHomeDevCentral

CurrentProcessTest.php
No OneTemporary

CurrentProcessTest.php

<?php
namespace Keruald\OmniTools\Tests\OS;
use Keruald\OmniTools\OS\CurrentProcess;
use PHPUnit\Framework\TestCase;
class CurrentProcessTest extends TestCase {
// Probably more usernames are valid, but why tests
// would run in accounts using spaces or UTF-8 emojis?
const USERNAME_REGEXP = "/^([a-zA-Z][a-zA-Z0-9_]*)$/";
public function testGetUsername () {
$actual = CurrentProcess::getUsername();
$this->assertMatchesRegularExpression(self::USERNAME_REGEXP, $actual);
}
}

File Metadata

Mime Type
text/x-php
Expires
Sun, Nov 16, 13:44 (14 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3107899
Default Alt Text
CurrentProcessTest.php (519 B)

Event Timeline