PHPackages                             foogile/elgg-phpunit - 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. foogile/elgg-phpunit

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

foogile/elgg-phpunit
====================

PHPUnit setup to support integration testing with Elgg.

v0.0.3(11y ago)141GPLv3PHP

Since Apr 14Pushed 8y ago1 watchersCompare

[ Source](https://github.com/stianlik/elgg-phpunit)[ Packagist](https://packagist.org/packages/foogile/elgg-phpunit)[ RSS](/packages/foogile-elgg-phpunit/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

Elgg PHPUnit
============

[](#elgg-phpunit)

Simple test configuration to support integration testing in Elgg using PHPUnit. Assumes the default directory structure for Elgg 1.9.

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

[](#installation)

Install test configuration into your plugin using composer:

```
composer require foogile/elgg-phpunit
```

Usage
-----

[](#usage)

There are three default PHPUnit configurations that can be used to run all unit tests, all integration tests, or all tests. Unit tests are placed in `PLUGIN/tests/unit` adn integration tests are placed in `PLUGIN/tests/integration`. You can modify the Elgg configuration for the test environment by creating a file named `PLUGIN/tests/integration/settings.php`.

### Bootstrap

[](#bootstrap)

You can run custom init code by creating `PLUGIN/tests/integration/bootstrap.php` and `PLUGIN/tests/unit/bootstrap.php` for integration and unit tests, respectively. Additionally, `PLUGIN/tests/bootstrap.php` is loaded first for all cases.

### Run unit tests

[](#run-unit-tests)

```
phpunit -c vendor/foogile/elgg-phpunit/phpunit.unit.xml
```

### Run integration tests

[](#run-integration-tests)

```
phpunit -c vendor/foogile/elgg-phpunit/phpunit.integration.unit.xml
```

### Run all tests

[](#run-all-tests)

```
phpunit -c vendor/foogile/elgg-phpunit/phpunit.xml
```

### Elgg installation helper

[](#elgg-installation-helper)

It is included a utility script to install an Elgg test environment. To initialize the database, specify your database setup in `PLUGIN/tests/integration/settings.php` and execute the following from the root folder of your plugin:

```
php vendor/foogile/elgg-phpunit/install.php
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Every ~0 days

Total

3

Last Release

4051d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eb3f6c4b992faba1bb41e554e3a7dab4471f50b48d47deb6bc805ce4bdd648ba?d=identicon)[stianlik](/maintainers/stianlik)

---

Top Contributors

[![stianlik](https://avatars.githubusercontent.com/u/410251?v=4)](https://github.com/stianlik "stianlik (10 commits)")

---

Tags

phpunitelgg

### Embed Badge

![Health badge](/badges/foogile-elgg-phpunit/health.svg)

```
[![Health](https://phpackages.com/badges/foogile-elgg-phpunit/health.svg)](https://phpackages.com/packages/foogile-elgg-phpunit)
```

###  Alternatives

[phpunit/phpunit

The PHP Unit Testing framework.

20.0k910.7M134.8k](/packages/phpunit-phpunit)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[johnkary/phpunit-speedtrap

Find and report on slow tests in your PHPUnit test suite

78337.2M122](/packages/johnkary-phpunit-speedtrap)[spatie/phpunit-snapshot-assertions

Snapshot testing with PHPUnit

69617.9M510](/packages/spatie-phpunit-snapshot-assertions)[dg/bypass-finals

Removes final keyword from source code on-the-fly and allows mocking of final methods and classes

57026.3M456](/packages/dg-bypass-finals)[phpspec/prophecy-phpunit

Integrating the Prophecy mocking library in PHPUnit test cases

19454.9M1.4k](/packages/phpspec-prophecy-phpunit)

PHPackages © 2026

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