<?php

include_once '../compatible.php';
addTestToRun('compatible.php', 'file_get_contents', 'testFileGetContents', array());
addTestToRun('compatible.php', 'array_search', 'testArraySearch', array());
addTestToRun('compatible.php', 'scandir', 'testScanDir', array());
addTestToRun('compatible.php', 'versionCompare', 'testVersionCompare', array());
addTestToRun('compatible.php', 'call_user_array', 'testCallUserArray', array());
function testFileGetContents()
{
    $return = @file_get_contents('notExistingFile.extension');
    testResult('File not found returns not false.', $return !== false);
    $return = file_get_contents('file.empty');
    $shouldReturn = NULL;
    testResult('Empty file doesn\'t return NULL', $return != $shouldReturn);
    $return = file_get_contents('file.txt');
    $shouldReturn = "This a fileNEWLINE" . "and this is a new lineNEWLINE" . "this file should become bigger than 1024 bytesNEWLINE";
    testResult('File contents doesn\'t match, propably problems with NEWLINES.', $return != $shouldReturn);
}
function testArraySearch()
{
    $array = array();
    $array[7] = 'seven';
    $array['8'] = 'string';
    $array[1] = '1';
    $array[2] = 1;
    $array[0] = 'zero';
    $result = array_search('seven', $array);
    testResult('An array_search error', $result !== 7);
    $result = array_search('string', $array);
    testResult('An array_search error 2', $result !== 8);
<?php

set_include_path(get_include_path() . PATH_SEPARATOR . '../../');
include_once '../config.class.php';
global $testConfig;
$testConfig = new config();
addTestToRun('config.class.php', 'addConfigItem', 'testAddConfigItem', array(&$testConfig));
addTestToRun('config.class.php', 'addConfigItemFromArray', 'testAddConfigItemFromArray', array(&$testConfig));
addTestToRun('config.class.php', 'addConfigItemFromFile', 'testAddConfigItemsFromFile', array(&$testConfig));
addTestToRun('config.class.php', 'getConfigItem', 'testGetConfigItem', array(&$testConfig));
addTestToRun('config.class.php', 'changeValueConfigItem', 'testChangeValueConfigItem', array(&$testConfig));
addTestToRun('config.class.php', 'getConfigDir', 'testGetConfigDir', array(&$testConfig));
addTestToRun('config.class.php', 'exists', 'testExists', array(&$testConfig));
addTestToRun('config.class.php', 'isDir', 'testtestIsDir', array(&$testConfig));
addTestToRun('config.class.php', 'removeConfigItem', 'testRemoveConfigItem', array(&$testConfig));
function testAddConfigItem()
{
}
function testAddConfigItemFromArray()
{
}
function testAddConfigItemsFromFile()
{
}
function testGetConfigItem()
{
}
function testChangeValueConfigItem()
{
}
function testGetConfigDir()