2017 © Pedro Peláez
 

library elgg-phpunit

PHPUnit setup to support integration testing with Elgg.

image

foogile/elgg-phpunit

PHPUnit setup to support integration testing with Elgg.

  • Sunday, February 25, 2018
  • by stianlik
  • Repository
  • 1 Watchers
  • 1 Stars
  • 27 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Elgg PHPUnit

Simple test configuration to support integration testing in Elgg using PHPUnit. Assumes the default directory structure for Elgg 1.9., (*1)

Installation

Install test configuration into your plugin using composer:, (*2)

composer require foogile/elgg-phpunit

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., (*3)

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., (*4)

Run unit tests

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

Run integration tests

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

Run all tests

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

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:, (*5)

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

The Versions

25/02 2018

dev-master

9999999-dev

PHPUnit setup to support integration testing with Elgg.

  Sources   Download

GPLv3 GPL-3.0-or-later

by Stian Liknes

phpunit elgg

15/04 2015

v0.0.3

0.0.3.0

PHPUnit setup to support integration testing with Elgg.

  Sources   Download

GPLv3

by Stian Liknes

phpunit elgg

14/04 2015

v0.0.2

0.0.2.0

PHPUnit setup to support integration testing with Elgg.

  Sources   Download

GPLv3

by Stian Liknes

phpunit elgg

14/04 2015

v0.0.1

0.0.1.0

PHPUnit setup to support integration testing with Elgg.

  Sources   Download

GPLv3

by Stian Liknes

phpunit elgg