namespace Symfony\Component\String\Tests;
use Symfony\Component\String\AbstractString;
use Symfony\Component\String\ByteString;
use Symfony\Component\String\Exception\InvalidArgumentException;
class ByteStringTest extends AbstractAsciiTestCase
{ protected static function createFromString(string
$string): AbstractString
{ return new ByteString($string);
} public function testFromRandom() { $random = ByteString::
fromRandom(32
);
self::
assertSame(32,
$random->
length());
foreach ($random->
chunk() as $char) { self::
assertNotNull((new ByteString('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
))->
indexOf($char));
} }