Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 0f724a4bbf
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 72 lines (64 sloc) 1.907 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter Minify
*
* A minification driver system for CodeIgniter
*
* NOTICE OF LICENSE
*
* Licensed under the Open Software License version 3.0
*
* This source file is subject to the Open Software License (OSL 3.0) that is
* bundled with this package in the files license.txt / license.rst. It is
* also available through the world wide web at this URL:
* http://opensource.org/licenses/OSL-3.0
* If you did not receive a copy of the license and are unable to obtain it
* through the world wide web, please send an email to
* licensing@ellislab.com so we can send you a copy immediately.
*
* @package ci-minify
* @author Eric Barnes
* @copyright Copyright (c) Eric Barnes. (http://ericlbarnes.com/)
* @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
* @link http://ericlbarnes.com
* @since Version 1.0
* @filesource
*/

// ------------------------------------------------------------------------

/**
* Unit Test Controller
*
* @subpackage Controllers
*/
class Test extends CI_Controller {

function __construct()
{
parent::__construct();
$this->load->library('unit_test');
$this->load->driver('minify');
}

function index()
{
$class_methods = get_class_methods($this);
foreach ($class_methods as $method_name)
{
if (substr($method_name, 0, 5) == '_test')
{
self::$method_name();
}
}

echo $this->unit->report();
}

private function _test_css()
{
$file = 'test/css/calendar.css';
$this->unit->run($this->minify->css->min($file), 'is_string', 'test min css');
}

private function _test_js_min()
{
$file = 'test/js/colorbox.js';
$this->unit->run($this->minify->js->min($file), 'is_string', 'test min js');
}
}

/* End of file test.php */
/* Location: ./application/controllers/test.php */
Something went wrong with that request. Please try again.