test(fixtures): 脱敏最小 WXR/sitemap/媒体夹具(全虚构)
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
Vendored
+31
@@ -0,0 +1,31 @@
|
||||
# tests/fixtures 测试夹具
|
||||
|
||||
## 来源声明
|
||||
|
||||
本目录所有夹具内容均为**完全虚构**:域名一律为 `fixture.example`,文章、产品、
|
||||
分类、附件、SEO 文案等均为手写编造,**不包含任何来自真实站点(如 hesupipe)
|
||||
的数据**,也未复制 `storage/wxr/` 下的任何真实导出内容。
|
||||
|
||||
## 目录说明
|
||||
|
||||
- `wxr/mini.xml`:最小 WXR(WordPress eXtended RSS)导出夹具。
|
||||
- `sitemap/mini-sitemap.xml`:最小 sitemap 夹具。
|
||||
- `media/`:1×1 PNG 媒体占位(`fixture-a.png`、`fixture-b.png`),
|
||||
命名与 WXR 中 attachment 的 `wp:attachment_url` 对应。
|
||||
|
||||
## 覆盖的结构变体
|
||||
|
||||
`wxr/mini.xml` 覆盖阶段 2 WXR 流式解析器需要处理的结构:
|
||||
|
||||
- `.html` 后缀 permalink 与目录式 permalink 混用
|
||||
- Yoast SEO meta(`_yoast_wpseo_title`、`_yoast_wpseo_metadesc`)
|
||||
- 特色图(`_thumbnail_id`)与产品图库(`_product_image_gallery`)
|
||||
- PHP serialized postmeta(`wppop_sections`)
|
||||
- `wp:term`(category / product_cat 两种 taxonomy)
|
||||
- attachment 条目(`wp:attachment_url`、`status=inherit`)
|
||||
- post / product(CPT) / page 多种 post_type
|
||||
|
||||
## 用途
|
||||
|
||||
这些夹具是**阶段 2 WXR 流式解析器与 sitemap 解析的标准测试输入**(契约输入),
|
||||
内容视为契约,修改需同步更新相关测试。
|
||||
Reference in New Issue
Block a user