<?php
// +---------------------------------------------+
// |     Copyright  2007 - 2009 weenCompany      |
// |     http://www.weentech.com                 |
// |     This file may not be redistributed.     |
// +---------------------------------------------+

include_once(INSTALL_PATH.'/classes/ConfigurationTest.php');

// Functions list to test with 'test_system'
$funcs = array('fopen', 'fclose', 'fread', 'fwrite', 'rename', 'move_uploaded_file', 
'file_exists', 'unlink', 'rmdir', 'mkdir', 'getcwd', 'chdir', 'chmod');

// Test list to execute (function/args)
$tests = array(
	'phpversion' => false,
	'mysql_support' => false,
	'upload' => false,
	'system' => $funcs,
	'gd' => false,
	'cnlang_file' => INSTALL_PATH.'/../admin/languages/custom_lang.php',
	'config_file' => INSTALL_PATH.'/../includes/config.php',
	'backup_dir' => INSTALL_PATH.'/../admin/backup/',
	'modules_dir' => INSTALL_PATH.'/../modules/',
	'procn_dir' => INSTALL_PATH.'/../modules/m17_products/images/',
	'proupload_dir' => INSTALL_PATH.'/../modules/m17_products/upload/',
	'images_dir' => INSTALL_PATH.'/../images/',
	'templates_dir' => INSTALL_PATH.'/../templates/',
);


// Execute tests
$ConfigurationTest = new ConfigurationTest;

$res = $ConfigurationTest->check($tests);


echo '<config>'."\n";
	echo '<testList id="required">'."\n";
	foreach ($res AS $key => $line)
		echo '<test id="'.$key.'" result="'.$line.'"/>'."\n";
	echo '</testList>'."\n";
echo '</config>';
?>