-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathphpunit.php
More file actions
77 lines (58 loc) · 1.48 KB
/
phpunit.php
File metadata and controls
77 lines (58 loc) · 1.48 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
73
74
75
76
77
<?php
/**
* Test bootstrap for Beautiful Asset
*
* You will find a number of Mock (but real) objects used in
* various tests. In the future I plan to place these in their
* own directory.
*
* @package Beautiful
* @subpackage Beautiful Asset
* @category Test
* @author Luke Morton
* @copyright Luke Morton, 2012
* @license MIT
*/
define('EXT', '.php');
define('APPPATH', __DIR__.'/test/');
define('SYSPATH', __DIR__.'/test/system/');
// define('DOCROOT', __DIR__.'/test/');
// define('MODPATH', __DIR__.'/test/');
error_reporting(E_ALL | E_STRICT);
require SYSPATH.'classes/Kohana/Core.php';
require SYSPATH.'classes/Kohana.php';
spl_autoload_register(array('Kohana', 'auto_load'));
I18n::lang('en-gb');
Kohana::$config = new Kohana_Config;
Kohana::$config->attach(new Config_File);
Kohana::modules(array('beautiful-asset' => __DIR__.'/'));
class Asset_Mock extends Asset {
protected $_type = 'mock';
public $callback;
public function html()
{
if ($this->callback === NULL)
{
$this->callback = function () { return ''; };
}
return call_user_func($this->callback, $this->attributes());
}
}
class Asset_CustomMock extends Asset_Mock {
protected $_settings = array(
'attributes' => array(
'data-custom' => TRUE,
),
);
}
class Asset_Group_Mock extends Asset_Group {
public static $config = array();
protected function load_config()
{
return static::$config;
}
public function config($key = NULL)
{
return parent::config($key);
}
}