Download the PHP package jeroen-g/testassist without Composer

On this page you can find all versions of the php package jeroen-g/testassist. 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 testassist

TestAssist

Latest Version on Packagist Total Downloads StyleCI

This package contains some nifty helpers and assertions that are made with Laravel in mind. The majority of functions are found in other packages, tutorials or repositories and credit is given for each function.

Installation

Via Composer

Usage

All helpers are designed as traits and organised in components focused on browser, console and filesystem tests. If you want to have all helpers, simply use the general Assistants that will include all others for you.

General functions

AssertIsCalled

use JeroenG\TestAssist\Assistants

This function accepts two parameters, the first is the classname that needs to get called, the second is a callback during which the class should be called. And example would be an event listener:

Browser (Laravel Dusk)

ClearCookiesBetweenTests

use JeroenG\TestAssist\Browser\ClearCookiesBetweenTests

Using this trait will make sure that between each test the user is logged out and all (session) cookies are deleted. The best way to use this is to alter your TestCase's tearDown():

Console

OutputAssertions

use JeroenG\TestAssist\Console\OutputAssertions

Contains two functions: seeInConsoleOutput($text) and 'doNotSeeInConsoleOutput($text)` to check whether or not the (un)expected text appears in the console output.

ExceptionHandling

use JeroenG\TestAssist\Console\ExceptionHandling

Use disableExceptionHandling() to get the entire stacktrace instead of a error 500-like message. Use withExceptionHandling() to reactivate Laravel's error rendering.

Database

FabricateModels

use JeroenG\TestAssist\Database\FabricateModels

Containts two functions as shortcuts to Laravel's factory method to create/make model instances. The shortest use would be as follows:

DataAssertions

use JeroenG\TestAssist\Database\DataAssertions

Containts two methods to assert if an Eloquent model is inserted into the database (technically an alias for assertDatabaseHas()) or to assert that its row is updated or deleted.

SQLiteRegex

use JeroenG\TestAssist\Database\SQLiteRegex

Add the function below to your SetUpBeforeClass to give SQLite the ability to use REGEXP statements. More information here and credits should go here.

SeedDatabase

use JeroenG\TestAssist\Database\SeedDatabase

Runs your DatabaseSeeder class if you use the trait. In your testcase's setUp method you should run this:

If you do not use the whole set of assistants (see top of usage section), place the following code in your setUp() method to run it only once:

Filesystem

ManageFilesystem

use JeroenG\TestAssist\Filesystem\ManageFilesystem

As the moment this trait has only the function removeDir($path) to nuke the directory and everything inside of it.

FileAssertions

use JeroenG\TestAssist\Filesystem\FileAssertions

There are several assertions present to work with the (non)existence of files and directories.

The underlying functions such as pathExists() are of course also available for use.

Change log

Please see the changelog for more information on what has changed recently.

Contributing

Please see contributing.md for details and a todolist.

Credits

License

EUPL-1.1. Please see the license file for more information.


All versions of testassist with dependencies

PHP Build Version
Package Version
No informations.
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 jeroen-g/testassist contains the following files

Loading the files please wait ....