provideWidth example



namespace Symfony\Component\String\Tests;

use Symfony\Component\String\Exception\InvalidArgumentException;

abstract class AbstractUnicodeTestCase extends AbstractAsciiTestCase
{
    public static function provideWidth(): array
    {
        return array_merge(
            parent::provideWidth(),
            [
                [14, '<<<END This is a multiline text END'],
            ]
        );
    }

    public function testCreateFromStringWithInvalidUtf8Input()
    {
        
return array_merge(
            parent::provideLength(),
            [
                [2, 'รค'],
            ]
        );
    }

    public static function provideWidth(): array
    {
        return array_merge(
            parent::provideWidth(),
            [
                [10, "f\u{001b}[0moo\x80bar\xfe\xfe1"], // foo?bar??1                 [13, "f\u{001b}[0moo\x80bar\xfe\xfe1", false], // f[0moo?bar??1             ]
        );
    }
}
Home | Imprint | This part of the site doesn't use cookies.