mirror of
https://github.com/Vateron-Media/XC_VM.git
synced 2026-10-06 04:02:36 +02:00
- Added `StreamInterface` to define the contract for stream handling. - Implemented `FileStream` class for file-based streaming. - Implemented `TextStream` class for in-memory text streaming. - Removed legacy `M3UParser` class and related resources. - Added new tests for `AttributeStringToArray`, `Iso8601Transformer`, `Resolution`, `Byterange`, `Inf`, `Line`, and `Lines` classes. - Updated bootstrap file to include new PhpM3u8 components.
21 lines
448 B
PHP
21 lines
448 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Chrisyue\PhpM3u8\Test\Stream;
|
|
|
|
use Chrisyue\PhpM3u8\Stream\TextStream;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class TextStreamTest extends TestCase
|
|
{
|
|
public function testToString(): void
|
|
{
|
|
$text = "first\nsecond";
|
|
$this->assertSame($text."\n", (string) new TextStream($text));
|
|
|
|
$text = "first\nsecond\n";
|
|
$this->assertSame($text, (string) new TextStream($text));
|
|
}
|
|
}
|