1 <?php
defined('SYSPATH') OR die('No direct access allowed.');
3 * Kohana help class for unit tests
9 private static $tap = false;
11 * Create and return a new PHPTap instance
15 public static function instance()
17 if (self
::$tap !== false)
20 $path = self
::tap_path();
21 if ($path !== false) {
23 self
::$tap = new phptap();
30 * Check if testfile is available
32 public static function get_testfile($file = false)
38 return Kohana
::find_file('views', 'tests/'.$file);
42 * Return path to phptap
44 public static function tap_path()
46 return Kohana
::find_file('vendor', 'phptap/tapunit');