Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12742279
CurrentProcessTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
519 B
Referenced Files
None
Subscribers
None
CurrentProcessTest.php
View Options
<?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
Details
Attached
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)
Attached To
Mode
rKERUALD Keruald libraries development repository
Attached
Detach File
Event Timeline
Log In to Comment