mirror of
https://github.com/Vateron-Media/XC_VM.git
synced 2026-10-07 12:02:37 +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.
35 lines
757 B
PHP
35 lines
757 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Chrisyue\PhpM3u8\Test\Data\Value\Attribute;
|
|
|
|
use Chrisyue\PhpM3u8\Data\Value\Attribute\Resolution;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class ResolutionTest extends TestCase
|
|
{
|
|
/**
|
|
* @dataProvider dataProvider
|
|
*/
|
|
public function testFromString($string, Resolution $resolution): void
|
|
{
|
|
$this->assertEquals($resolution, Resolution::fromString($string));
|
|
}
|
|
|
|
/**
|
|
* @dataProvider dataProvider
|
|
*/
|
|
public function testToString($string, Resolution $resolution): void
|
|
{
|
|
$this->assertEquals($string, (string) $resolution);
|
|
}
|
|
|
|
public function dataProvider(): array
|
|
{
|
|
return [
|
|
['800x600', new Resolution(800, 600)],
|
|
];
|
|
}
|
|
}
|