Files
XC_VM/tests/Unit/PhpM3u8/Data/Transformer/AttributeStringToArrayTest.php
T
Divarion-D d2b160b7b6 feat: Introduce PhpM3u8 Stream Classes and Interfaces
- 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.
2026-04-21 19:00:17 +03:00

25 lines
570 B
PHP

<?php
declare(strict_types=1);
namespace Chrisyue\PhpM3u8\Test\Data\Transformer;
use Chrisyue\PhpM3u8\Data\Transformer\AttributeStringToArray;
use PHPUnit\Framework\TestCase;
class AttributeStringToArrayTest extends TestCase
{
public function testInvoke(): void
{
$attr2Array = new AttributeStringToArray();
$string = 'FOO=BAR,URI="http://example.com/?p=1"';
$expected = [
'FOO' => 'BAR',
'URI' => '"http://example.com/?p=1"',
];
$this->assertEquals($expected, $attr2Array($string));
}
}