]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commit
fix(ERP-252): add delivery parsing tests and fix surprise-delivery pattern
authorAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Mon, 2 Mar 2026 20:30:48 +0000 (23:30 +0300)
committerAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Mon, 2 Mar 2026 20:30:48 +0000 (23:30 +0300)
commite83a19085aef6a593100966a4d25fff75b02f975
treea9e55edd0170fbf93298bb03baba6aeef9eefdc1
parent7dfc90f1c32f3c4be9a3e444cab500f9d3aa3199
fix(ERP-252): add delivery parsing tests and fix surprise-delivery pattern

12 unit tests for parseAddressFromDeliveryText() covering:
- Full address (city/street/house)
- "Уточните адрес у получателя" pattern
- Surprise SMS delivery ("Отправим смс получателю...")
- Empty strings, prefix-only, unknown cities
- GPS coordinates for known cities
- Pickup delivery, two-word cities
- Result structure validation (all keys, no nulls)

Fixed parser: added filters for surprise-delivery phrases
that were incorrectly parsed as street names.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
erp24/services/MarketplaceService.php
erp24/tests/unit/services/MarketplaceServiceDeliveryParsingTest.php [new file with mode: 0644]