Download the PHP package kohana/koharness without Composer

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

koharness - bootstrap a clean Kohana app for testing your modules

Build Status

koharness is a very simple package (read, hack) that provides a clean testing environment for your Kohana modules. It can generate a basic Kohana application containing your module and any dependencies, which you can then use to run tests with your favourite tools.

koharness gives you full control of module loading order, which may be vital for modules that are designed to extend others using the Cascading File System.

Installing koharness in your module

Add it as a development dependency in your module's composer.json:

Run composer install in your module's root directory.

Configuring module dependencies

Your module will almost certainly require the kohana core (if it doesn't you can probably test it in isolation without koharness or any other bootstrapper - which is obviously good).

If you want to use phpunit, you'll probably also want the Kohana unittest module.

Add them (and anything else you need) to your composer.json too. For extra cleanliness, force composer-installers to install kohana modules into the normal vendor path instead of into /modules (note, this won't affect end-users of your module).

This will get all the dependencies installed on your machine, but you need to tell koharness how to bootstrap them for your test environment and the order that they should be loaded by Kohana::modules().

Add a koharness.php file in the repository root:

Building your harness

Now you have your module in a directory with all its dependencies inside it - so it needs to be turned "inside out" to be more like a standard app with your module as a dependency. Here's where koharness does it's thing.

In your module root directory, just run vendor/bin/koharness (presuming you're using composer's default bin-dir setting). This will wipe out your specified temp_dir and build a structure of symlinks and files that looks like this:

The bootstrap.php is generated from a standard Kohana 3.3 template that ships with koharness, with your modules included.

Running tests

Once you have built your harness, you can run tests using whatever tool you prefer.

PHPUnit with the kohana unittest module

Easy peasy:

Other tools

If you want to load your kohana environment in phpspec, behat or similar then you'll also find your module working directory contains a koharness_bootstrap.php that defines the various path constants that you'd normally get from index.php or the unittest module runner.

In phpspec for example, you could just do something like this:

Configuring for Travis

To automate builds for your module on travis, you'd just do something like this:

License

koharness is copyright (c) 2014 Kohana Team and distributed under a BSD License.

It was contributed to the Kohana project by inGenerator Ltd.


All versions of koharness with dependencies

PHP Build Version
Package Version
Requires composer/installers Version ~1.0
kohana/core Version 3.3.*
php Version >=5.3.3
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 kohana/koharness contains the following files

Loading the files please wait ....