Download the PHP package oblik/kirby-tester without Composer

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

kirby-tester

Allows you to easily write plugin tests by automatically loading Kirby and optionally changing its roots.

⚠ Deprecated!

You don't need a plugin to change roots. Your plugin repo could double as a test site for the plugin. Check Monolithic Plugin Setup for details.

Installation

Install the package in either your plugin folder (recommended), or your site folder:

Usage

The utility expects you to have the following directory setup in your plugin:

Any valid root folders in tests/roots will be used as Kirby roots. If a tests/bootstrap.php script is found, it will be included as well after Kirby has been loaded. This is can be useful to run some initializations.

As a plugin dependency

When installed inside your plugin's vendor folder, the tester will automatically figure out in which plugin it is and where the Kirby root is. It will also load Kirby (via its bootstrap script) and create a new Kirby instance based on your folder setup.

If you wish to also use the panel with the modified Kirby roots, you can change your site's index.php like that:

Note: If you also have PHPUnit installed, you can run tests right away. Since PHPUnit runs the Composer autoloader, this package will be loaded, which will also load Kirby.

As a site dependency

When installed inside your site's vendor folder, you need to use the global kirbytest() function provided to you:

kirbytest(string $input)

In your site's index.php, you can use it like this:

Bootstrap hooks

You can use tests/bootstrap.php to do various things at different points of the script execution by defining hooks:

By default, hooks are run only when PHP is running from the CLI (i.e. when tests are running). If you want them to always run, set always to true inside the configuration above.


All versions of kirby-tester 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 oblik/kirby-tester contains the following files

Loading the files please wait ....