mirror of
https://github.com/Vateron-Media/XC_VM.git
synced 2026-09-26 20:01:57 +02:00
Adds tests for Encryption, TimeUtils, QueryHelper, AdminHelpers, ImageUtils, StreamUtils and BootContext/ServerEnvironment enums. 242 -> 286 tests, all green.
23 lines
617 B
PHP
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'));
|
|
}
|
|
}
|