Utilisateur:Amgine/mwApiXmlParseTest.php

Une nouvelle de Wikinews, la source d'informations que vous pouvez écrire.
<?php
// Set ini include path to add PEAR
ini_set( 'include_path', ini_get('include_path') . ':/usr/lib/php/PEAR');
// Load PHPUnit classes
require_once( 'PHPUnit/Framework.php' );
require_once( 'mwApiXmlParse.php' );

/**
 * mwXmlApiItem_TestCase class
 **
 * Unit testing class for mwXmlApiItem class
 * 
 * (and my "learn how to implement unit testing" project.)
 **
 *  This program is free software; you can redistribute it and/or modify it
 *  under the terms of the GNU General Public License as published by the Free
 *  Software Foundation; either version 2 of the License, or (at your option)
 *  any later version.
 *
 *  This program 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 General Public License for
 *  more details.
 *
 *  You should have received a copy of the GNU General Public License along with
 *  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
 *  Place - Suite 330, Boston, MA 02111-1307, USA.
 *  http://www.gnu.org/copyleft/gpl.html
 **
 * @author Amgine <amgine.saewyc@gmail.com>
 * @copyright 2010 by Amgine <amgine.saewyc@gmail.com>
 **/
class mwXmlApiItem_TestCase extends PHPUnit_Framework_Testcase{
	/**
	 * testValuesInitialization method
	 **
	 * My first unit test.
	 **/
	public function testValuesInitialization(){
		$mwAXP = new mwApiXmlParse;
		
		$this->assertTrue( isset( $mwAXP->tag ), '!isset( mwApiXmlParse->tag )' );
		
		unset( $mwAXP );
	}
}