Download the PHP package laragear/meta-testing without Composer

On this page you can find all versions of the php package laragear/meta-testing. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package meta-testing

Meta Testing

Latest Version on Packagist Latest stable test run Codecov coverage Maintainability Sonarcloud Status Laravel Octane Compatibility

A Laravel Package for testing Laravel Packages.

Become a sponsor

Your support allows me to keep this package free, up-to-date and maintainable. Alternatively, you can spread the word on social media

Requirements

Installation

Require this package into your project using Composer:

[!DANGER]

DO NOT install this package outside require-dev, unless you plan to use this package in production environments.

Testing

Testing the Service Provider

The InteractsWithServiceProvider allows to quickly test if the Service Provider of your package has registered all the needed bits of code into the Service Container.

The available assertions are in this table:

Methods
assertServices() assertBladeComponent() assertGlobalMiddleware()
assertSingletons() assertBladeDirectives() assertMiddlewareInGroup()
assertConfigMerged() assertValidationRules() assertGateHasPolicy()
assertPublishes() assertRouteByName() assertScheduledTask()
assertPublishesMigrations() assertRouteByUri() assertScheduledTaskRunsAt()
assertTranslations() assertRouteByAction() assertMacro()
assertViews() assertMiddlewareAlias()

Service Helpers

The InteractsWithServices trait includes helpers to retrieve services from the Service Container and do quick things like checks or preparation.

Validation

This meta package includes a InteractsWithValidation trait, that assert if a rule passes or fails using minimal data. This is useful when creating validation rules and testing them without too much boilerplate.

Middleware

You can test a middleware easily using the InteractsWithMiddleware trait and its middleware() method. It creates an on-demand route for the given path before sending a test Request to it, so there is no need to register a route.

It proxies all MakesHttpRequest trait methods, like get() or withUnencryptedCookie(), so you can get creative with testing your middleware.

Form Request

You can test a Form Request if it passes authorization a validation using different data using the InteractsWithFormRequests trait. The formRequest() requires the Form Request class, and an array with the data to include in the request, to test in isolation.

Authorization

To check if a policy or gate works appropriately, use the InteractsWithAuthorization trait to check whether a user can or cannot be authorized to a given action.

Casts

The InteractsWithCast trait allows to quickly test if a cast sets values from an attribute appropriately, and can return a given value from an attribute value. It also supports checking on multiple attributes at a time.

Laravel Octane compatibility

There should be no problems using this package with Laravel Octane.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

License

This specific package version is licensed under the terms of the MIT License, at time of publishing.

Laravel is a Trademark of Taylor Otwell. Copyright © 2011-2025 Laravel LLC.


All versions of meta-testing with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package laragear/meta-testing contains the following files

Loading the files please wait ....