PHPackages                             portrino/codeception-sitemap-module - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. portrino/codeception-sitemap-module

AbandonedArchivedLibrary[Parsing &amp; Serialization](/categories/parsing)

portrino/codeception-sitemap-module
===================================

Parse and validate sitemap.xml files

0.3.5(8y ago)48492PHP

Since Jun 2Pushed 8y ago4 watchersCompare

[ Source](https://github.com/portrino/codeception-sitemap-module)[ Packagist](https://packagist.org/packages/portrino/codeception-sitemap-module)[ RSS](/packages/portrino-codeception-sitemap-module/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (6)Versions (10)Used By (0)

Codeception Sitemap Module
==========================

[](#codeception-sitemap-module)

[![Build Status](https://camo.githubusercontent.com/5d3f1d871a38e37d89e51b3e2da832011a4f98b8f4254aa14be45dee8b673371/68747470733a2f2f7472617669732d63692e6f72672f706f727472696e6f2f636f646563657074696f6e2d736974656d61702d6d6f64756c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/portrino/codeception-sitemap-module)[![Code Climate](https://camo.githubusercontent.com/d389db2e23dc31f715ba0f0b0ce40c2542860485b6a49c6c21e83d8ba49826bc/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f706f727472696e6f2f636f646563657074696f6e2d736974656d61702d6d6f64756c652f6261646765732f6770612e737667)](https://codeclimate.com/github/portrino/codeception-sitemap-module)[![Test Coverage](https://camo.githubusercontent.com/37d996915b7a2bbc70b7154dde0bee5c0a87f3f40c8929edadc4ab988e1798c8/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f706f727472696e6f2f636f646563657074696f6e2d736974656d61702d6d6f64756c652f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/portrino/codeception-sitemap-module/coverage)[![Issue Count](https://camo.githubusercontent.com/cf4b0617311098d33709ddbca6cff86a88bb2953f4f30c5603b7c2fbc37b5da4/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f706f727472696e6f2f636f646563657074696f6e2d736974656d61702d6d6f64756c652f6261646765732f69737375655f636f756e742e737667)](https://codeclimate.com/github/portrino/codeception-sitemap-module)[![Latest Stable Version](https://camo.githubusercontent.com/1e575f6be3b4f3b0d654cd7ccb7067beac41e9fec2d751891f7c4505c153069a/68747470733a2f2f706f7365722e707567782e6f72672f706f727472696e6f2f636f646563657074696f6e2d736974656d61702d6d6f64756c652f762f737461626c65)](https://packagist.org/packages/portrino/codeception-sitemap-module)[![Total Downloads](https://camo.githubusercontent.com/f856276dd1a99c29c78ec7871750d821c0fc623dd69bb57419239657d8307006/68747470733a2f2f706f7365722e707567782e6f72672f706f727472696e6f2f636f646563657074696f6e2d736974656d61702d6d6f64756c652f646f776e6c6f616473)](https://packagist.org/packages/portrino/codeception-sitemap-module)

This package provides parsing and validation of sitemap.xml files

Installation
------------

[](#installation)

You need to add the repository into your composer.json file

```
    composer require --dev portrino/codeception-sitemap-module
```

Usage
-----

[](#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

[](#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

[](#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:///sitemap.xml, where http:/// 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:///sitemap_index.xml, where http:/// 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
-------

[](#authors)

[![](https://avatars0.githubusercontent.com/u/726519?s=40&v=4)](https://avatars0.githubusercontent.com/u/726519?s=40&v=4)

- **André Wuttig** - *Initial work, Unit Tests, Documentation* - [aWuttig](https://github.com/aWuttig)

See also the list of [contributors](https://github.com/portrino/codeception-sitemap-module/graphs/contributors) who participated in this project.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~16 days

Recently: every ~0 days

Total

9

Last Release

3138d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/03867e1d2497d7cb7feb932fb301387e143503bfd17c584ef90347b3d7942cf1?d=identicon)[portrino-dev](/maintainers/portrino-dev)

---

Top Contributors

[![aWuttig](https://avatars.githubusercontent.com/u/726519?v=4)](https://github.com/aWuttig "aWuttig (27 commits)")[![Mabahe](https://avatars.githubusercontent.com/u/1684986?v=4)](https://github.com/Mabahe "Mabahe (9 commits)")[![tgriessbach](https://avatars.githubusercontent.com/u/11647324?v=4)](https://github.com/tgriessbach "tgriessbach (2 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/portrino-codeception-sitemap-module/health.svg)

```
[![Health](https://phpackages.com/badges/portrino-codeception-sitemap-module/health.svg)](https://phpackages.com/packages/portrino-codeception-sitemap-module)
```

###  Alternatives

[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[opis/closure

A library that can be used to serialize closures (anonymous functions) and arbitrary data.

2.6k230.0M284](/packages/opis-closure)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[michelf/php-markdown

PHP Markdown

3.5k52.4M345](/packages/michelf-php-markdown)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
