Files
pest/tests/Visual/UnicodeFilename.php
T
2026-07-18 01:10:01 +01:00

40 lines
1.1 KiB
PHP

<?php
declare(strict_types=1);
use Symfony\Component\Process\Process;
test('filter works with unicode characters in filename', function (): void {
$process = new Process([
'php',
'bin/pest',
'tests/.tests/StraßenTest.php',
'--colors=never',
], dirname(__DIR__, 2), ['COLLISION_PRINTER' => 'DefaultPrinter', 'COLLISION_IGNORE_DURATION' => 'true', 'PAO_DISABLE' => '1']);
$process->run();
$output = $process->getOutput();
expect($output)->toContain('StraßenTest')
->toContain('tests unicode filename')
->toContain('1 passed');
})->skipOnWindows();
test('filter with unicode regex matches unicode filename', function (): void {
$process = new Process([
'php',
'bin/pest',
'--filter=.*Straß.*',
'tests/.tests/',
'--colors=never',
], dirname(__DIR__, 2), ['COLLISION_PRINTER' => 'DefaultPrinter', 'COLLISION_IGNORE_DURATION' => 'true', 'PAO_DISABLE' => '1']);
$process->run();
$output = $process->getOutput();
expect($output)->toContain('StraßenTest')
->toContain('1 passed');
})->skipOnWindows();