Location: PHPKode > projects > OpenNitro > trunk/Tests/Nitro/Config.inc.php
<?php
//
// +---------------------------------------------------------------------------+
// | Nitro :: Tests :: Config                                                  |
// +---------------------------------------------------------------------------+
// | Copyright (c) 2003-2006 June Systems BV                                   |
// +---------------------------------------------------------------------------+
// | This library is free software; you can redistribute it and/or modify it   |
// | under the terms of the GNU Lesser General Public License as published by  |
// | the Free Software Foundation; either version 2.1 of the License, or (at   |
// | your option) any later version.                                           |
// |                                                                           |
// | This library is distributed in the hope that it will be useful, but       |
// | WITHOUT ANY WARRANTY; without even the implied warranty of                |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser   |
// | General Public License for more details.                                  |
// |                                                                           |
// | You should have received a copy of the GNU Lesser General Public License  |
// | along with this library; if not, write to the Free Software Foundation,   |
// | Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA            |
// +---------------------------------------------------------------------------+
// | Authors: Jesper Avot <hide@address.com>                             |
// +---------------------------------------------------------------------------+
//
// $Id: Config.inc.php 229 2008-04-17 09:20:31Z oli $
//

/**
 * Set error_reporting
 */
error_reporting(E_ALL & ~E_NOTICE);

/**
 * Include required files
 */
require_once NITRO_ROOT.'Nitro/Config.inc.php';

/**
 * Config TestCase
 */
class Config_Test extends Nitro_TestCase {

	function Config_Test($Name = "Config_Test")
	{
		parent::Nitro_TestCase($Name);
	}
	
	function setUp()
	{
		$this->NitroConfig = new NitroConfig(NITRO_ROOT.'/Tests/Data/Config.ini');
	}
	
	function test_NitroConfig()
	{
		$this->NitroConfig->NitroConfig('');
		$this->AssertEquals(FALSE, $this->NitroConfig->ConfigFile);
		$this->AssertEquals("Config file does not exist", $this->NitroConfig->Error);
	}
}
?>
Return current item: OpenNitro