mirror of
https://github.com/Vateron-Media/XC_VM.git
synced 2026-10-03 04:02:10 +02:00
test(core): unit tests for Util/Database/Enum pure logic (+44 tests)
Adds tests for Encryption, TimeUtils, QueryHelper, AdminHelpers, ImageUtils, StreamUtils and BootContext/ServerEnvironment enums. 242 -> 286 tests, all green.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers StreamUtils
|
||||
*/
|
||||
final class StreamUtilsTest extends TestCase {
|
||||
|
||||
public function testCustomOrderPutsInputArgumentsFirst() {
|
||||
$this->assertSame(-1, StreamUtils::customOrder('-i input.ts', 'something'));
|
||||
$this->assertSame(1, StreamUtils::customOrder('-c:v libx264', '-i input.ts'));
|
||||
}
|
||||
|
||||
public function testDetectXcVmMatchesKnownStreamPaths() {
|
||||
$this->assertTrue(StreamUtils::detectXC_VM('http://host/live/user/123'));
|
||||
}
|
||||
|
||||
public function testDetectXcVmRejectsUnrelatedPaths() {
|
||||
$this->assertFalse(StreamUtils::detectXC_VM('http://host/dashboard'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user