nekofar/slim-test

Slim Framework test helper built on top of the PHPUnit test framework

Maintainers

👁 nekofar

Package info

github.com/nekofar/slim-test

pkg:composer/nekofar/slim-test

Fund package maintenance!

ud.me/nekofar.crypto

Statistics

Installs: 37 869

Dependents: 3

Suggesters: 0

Stars: 4

Open Issues: 10

v3.2.5 2024-02-03 20:54 UTC

Requires

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 057b09a0b40c23fb851ff01c78415a95032475c5

  • Milad Nekofar <milad.woop@nekofar.com>

frameworkphptestingphpunitplugintestunitslim

This package is auto-updated.

Last update: 2026-06-14 09:20:09 UTC


README

👁 Packagist Version
👁 PHP from Packagist
👁 Packagist Downloads
👁 Tests Status
👁 Coverage Status
👁 License
👁 X (formerly Twitter) Follow
👁 Farcaster (Warpcast) Follow
👁 Donate

Slim Framework test helper built on top of the PHPUnit test framework

This library inspired by the Illuminate Testing component.

Installation

To get started, install the package using composer:

composer require nekofar/slim-test --dev

Requires Slim Framework 4 and PHP 8.0 or newer.

Usage

use Nekofar\Slim\Test\Traits\AppTestTrait;
use PHPUnit\Framework\TestCase as BaseTestCase;

class TestCase extends BaseTestCase 
{
 use AppTestTrait;
 
 protected function setUp(): void
 {
 $app = require __DIR__ . '/../config/bootstrap.php';
 
 $this->setUpApp($app);
 }
 
 public function testHomePage(): void
 {
 $this->get('/')
 ->assertOk()
 ->assertSee('Welcome');
 }
}

Contributing

Please see CONTRIBUTING for details.

License

The MIT License (MIT). Please see License File for more information.