1. Go to this page and download the library: Download kohana/koharness library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kohana / koharness example snippets
// {my-module-root}/koharness.php
return array(
// This list of paths will also be passed to Kohana::modules(). Define the modules (including your own)
// in the order you want them to appear in Kohana::modules()
'modules' => array(
'my-module' => __DIR__,
'unittest' => __DIR__.'/vendor/kohana/unittest'
),
// You can specify where to create the harness application - the default is /tmp/koharness
'temp_dir' => '/home/me/testing'
);
// MODULE_ROOT/spec/ObjectBehavior.php
namespace spec;
r {}
// MODULE_ROOT/spec/You/YourClassSpec.php
class YourClassSpec extends \spec\ObjectBehavior
shell
cd /tmp/koharness
vendor/bin/phpunit --bootstrap=modules/unittest/bootstrap.php modules/unittest/tests.php