new UnicodeString(''
), null
],
[new UnicodeString('foo'
), 'foo'
],
[new UnicodeString('अनुच्छेद'
), 'अनुच्छेद'
],
];
} /**
* @dataProvider provideBStrings
*/
public function testB(ByteString
$expected, ?string
$input) { $this->
assertEquals($expected,
b($input));
} public static function provideBStrings(): array
{ return [ [new ByteString(''
), ''
],
[new ByteString(''
), null
],
[new ByteString("b\x80ar"
), "b\x80ar"
],
[new ByteString("\xfe\xff"
), "\xfe\xff"
],
];
}}