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 1mo ago

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 22% 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

1888d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/959fde9a1ca347e0ae7968a75946242e6b7a20a96b8802657148f3dd0f38ff61?d=identicon)[wmjasonward](/maintainers/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

[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.9M570](/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)
