PHPackages                             tiny/xml-assertions - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. tiny/xml-assertions

ActiveLibrary[Testing &amp; Quality](/categories/testing)

tiny/xml-assertions
===================

Xml assertions for PHPUnit.

v0.1.0(7y ago)07PHP

Since Nov 16Pushed 7y ago1 watchersCompare

[ Source](https://github.com/mike-shmatov/tiny-xml-assertions)[ Packagist](https://packagist.org/packages/tiny/xml-assertions)[ RSS](/packages/tiny-xml-assertions/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

tiny/xml-assertions
===================

[](#tinyxml-assertions)

This package provides XML assertions.

Install
-------

[](#install)

```
$ composer require --dev tiny/xml-assertions
```

Usage
-----

[](#usage)

Use `\Tiny\Testing\Assertions\Xml\XmlAssertionsTrait` in test case.

Available assertions:

```
/**
 * Assert that xpath exists.
 * @param string $xpath Xpath to search
 * @param mixed $domNode DOMDocument or DOMElement instance as a start for search
 * @param integer $count How many times xpath is expected to be found. Null if any.
 * @param string $message Message to be displayed by PHPUnit on failure.
 */
public static function assertXpathExists($xpath, $domNode, $count = null, $message = '');

/**
 *
 * @param string $xpath Xpath where value is expected to be found
 * @param mixed $value Expected value
 * @param mixed $domNode DOMDocument or DOMElement instance as a start for search
 * @param string $message Message to be displayed by PHPUnit on failure.
 */
public static function assertValueOnXpath($xpath, $value, $domNode, $message = '');
```

Demo
----

[](#demo)

Sample output for failures can be seen [in the sample file](demo/results.txt). The file contains output for demo test suite. If needed, the suite can be run via:

```
$ composer run-script demo
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

2784d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8838606?v=4)[tiny](/maintainers/tiny)[@tiny](https://github.com/tiny)

---

Top Contributors

[![mike-shmatov](https://avatars.githubusercontent.com/u/17006202?v=4)](https://github.com/mike-shmatov "mike-shmatov (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tiny-xml-assertions/health.svg)

```
[![Health](https://phpackages.com/badges/tiny-xml-assertions/health.svg)](https://phpackages.com/packages/tiny-xml-assertions)
```

###  Alternatives

[dms/phpunit-arraysubset-asserts

This package provides ArraySubset and related asserts once deprecated in PHPUnit 8

14228.7M346](/packages/dms-phpunit-arraysubset-asserts)[phpbenchmark/phpbenchmark

Easy to use benchmark toolkit for your PHP-application. This library contains classes for comparing algorithms as well as benchmarking application responses

8011.5k2](/packages/phpbenchmark-phpbenchmark)

PHPackages © 2026

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