PHPackages                             thebytebar/fluxtest - 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. thebytebar/fluxtest

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

thebytebar/fluxtest
===================

A Lightweight PHP Testing Framework

3.0.0(10mo ago)00MITPHPCI passing

Since Aug 25Pushed 10mo agoCompare

[ Source](https://github.com/thebytebar/fluxtest)[ Packagist](https://packagist.org/packages/thebytebar/fluxtest)[ RSS](/packages/thebytebar-fluxtest/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

FluxTest - PHP Test Automation
==============================

[](#fluxtest---php-test-automation)

A Lightweight PHP Testing Framework

Documentation
-------------

[](#documentation)

Configure The Test Runner
-------------------------

[](#configure-the-test-runner)

FluxTest can be configured so that it can be ran from either directly the command line or from your composer run-scripts.

**Running directly from the command line:**

```
php vendor/thebytebar/fluxtest/scripts/runner.php --dir=[directory] --ext=[fireExt]

```

The `runner.php` file is a script meant to bootstrap your test suite together to make it easier to configure your test runner. It accepts two parameters. `[directory]` is the directory you would like to scan to search for your test files. `[fileExt]` is the file extension FluxTest should look for when it is scanning for tests.

Example:

```
php vendor/thebytebar/fluxtest/scripts/runner.php --dir=src --ext=.TestCase.php

```

In the example above, the test suite will search through your `src` directory for all files with the extension `.TestCase.php`.

**Running as a Composer Run-Script:**

To run FluxTest as a composer test script all you need to do is configure the run-script to run the `runner.php` script and point it to the directory you want and the file extension you want it to find. You will find run-script configurations in your `composer.json` file located at the configuration `scripts`.

```
"scripts": {
    "test": "php vendor/thebytebar/fluxtest/scripts/runner.php --dir=/src --ext=.TestCase.php"
}

```

Once you have it configured all you need to do is run the test script using Composer.

```
composer test

```

Creating Your First Test
------------------------

[](#creating-your-first-test)

To create your first test, you will need to start out by creating your test file. Your test file will consist of a class you create which will extend the class `\TheByteBar\FluxTest\TestCase`.

Example:

```
use TheByteBar\FluxTest\TestCase;

class MyTestCase extends TestCase
{
    //my test suite logic
}

```

Once you test suite is loaded and initialized, the FluxTest will iterate through all your methods that begin with the name `test` and run each one.

Example:

```
public function testMyMethod()
{
    //my test logic
}

```

Asserting
---------

[](#asserting)

At some point, you will most likely want to assert something with your test method. Because you extended the `TheByteBar\FluxTest\TestCase` class, you have access to two methods called TheByteBar\\FluxTest\\TestCase::should($statement)`and`TheByteBar\\FluxTest\\TestCase::assert($true)`. The `should`method provides you a way to tell us what your assert is going to do. Think of it like "this test should...". The`assert`method evaluates the`$true`parameter to determine a pass or fail.`$true`must evaluate to a`true` boolean value.

Example:

```
$this->should('Should be set to true.')
// do some scaffolding to setup your test
$this->assert(true);

```

FluxTest Logging
----------------

[](#fluxtest-logging)

You have the ability to log out information as your tests are running. `TheByteBar\FluxTest\Suite::log()` is a static method you can use to log out information as your test is running.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance54

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

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

313d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/224449289?v=4)[The Byte Bar](/maintainers/thebytebar)[@thebytebar](https://github.com/thebytebar)

---

Top Contributors

[![joshua-johnson-disney](https://avatars.githubusercontent.com/u/181119147?v=4)](https://github.com/joshua-johnson-disney "joshua-johnson-disney (7 commits)")[![rustygoldcoin](https://avatars.githubusercontent.com/u/9388565?v=4)](https://github.com/rustygoldcoin "rustygoldcoin (3 commits)")

---

Tags

testingunittestunit testunittest

### Embed Badge

![Health badge](/badges/thebytebar-fluxtest/health.svg)

```
[![Health](https://phpackages.com/badges/thebytebar-fluxtest/health.svg)](https://phpackages.com/packages/thebytebar-fluxtest)
```

###  Alternatives

[sofa/eloquent-testsuite

Helpers for fast and reliable UNIT tests for your Eloquent Models with PHPUnit

10107.6k](/packages/sofa-eloquent-testsuite)[funkatron/funit

The testing microframework for PHP 5.3+, partially inspired by QUnit.

841.9k14](/packages/funkatron-funit)

PHPackages © 2026

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