Files
wp-multi-city/README.md
T
Vladimir Bryzgalov 6499620e38 docs(wpmc S6): README Testing section + mark S6 done in roadmap
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 00:11:32 +05:00

54 lines
2.4 KiB
Markdown

# WP Multi City
Мультигородская подсистема для WordPress: один сайт обслуживает несколько городов по схеме `/{city}/{path}/` с подстановкой контента, ссылок и шорткодов.
**Статус:** v0.1.0 — скелет. Функционал в разработке (см. roadmap ниже).
## Требования
- WordPress 6.0+
- PHP 8.0+
- Advanced Custom Fields Pro
## Установка (на v0.1.0)
1. Скачать архив или склонировать в `wp-content/plugins/wp-multi-city/`.
2. Активировать в админке WP. Если ACF Pro не активен — увидите admin-notice об ошибке зависимости.
## Testing
### Automated (PHPUnit)
```bash
composer install
vendor/bin/phpunit
```
Expected: 98 tests, 175 assertions green. Unit-level coverage via Brain Monkey + Mockery + Patchwork — no real WordPress required; the full suite runs in under one second.
### Manual QA
For end-to-end verification against a real WordPress installation, see `docs/QA-CHECKLIST.md` — 13 sections covering activation, admin UI, helpers, shortcode, router, page clones, URL filters, REST URL.
### CI
`.gitea/workflows/test.yml` runs PHPUnit on every push to `main` and every pull request. The workflow becomes active once the repo is mirrored to Gitea (S7).
## Roadmap MVP
| Этап | Содержание | Beads | Статус |
|---|---|---|---|
| S1 | Скелет (header, autoload, bootstrap) | cp-8ci | done |
| S2 | Taxonomy `town` + CPT `shortcode-town` + ACF `list_shortcode` | cp-q7g | done |
| S3 | `[shortcode_dmr id=N]` + хелперы (`current_town`, `_alt_get_field`, `remove_domain_link`) | cp-arq | done |
| S4 | URL-роутер `/{city}/{path}/` + `page_unic` + `main_page_alt` | cp-83m | done |
| S5 | Фильтры `the_title`/`the_content`/`the_permalink`/`rest_url` | cp-i17 | done |
| S6 | PHPUnit-тесты | cp-la7 | done |
| S7 | Релиз через Gitea + plugin-update-checker | cp-7cf | open |
Эпик: `cp-cw4`.
## Источник
Плагин — переработка кастомной мультигородской подсистемы темы `washanyanya` (1555 строк `inc/town-functions.php`) в переиспользуемый плагин для других проектов.