Download the PHP package midnightsuyama/laravel-kahlan4 without Composer

On this page you can find all versions of the php package midnightsuyama/laravel-kahlan4. 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 laravel-kahlan4

laravel-kahlan4

Latest Stable Version Build Status

Kahlan specs suite for Laravel

Features

Installation

$ composer require --dev midnightsuyama/laravel-kahlan4

Usage

Add this line to your kahlan-config.php file (create it if necessary):

and

$ ./vendor/bin/kahlan

Example

Method

$this->laravel is an instance of Illuminate\Foundation\Testing\TestCase subclass. It can call test methods of Illuminate\Foundation\Testing\Concerns.

Trait

Call $this->laravel->useTrait() in beforeAll, if you want to use test traits. That trait is set before beforeEach is called.

Support traits

Matcher

Provied custom matchers. toPass* matcher is paired with assert* assertion by Laravel.

Response

Matcher Description
toPassSuccessful() The response has a successful status code.
toPassOk() The response has a 200 status code.
toPassNotFound() The response has a not found status code.
toPassForbidden() The response has a forbidden status code.
toPassUnauthorized() The response has an unauthorized status code.
toPassCreated() The response has a 201 status code.
toPassNoContent($status = 204) The response has the given status code and no content.
toPassStatus($status) The response has the given status code.
toPassRedirect($uri = null) The response is redirecting to a given URI.
toPassHeader($headerName, $value = null) The response contains the given header and equals the optional value.
toPassHeaderMissing($headerName) The response does not contains the given header.
toPassLocation($uri) The current location header matches the given URI.
toPassPlainCookie($cookieName, $value = null) The response contains the given cookie and equals the optional value.
toPassCookie($cookieName, $value = null, $encrypted = true, $unserialize = false) The response contains the given cookie and equals the optional value.
toPassCookieExpired($cookieName) The response contains the given cookie and is expired.
toPassCookieNotExpired($cookieName) The response contains the given cookie and is not expired.
toPassCookieMissing($cookieName) The response does not contains the given cookie.
toPassSee($value) The given string is contained within the response.
toPassSeeInOrder(array $values) The given strings are contained in order within the response.
toPassSeeText($value) The given string is contained within the response text.
toPassSeeTextInOrder(array $values) The given strings are contained in order within the response text.
toPassDontSee($value) The given string is not contained within the response.
toPassDontSeeText($value) The given string is not contained within the response text.
toPassJson(array $data, $strict = false) The response is a superset of the given JSON.
toPassExactJson(array $data) The response has the exact given JSON.
toPassJsonFragment(array $data) The response contains the given JSON fragment.
toPassJsonMissing(array $data, $exact = false) The response does not contain the given JSON fragment.
toPassJsonMissingExact(array $data) The response does not contain the exact JSON fragment.
toPassJsonPath($path, $expect, $strict = false) The expected value exists at the given path in the response.
toPassJsonStructure(array $structure = null, $responseData = null) The response has a given JSON structure.
toPassJsonCount(int $count, $key = null) The response JSON has the expected count of items at the given key.
toPassJsonValidationErrors($errors) The response has the given JSON validation errors.
toPassJsonMissingValidationErrors($keys = null) The response has no JSON validation errors for the given keys.
toPassViewIs($value) The response view equals the given value.
toPassViewHas($key, $value = null) The response view has a given piece of bound data.
toPassViewHasAll(array $bindings) The response view has a given list of bound data.
toPassViewMissing($key) The response view is missing a piece of bound data.
toPassSessionHas($key, $value = null) The session has a given value.
toPassSessionHasAll(array $bindings) The session has a given list of values.
toPassSessionHasInput($key, $value = null) The session has a given value in the flashed input array.
toPassSessionHasErrors($keys = [], $format = null, $errorBag = 'default') The session has the given errors.
toPassSessionDoesntHaveErrors($keys = [], $format = null, $errorBag = 'default') The session is missing the given errors.
toPassSessionHasNoErrors() The session has no errors.
toPassSessionHasErrorsIn($errorBag, $keys = [], $format = null) The session has the given errors.
toPassSessionMissing($key) The session does not have a given key.

Authentication

Matcher Description
toPassAuthenticated($guard = null) The user is authenticated.
toPassGuest($guard = null) The user is not authenticated.
toPassAuthenticatedAs($user, $guard = null) The user is authenticated as the given user.
toPassCredentials(array $credentials, $guard = null) The given credentials are valid.
toPassInvalidCredentials(array $credentials, $guard = null) The given credentials are invalid.

Database

Matcher Description
toPassDatabaseHas($table, array $data, $connection = null) A given where condition exists in the database.
toPassDatabaseMissing($table, array $data, $connection = null) A given where condition does not exist in the database.
toPassSoftDeleted($table, array $data = [], $connection = null) The given record has been deleted.

Notification

Matcher Description
toPassNothingSent() No notifications were sent.
toPassSentTo($notifiable, $notification, $callback = null) The given notification was sent based on a truth-test callback.
toPassNotSentTo($notifiable, $notification, $callback = null) The given notification was not sent based on a truth-test callback.
toPassSentToTimes($notifiable, $notification, $times = 1) The given notification was sent a number of times.
toPassTimesSent($expectedCount, $notification) The total amount of times a notification was sent.

Test

License

Licensed using the MIT license.

Acknowledgments

Inspired by sofa/laravel-kahlan.


All versions of laravel-kahlan4 with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2 || ^8.0
laravel/framework Version ^6.0 || ^7.0 || ^8.0 || ^9.0
kahlan/kahlan Version ^4.6 || ^5.0
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 midnightsuyama/laravel-kahlan4 contains the following files

Loading the files please wait ....