feat: G1/SP2 реквизиты клиента + ИНН по DaData + гейт первого проекта
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use App\Support\PhoneNormalizer;
|
||||
|
||||
it('normalizes russian phones to +7XXXXXXXXXX', function (string $input, ?string $expected) {
|
||||
expect(PhoneNormalizer::normalize($input))->toBe($expected);
|
||||
})->with([
|
||||
['+7 (915) 123-45-67', '+79151234567'],
|
||||
['8 915 123 45 67', '+79151234567'],
|
||||
['9151234567', '+79151234567'],
|
||||
['7(915)1234567', '+79151234567'],
|
||||
['123', null],
|
||||
['+1 202 555 0143', null], // 11 цифр, но начинается не с 7/8
|
||||
['', null],
|
||||
]);
|
||||
Reference in New Issue
Block a user