Files
XC_VM/tests/Unit/StreamUtilsTest.php
T
Divarion-D 5ce38ea61f 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.
2026-06-22 18:47:50 +03:00

23 lines
617 B
PHP

<?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'));
}
}