mbhsoft/codeception-sitemap-module
Composer 安装命令:
composer require mbhsoft/codeception-sitemap-module
包简介
Parse and validate sitemap.xml files
README 文档
README
This package provides parsing and validation of sitemap.xml files.
Fork from portrino/codeception-sitemap-module
Installation
You need to add the repository into your composer.json file
composer require --dev mbhsoft/codeception-sitemap-module
Usage
You can use this module as any other Codeception module, by adding 'Sitemap' to the enabled modules in your Codeception suite configurations.
Enable module and setup the configuration variables
The url could be set in config file directly or via an environment variable: %BASE_URL%
modules: enabled: - Sitemap: depends: PhpBrowser url: ADD_YOUR_BASE_URL_HERE
You could also configure the guzzle instance of the sitemap parser package. For example to disable SSL certification checks:
modules: enabled: - Sitemap: sitemapParser: guzzle: verify: false
Update Codeception build
codecept build
Implement the cept / cest
$I->wantToTest('If sitemap is valid.'); $I->amOnPage('sitemap_index.xml'); // validation against https://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd // sitemap will be retrieved from: http://<www.domain.tld>/sitemap.xml, where http://<www.domain.tld>/ is configured in module config $I->seeSiteMapIsValid('sitemap.xml'); // validation against https://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd // siteindex will be retrieved from: http://<www.domain.tld>/sitemap_index.xml, where http://<www.domain.tld>/ is configured in module config $I->seeSiteIndexIsValid('sitemap_index.xml'); // validate url occurence (also recursively through siteindex files!) // complete url $I->seeSiteMapContainsUrl('sitemap_index.xml', 'https://www.domain.tld/foo/bar/'); // without base_url (checks if one of the sitemap urls contains the path) $I->seeSiteMapContainsUrlPath('sitemap.xml', '/foo/bar'); // via response object $I->seeSiteMapResponseContainsUrlPath('/bar/'); $I->seeSiteMapResponseContainsUrlPath('/foo/');
Authors
- André Wuttig - Initial work, Unit Tests, Documentation - aWuttig
- Marc Bastian Heinrichs - Bugfixes, Acceptance tests, Migration to GitHub actions, Upgrade for Codeception v4 Mabahe
See also the list of contributors who participated in this project.
mbhsoft/codeception-sitemap-module 适用场景与选型建议
mbhsoft/codeception-sitemap-module 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 12 次下载、GitHub Stars 达 0, 最近一次更新时间为 2022 年 11 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 mbhsoft/codeception-sitemap-module 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mbhsoft/codeception-sitemap-module 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 14
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2022-11-17