PHPackages                             atoum/ruler-extension - 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. atoum/ruler-extension

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

atoum/ruler-extension
=====================

The atoum ruler-extension allows you to filter your tests using Hoa\\Ruler

1.3.0(9y ago)938.6k↑166.7%4[2 issues](https://github.com/atoum/ruler-extension/issues)2MITPHP

Since Feb 21Pushed 9y ago7 watchersCompare

[ Source](https://github.com/atoum/ruler-extension)[ Packagist](https://packagist.org/packages/atoum/ruler-extension)[ RSS](/packages/atoum-ruler-extension/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (2)Versions (9)Used By (2)

atoum/ruler-extension [![Build Status](https://camo.githubusercontent.com/581a26882652cae5e3acc9021ef1f9b5921e6bc098bf4cf8800d5740c8ce0a27/68747470733a2f2f7472617669732d63692e6f72672f61746f756d2f72756c65722d657874656e73696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/atoum/ruler-extension)
====================================================================================================================================================================================================================================================================================================================

[](#atoumruler-extension-)

This extension allows you to precisely filter test cases to run with a "natural language".

The extension adds a `--filter` option to atoum. This line now appears on the atoum help:

```
--filter: Filters tests to execute. For example 'not("featureA" in tags) and namespace = "foo\bar"'

```

You can now filter your tests using any [Hoa\\Ruler filter](https://github.com/hoaproject/Ruler).

Example
-------

[](#example)

```
./vendor/bin/atoum -d tests --filter 'not("featureA" in tags) and namespace = "foo\bar"'

```

This will only launch test that are not tagged with "featureA" and have the `foo\bar` namespace.

Available filters
-----------------

[](#available-filters)

Those variables are available in the filter:

- `method`
- `class`
- `namespace`
- `testedclass`
- `testedclassnamespace`
- `tags` (as an array)
- `extensions` (as an array)

Install it
----------

[](#install-it)

Install extension using [composer](https://getcomposer.org):

```
composer require --dev atoum/ruler-extension

```

The extension will be automatically loaded. If you ever want to unload it, you can add this to your configuration file:

```
