mirror of
https://github.com/Vateron-Media/XC_VM.git
synced 2026-10-05 20:02:41 +02:00
Mechanical, behaviour-preserving reformat produced by 'make cs-fix' under the new build/phpcs.xml.dist ruleset: K&R braces, tab indentation, and the other whitespace normalisations. No logic changes.
31 lines
744 B
PHP
31 lines
744 B
PHP
<?php
|
|
|
|
|
|
namespace Chrisyue\PhpM3u8\Test\Data\Value;
|
|
|
|
use Chrisyue\PhpM3u8\Data\Value\Byterange;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class ByterangeTest extends TestCase {
|
|
/**
|
|
* @dataProvider dataProvider
|
|
*/
|
|
public function testFromString($string, Byterange $byterange): void {
|
|
$this->assertEquals($byterange, Byterange::fromString($string));
|
|
}
|
|
|
|
/**
|
|
* @dataProvider dataProvider
|
|
*/
|
|
public function testToString($string, Byterange $byterange): void {
|
|
$this->assertEquals($string, (string) $byterange);
|
|
}
|
|
|
|
public static function dataProvider(): array {
|
|
return [
|
|
['2000', new Byterange(2000)],
|
|
['2000@1000', new Byterange(2000, 1000)],
|
|
];
|
|
}
|
|
}
|