Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 2380

Přidáno uživatelem Ondřej Fibich před téměř 10 roky(ů)

Upravy:
- zavislost FreenetIs na PHP 5.3.1 >=
- konstanta UNITTEST definujici, ze bezi kod v modu pro unit testy

Zobrazit rozdíly:

freenetis/branches/1.2/index.php
define('EXT', '.php');
/**
* Test to make sure that Kohana is running on PHP 5.1.3 or newer. Once you are
* sure that your environment is compatible with Kohana, you can disable this.
* Test to make sure that FreenetIS is running on PHP 5.3.1 or newer.
*/
version_compare(PHP_VERSION, '5.1.3', '<') and exit('Kohana requires PHP 5.1.3 or newer.');
(PHP_VERSION_ID < 50301) and exit('FreenetIS requires PHP 5.3.1 or newer.');
//
// DO NOT EDIT BELOW THIS LINE, UNLESS YOU FULLY UNDERSTAND THE IMPLICATIONS.
......
//
// Tests if system is running in unit testing mode
$unittest = (empty($_SERVER['SERVER_NAME']) && strpos(@$_SERVER['SCRIPT_NAME'], 'phpunit'));
define('UNITTEST', empty($_SERVER['SERVER_NAME']) &&
strpos(@$_SERVER['SCRIPT_NAME'], 'phpunit') !== FALSE);
// If unit testing change relative address of system and appplication folders
if ($unittest)
if (UNITTEST)
{
$kohana_application = dirname(__FILE__) . '/' . $kohana_application;
$kohana_system = dirname(__FILE__) . '/' . $kohana_system;
......
(is_dir(APPPATH)) or die
(
'Your <code>$kohana_application</code> directory does not exist. '.
'Set a valid <code>$kohana_application</code> in <tt>'.KOHANA.'</tt> and refresh the page.'
'Set a valid <code>$kohana_application</code> in <tt>'.KOHANA.'</tt>.'
);
(is_dir(SYSPATH) AND file_exists(SYSPATH.'/core/'.'Bootstrap'.EXT)) or die
(
'Your <code>$kohana_system</code> directory does not exist. '.
'Set a valid <code>$kohana_system</code> in <tt>'.KOHANA.'</tt> and refresh the page.'
'Set a valid <code>$kohana_system</code> in <tt>'.KOHANA.'</tt>.'
);
// Mail to developers
......
define('AXODOC_URL', 'http://axo.doc.freenetis.org/');
// If unit testing just initilize do not execute
if($unittest)
if (UNITTEST)
{
require 'tests/BootstrapPHPUnit'.EXT;
}

Také k dispozici: Unified diff