Download the PHP package honzavaclavik/testbench without Composer

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

At this moment I don't have time, energy and money to maintain this project. But it's a shame so if you depend on this project and you want to become a sponsor or develop it further please don't hesitate to contact me. Otherwise, I am not able to guarantee bright future of this repo... :)

Build Status

Tested against PHP 5.6 and 7.0. Please read this wiki.

Heavily inspired by these GitHub projects:

And article(s):

Simple test bench for Nette Framework projects

Write integration tests as simple as possible. This project helps you to write tests very quickly. DRY! The main goal of this project is to make testing very simple for everyone and help with the difficult start.

You can find few examples in this readme or take a look to the tests folder in this project.

Installation

Testbench itself doesn't need database. But if you want to use Testbench\TDoctrine or Testbench\TNetteDatabase trait you have to setup database for the first connection. You should use standard database configuration - nothing special. You can see example in tests/tests.local.neon.dist file. Empty database is good enough for Testbench. Supported databases are:

For another databases please send PR or open issue.

Minimal code

At first you need classic bootstrap file (just example, DIY):

It's important, that we are not creating dependency injection container here. You can use autoload from composer if you don't want to use robot loader. You should also create config file e.g. tests.neon. This file is needed only for database tests at this moment. In this file you should configure your project before tests:

And you are ready to go:

You can easily write cover with tests UI\Controls, restricted areas, forms, signals, redirects, ...

Please read this article.

Give it a shot!

Look at the tests in this project. You'll see how to use it properly. There are examples in tests folder or in the wiki. Learn how to use these traits:


All versions of testbench with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1 || ^7.2
kdyby/fake-session Version ^2.1
nette/application Version ^2.4 || ^v3.0
nette/bootstrap Version ^2.4 || ^v3.0
nette/di Version ^2.4 || ^v3.0
nette/safe-stream Version ^2.3
nette/security Version ^2.4 || ^v3.0
nette/tester Version ^2.0
nette/utils Version ^2.4 || ^v3.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 honzavaclavik/testbench contains the following files

Loading the files please wait ....