PHPackages                             uiii/pw-test - 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. uiii/pw-test

Abandoned → [uiii/tense](/?search=uiii%2Ftense)Project[Testing &amp; Quality](/categories/testing)

uiii/pw-test
============

Easy testing against multiple versions of ProcessWire CMF

1.0.0(9y ago)8281[2 issues](https://github.com/uiii/tense/issues)MITPHPPHP &gt;=5.6

Since Apr 18Pushed 9y ago3 watchersCompare

[ Source](https://github.com/uiii/tense)[ Packagist](https://packagist.org/packages/uiii/pw-test)[ RSS](/packages/uiii-pw-test/feed)WikiDiscussions master Synced 2mo ago

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

Tense
=====

[](#tense)

[![Packagist](https://camo.githubusercontent.com/6082444088728607ba569745cd3365f8aadf4f30ca0b4f8b150eee6b03f278d3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f756969692f74656e73652e737667)](https://packagist.org/packages/uiii/tense)[![travis-linux](https://camo.githubusercontent.com/32356a8a188e371e5b4ece71c380a2713c6593022df4b4e836a06b1c961040ab/687474703a2f2f62616467652e756969692e637a2f3f736572766963653d547261766973267265706f3d756969692f74656e7365266272616e63683d6d6173746572266c6162656c3d4c696e757826706172616d732535426f732535443d6c696e7578)](https://travis-ci.org/uiii/tense)[![travis-osx](https://camo.githubusercontent.com/99e5a1418930a070cf157e8bd5c6712afa77c7b1e1308fcc3c9e86a7bfd90094/687474703a2f2f62616467652e756969692e637a2f3f736572766963653d547261766973267265706f3d756969692f74656e7365266272616e63683d6d6173746572266c6162656c3d4d616326706172616d732535426f732535443d6f7378)](https://travis-ci.org/uiii/tense)[![AppVeyor](https://camo.githubusercontent.com/5ed16c4c89c3d64055a212e46c33455af067297aad15e8615a6b95a0a70e7b26/68747470733a2f2f696d672e736869656c64732e696f2f6170707665796f722f63692f756969692f74656e73652e7376673f6c6162656c3d57696e646f7773)](https://ci.appveyor.com/project/uiii/tense)

Tense (**T**est **EN**vironment **S**etup &amp; **E**xecution) is a command-line tool to easily run tests agains multiple versions of [ProcessWire CMF](https://processwire.com).

Are you building a module, or a template and you need to make sure it works in all supported ProcessWire versions? Then `Tense` is exactly what you need. Write the tests in any testing framework, tell `Tense` which ProcessWire versions you are interested in and it will do the rest for you.

**See [example](https://github.com/uiii/tense/tree/master/example)**or **see [usage](https://github.com/uiii/ProcessWire-FieldtypePDF#test-multiple-processwire-versions-automatically) in a real project**.

[![video](example/asciicast.gif)](https://asciinema.org/a/109559)

Table of Contents
-----------------

[](#table-of-contents)

1. [Requirements](#requirements)
2. [Installation](#installation)
3. [Usage](#usage)
4. [Configuration](#configuration)
5. [Troubleshooting](#troubleshooting)

Requirements
------------

[](#requirements)

- PHP 5.6 or higher
- Composer ()
- Git ()
- MySQL or MariaDB 5.0.15 or higher

### php.ini

[](#phpini)

`php.ini` used by `php` cli command must have enabled these extensions:

- curl
- gd2
- mbstring
- mysqli
- openssl
- pdo\_mysql

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

[](#installation)

> Don't forget to setup all [requirements](#requirements) first.

Install globally:

```
composer global require uiii/tense

```

or install as a project dependency:

```
cd
composer require --dev uiii/tense

```

Usage
-----

[](#usage)

Go to your **project's root** directory.

1. create [config](#configuration) file `tense.yml`:

    ```
    tense init

    ```
2. run tests:

    ```
    tense run

    ```

> if you've installed `Tense` locally as project's dependecy, use `vendor/bin/tense` instead of `tense`

Configuration
-------------

[](#configuration)

Tense uses [YAML](http://yaml.org/) configuration files. There are two types of config files:

- **project** (`tense.yml`): It should contain options directly related to the project's testing. This config is intended to be shared (VCS, ...).
- **local** (`tense.local.yml`): It should contain options related to the machine's environment setup (database connection, ...), overwrites options from project's config. This is **not** intended to be shared.

The **project**'s config can be created either manually or interactively by running the command:

```
tense init

```

The **local** config is automatically initialized on each `tense run` when missing.

### tmpDir

[](#tmpdir)

> *optional*, config: project, local

Path to a directory where files needed for testing (e.g ProcessWire installation, ...) are stored.

> Path is relative to the config file's parent directory.

*Default is `.tense`*

### db

[](#db)

> **required**, config: local

Database connection parameters.

> They are used to create the database for ProcessWire installation, so the user must have the privileges to create a database.

> `db.name` is a name of the database.

*Example:*

```
db:
    host: localhost
    port: 3306
    user: root
    pass: ""
    name: tense
```

### testTags

[](#testtags)

> **required**, config: project

List of ProcessWire tags/versions used for testing.

It doesn't have to be exact version number. For each tag/version will be found latest matching existing tag (e.g. `3.0` -&gt; `3.0.42`).

Versions are tested in the specified order.

> Minimal supported version is `2.5`.

> Version `2.8` is not currently supported.

*Example:*

```
testTags:
    - "2.5"
    - "2.6"
    - "2.7.1"
    - "3.0"
```

### copySources

[](#copysources)

> *optional*, config: project

Copy source files into ProcessWire's' installation before testing.

It is a list of objects with `destination` and `source` properties.

> Destination paths are relative to ProcessWire's installation root.

> Source paths are relative to the config file's parent directory.

Sources can either be a single string or an array of strings. If the source is a string, file to file copy is used. If the source is an array of strings, the destination is considered to be a directory where all sources are copied into.

> If source item is a directory, it will be copied recursively.

*Example:*

```
copySources:
    - destination: "site/templates/HomeTemplate.php"
    source: "src/templates/home.php"

    - destination: "site/modules/Module"
    source:
        - "Libs"
        - "Module.module"
```

Consider `tense.yml` is in project's root and `/Libs` is a directory. In this example these files will be copied:

- `/templates/home.php` to `/site/templates/HomeTemplate.php`
- `/Libs/*` to `/site/modules/Module/Libs`
- `/Module.module` to `/site/modules/Module/Module.module`

### beforeCmd

[](#beforecmd)

> *optional*, config: project, local

Command to execute before a test suite, but after a PW instance is installed and [sources](#copysources) are copied.

This is just a single command, if you need to run multiple commands, put them into an external script.

> Remember, the command should be platform independent, so using `.sh` or `.bat` files are not recommended. Best option is to use PHP as you can see in the [example](https://github.com/uiii/tense/tree/master/example), but you can use any other platform independent scripting language.

> Path to the ProcessWire installation will be in `PW_PATH` environment variable.

*Example:*

```
beforeCmd: "composer install"
```

### testCmd

[](#testcmd)

> **required**, config: project

Command to execute a test suite.

> Path to the ProcessWire installation will be in `PW_PATH` environment variable.

*Example:*

```
testCmd: "vendor/bin/phpunit --bootstrap vendor/autoload.php tests/Test.php"
```

### pause

[](#pause)

> *optional*, config: local

After each test suite against a ProcessWire instance but before a clean up test runner can pause and ask the user what to do.

This is useful e.g. to examine the installed ProcessWire instance.

*Possible values are:*

- `never` - never pause (*default*)
- `onFailure` - pause after failed test suite
- `always` - always pause after a test suite

Troubleshooting
---------------

[](#troubleshooting)

### cURL error: SSL certificate problem: unable to get local issuer certificate

[](#curl-error-ssl-certificate-problem-unable-to-get-local-issuer-certificate)

If you got this error, you haven't properly configured PHP's `curl` extension. You can solve this e.g. by

1. download the  file
2. place it somewhere, e.g. in PHP's installation directory
3. edit `php.ini` file and set `curl.cainfo = `

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

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

3312d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5253d950ce1869bc6397f3507791bcce39834c848701e7ff3321bc8cd95cf05f?d=identicon)[uiii](/maintainers/uiii)

---

Top Contributors

[![uiii](https://avatars.githubusercontent.com/u/179219?v=4)](https://github.com/uiii "uiii (69 commits)")[![LostKobrakai](https://avatars.githubusercontent.com/u/2489835?v=4)](https://github.com/LostKobrakai "LostKobrakai (1 commits)")

---

Tags

phpprocesswiretestingtooltestingprocesswire

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/uiii-pw-test/health.svg)

```
[![Health](https://phpackages.com/badges/uiii-pw-test/health.svg)](https://phpackages.com/packages/uiii-pw-test)
```

###  Alternatives

[behat/behat

Scenario-oriented BDD framework for PHP

4.0k96.8M2.0k](/packages/behat-behat)[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.2k26.2M1.8k](/packages/infection-infection)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)[phpspec/phpspec

Specification-oriented BDD framework for PHP 7.1+

1.9k36.7M3.1k](/packages/phpspec-phpspec)[phpbench/phpbench

PHP Benchmarking Framework

2.0k13.0M627](/packages/phpbench-phpbench)

PHPackages © 2026

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