PHPackages                             soundasleep/component-tests - 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. soundasleep/component-tests

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

soundasleep/component-tests
===========================

Common Composer and PHP component lint and validation tests

0.2.1(4y ago)010.4k—2.9%220PHP

Since Dec 18Pushed 4y ago2 watchersCompare

[ Source](https://github.com/soundasleep/component-tests)[ Packagist](https://packagist.org/packages/soundasleep/component-tests)[ RSS](/packages/soundasleep-component-tests/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (2)Versions (7)Used By (20)

component-tests [![Build Status](https://camo.githubusercontent.com/fc8b1db4a8280dd5d59a1e0f2cf1c026ed2e9971ccc843834c3293b177c4b30b/68747470733a2f2f7472617669732d63692e6f72672f736f756e6461736c6565702f636f6d706f6e656e742d74657374732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/soundasleep/component-tests)
================================================================================================================================================================================================================================================================================================================================

[](#component-tests-)

Common Composer and PHP component lint and validation tests.

Tests
-----

[](#tests)

1. Check that all `.json` files are valid JSON (using `json_decode`)
2. Check that all `.php` files are valid PHP (using `php -l`)
3. Check that all `composer.json` files are valid according to the [Composer JSON-schema](https://getcomposer.org/doc/04-schema.md#json-schema)
4. Check that all PHP files that use `require()` etc. use `__DIR__` in the path
5. Check that all PHP files that use `require()` etc. refer to files that actually exist

Using
-----

[](#using)

First include `component-tests` as a requirement in your project `composer.json`, and run `composer update` to install it into your project:

```
{
  "require": {
    "soundasleep/component-tests": "~0.2"
  }
}
```

Now create an instance of `\ComponentTests\ComponentTest` to define which paths to search (and optionally exclude):

```
class MyComponentTest extends \ComponentTests\ComponentTest {

  function getRoots() {
    return array(__DIR__ . "/..");
  }

  /**
   * Optional: exclude certain paths
   */
  function getExcludes() {
    return array("/resources/", "/vendor/");
  }
}
```

You can now run this test through your normal `phpunit`.

Tests
-----

[](#tests-1)

This component is tested itself; install the composer requirements with `composer install` and run `vendor/bin/phpunit`.

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% 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 ~517 days

Recently: every ~646 days

Total

6

Last Release

1630d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1ebbec5ccc867054461adebb7c5b6312f8256f989ef96b124892e6e89724afdb?d=identicon)[soundasleep](/maintainers/soundasleep)

---

Top Contributors

[![soundasleep](https://avatars.githubusercontent.com/u/3889656?v=4)](https://github.com/soundasleep "soundasleep (24 commits)")[![edgrosvenor](https://avatars.githubusercontent.com/u/1053395?v=4)](https://github.com/edgrosvenor "edgrosvenor (3 commits)")

### Embed Badge

![Health badge](/badges/soundasleep-component-tests/health.svg)

```
[![Health](https://phpackages.com/badges/soundasleep-component-tests/health.svg)](https://phpackages.com/packages/soundasleep-component-tests)
```

###  Alternatives

[drupal/core-dev

require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.

2022.6M343](/packages/drupal-core-dev)[brianium/paratest

Parallel testing for PHP

2.5k136.1M986](/packages/brianium-paratest)[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k28.9M2.4k](/packages/infection-infection)[paycore/openfintech-data

Openfintech data

22110.1k](/packages/paycore-openfintech-data)[wikimedia/parsoid

Parsoid, a bidirectional parser between wikitext and HTML5

187557.3k3](/packages/wikimedia-parsoid)[webmozarts/strict-phpunit

Enables type-safe comparisons of objects in PHPUnit

30314.4k7](/packages/webmozarts-strict-phpunit)

PHPackages © 2026

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