PHPackages                             wmjasonward/laravel-creates-http-requests - 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. wmjasonward/laravel-creates-http-requests

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

wmjasonward/laravel-creates-http-requests
=========================================

Trait for creating http Request objects in test cases

v0.0.3(5y ago)073MITPHP

Since Feb 27Pushed 5y ago1 watchersCompare

[ Source](https://github.com/wmjasonward/laravel-creates-http-requests)[ Packagist](https://packagist.org/packages/wmjasonward/laravel-creates-http-requests)[ RSS](/packages/wmjasonward-laravel-creates-http-requests/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependenciesVersions (4)Used By (0)

laravel-creates-http-requests
=============================

[](#laravel-creates-http-requests)

Trait for creating http Request objects in test cases, works in conjunction with Laravel's MakesHttpRequests trait.

Useful for directly testing a Laravel middleware handler.

Here's a contrived example of how to use it.

```
use Tests\TestCase;
use WmJasonWard\Laravel\Testing\CreatesHttpRequests;

class MyMiddlewareHandlerTest extends TestCase
{
    use CreatesHttpRequests;

    public function test_my_middleware_handler ()
    {
        $middleware = new MyMiddleware();

        $request = $this->createGetRequest('/', [
            'Authorization' => 'Basic dJdpbGlvOnBhc3N3c3Jk',
            ]);

        $r = $middleware->handle($request, function($response) {
            return null;
        });

        $this->assertNull($r);
    }
}
```

Using the Request class directly may suffice as well:

```
 use Illuminate\Http\Request;

 $request = Request::create('/');
```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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.

###  Release Activity

Cadence

Every ~6 days

Total

3

Last Release

1941d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3811135?v=4)[Jason Ward](/maintainers/wmjasonward)[@wmjasonward](https://github.com/wmjasonward)

---

Top Contributors

[![wmjasonward](https://avatars.githubusercontent.com/u/3811135?v=4)](https://github.com/wmjasonward "wmjasonward (1 commits)")

### Embed Badge

![Health badge](/badges/wmjasonward-laravel-creates-http-requests/health.svg)

```
[![Health](https://phpackages.com/badges/wmjasonward-laravel-creates-http-requests/health.svg)](https://phpackages.com/packages/wmjasonward-laravel-creates-http-requests)
```

###  Alternatives

[dms/phpunit-arraysubset-asserts

This package provides ArraySubset and related asserts once deprecated in PHPUnit 8

14429.2M360](/packages/dms-phpunit-arraysubset-asserts)

PHPackages © 2026

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