PHPackages                             bernardosecades/smoke-testing - 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. bernardosecades/smoke-testing

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

bernardosecades/smoke-testing
=============================

Smoke testing for php projects

010PHP

Since Mar 24Pushed 8y ago1 watchersCompare

[ Source](https://github.com/bernardosecades/smoke-testing)[ Packagist](https://packagist.org/packages/bernardosecades/smoke-testing)[ RSS](/packages/bernardosecades-smoke-testing/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Smoke-testing
=============

[](#smoke-testing)

Smoke testing package for PHP projects.

Environment variables
---------------------

[](#environment-variables)

If you want to add smoke testing to check if environment variables are loaded and are not empty in your machine you only need extends from class `CheckEnvironment` class:

```
namespace Tests\SmokeTesting;

use BgSmokeTesting\Environment\CheckEnvironment;

class BgFlashCheckEnvironmentTest extends CheckEnvironment
{
    /**
     * {@inheritdoc}
     */
    public function getEnvPath(): string
    {
        return'{ROOT_PROJECT_PATH}/.env.dist'; // OR .env.development
    }
}
```

And implement the method `getEnvPath()`. If for example in your file `.env.dist`you have the variable `DB_CONNECTION` but this is not loaded or is empty the assertion will fail with a message like this:

"Environment variable 'DB\_CONNECTION' does not exist" or "Environment variable 'DB\_CONNECTION' is empty".

Composer lock file out of date
------------------------------

[](#composer-lock-file-out-of-date)

If you resolve in bad way conflicts with files composer.json and composer.lock it is necessary ensure your lock file is not out date.

So to add smoke testing to avoid these kind of problems you can extends from class `LockFileOutOfDate` class:

```
namespace Tests\SmokeTesting;

use BernardoSecades\SmokeTesting\Composer\LockFileOutOfDate;

class MyLockFileOutOfDateTest extends LockFileOutOfDate
{
    /**
     * {@inheritdoc}
     */
    public function getProjectPath(): string
    {
        return'{ROOT_PROJECT_PATH}';
    }
}
```

Check if you have problems in your service container to handle dependency injections
------------------------------------------------------------------------------------

[](#check-if-you-have-problems-in-your-service-container-to-handle-dependency-injections)

If you are working with frameworks like Symfony, Laravel, Yii, ... you are using a container to handle dependency injections. These frameworks are using containers follow [PSR-11](https://www.php-fig.org/psr/psr-11/) so this smoke test ensure your container is working properly. You can use this smoke testing in any framework follow PSR-11.

Example for `laravel` framework:

```
namespace Tests\Smoke;

use BernardoSecades\SmokeTesting\ServiceContainer\CheckServiceContainer;
use Psr\Container\ContainerInterface;
use Illuminate\Container\Container;

class MyCheckServiceContainer extends CheckServiceContainer
{
    /**
     * @return Container
     */
    protected function getLaravelContainer(): Container
    {
        return require __DIR__.'/../../bootstrap/app.php';
    }

    /**
     * {@inheritdoc}
     */
    protected function getContainer(): ContainerInterface
    {
        return $this->getLaravelContainer();
    }

    /**
     * {@inheritdoc}
     */
    protected function getAllServiceNames(): array
    {
        $bidings = $this->getLaravelContainer()->getBindings();

        if (empty($bidings)) {
            return [];
        }

        return array_keys($bidings);
    }
}
```

Docker Guide
------------

[](#docker-guide)

Docker guide helps developers to setup staging/development env in docker. [Docker guidelines for this project](_guides/docker_guide.md)

Execute tests
-------------

[](#execute-tests)

`./vendor/bin/phpnit`

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1932461?v=4)[Bernardo Secades](/maintainers/bernardosecades)[@bernardosecades](https://github.com/bernardosecades)

---

Top Contributors

[![bernardosecades-bg](https://avatars.githubusercontent.com/u/30793862?v=4)](https://github.com/bernardosecades-bg "bernardosecades-bg (1 commits)")

### Embed Badge

![Health badge](/badges/bernardosecades-smoke-testing/health.svg)

```
[![Health](https://phpackages.com/badges/bernardosecades-smoke-testing/health.svg)](https://phpackages.com/packages/bernardosecades-smoke-testing)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M571](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

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

PHPackages © 2026

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