forked from mlocati/postcss
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.php
More file actions
32 lines (27 loc) · 973 Bytes
/
bootstrap.php
File metadata and controls
32 lines (27 loc) · 973 Bytes
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
<?php
error_reporting(E_ALL);
$timezone_identifier = @date_default_timezone_get();
if (empty($timezone_identifier)) {
$timezone_identifier = 'UTC';
}
date_default_timezone_set($timezone_identifier);
unset($timezone_identifier);
require_once dirname(__DIR__).DIRECTORY_SEPARATOR.'vendor'.DIRECTORY_SEPARATOR.'autoload.php';
if (!is_dir(__DIR__.DIRECTORY_SEPARATOR.'tmp')) {
if (@mkdir(__DIR__.DIRECTORY_SEPARATOR.'tmp', 0777) === false) {
fprintf(STDERR, 'Failed to create directory '.__DIR__.DIRECTORY_SEPARATOR.'tmp'."\n");
exit(1);
}
}
spl_autoload_register(
function ($class) {
if (strpos($class, 'PostCSS\\Tests') !== 0) {
return;
}
$file = __DIR__.DIRECTORY_SEPARATOR.'tests'.str_replace('\\', DIRECTORY_SEPARATOR, substr($class, strlen('PostCSS\\Tests'))).'.php';
if (is_file($file)) {
require_once $file;
}
}
);
PHPUnit_Framework_Error_Notice::$enabled = true;