Files
luos/old_tests/automated/gulliver/system/classXml_documentTest.php

123 lines
4.2 KiB
PHP
Raw Normal View History

2012-07-12 20:40:06 -04:00
<?php
require_once PATH_TRUNK . 'gulliver/thirdparty/smarty/libs/Smarty.class.php';
require_once PATH_TRUNK . 'gulliver/system/class.xmlform.php';
require_once PATH_TRUNK . 'gulliver/system/class.xmlDocument.php';
require_once PATH_TRUNK . 'gulliver/system/class.form.php';
require_once PATH_TRUNK . 'gulliver/system/class.dbconnection.php';
require_once PATH_TRUNK . 'gulliver/thirdparty/propel/Propel.php';
require_once PATH_TRUNK . 'gulliver/thirdparty/creole/Creole.php';
require_once PATH_TRUNK . 'gulliver/thirdparty/pear/PEAR.php';
require_once PATH_TRUNK . 'gulliver/system/class.xmlDocument.php';
/**
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
2012-07-12 20:40:06 -04:00
*/
class classXml_documentTest extends PHPUnit_Framework_TestCase
{
/**
* @var Xml_document
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp()
{
$this->object = new Xml_document();
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}
/**
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
{
$methods = get_class_methods('Xml_document'); $this->assertTrue( count($methods) == 11);
2012-07-12 20:40:06 -04:00
}
/**
* @covers Xml_document::Xml_document
* @todo Implement testXml_document().
*/
2012-07-12 20:40:06 -04:00
public function testXml_document()
{
$methods = get_class_methods($this->object);
$this->assertTrue( in_array('Xml_document', $methods ), 'exists method Xml_document' );
$r = new ReflectionMethod('Xml_document', 'Xml_document');
$params = $r->getParameters();
}
/**
* @covers Xml_document::parseXmlFile
* @todo Implement testparseXmlFile().
*/
2012-07-12 20:40:06 -04:00
public function testparseXmlFile()
{
$methods = get_class_methods($this->object);
$this->assertTrue( in_array('parseXmlFile', $methods ), 'exists method parseXmlFile' );
$r = new ReflectionMethod('Xml_document', 'parseXmlFile');
$params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'filename');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
$this->assertTrue( $params[1]->getName() == 'content');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
/**
* @covers Xml_document::findNode
* @todo Implement testfindNode().
*/
2012-07-12 20:40:06 -04:00
public function testfindNode()
{
$methods = get_class_methods($this->object);
$this->assertTrue( in_array('findNode', $methods ), 'exists method findNode' );
$r = new ReflectionMethod('Xml_document', 'findNode');
$params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'xpath');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
/**
* @covers Xml_document::getXML
* @todo Implement testgetXML().
*/
2012-07-12 20:40:06 -04:00
public function testgetXML()
{
$methods = get_class_methods($this->object);
$this->assertTrue( in_array('getXML', $methods ), 'exists method getXML' );
$r = new ReflectionMethod('Xml_document', 'getXML');
$params = $r->getParameters();
}
/**
* @covers Xml_document::save
* @todo Implement testsave().
*/
2012-07-12 20:40:06 -04:00
public function testsave()
{
$methods = get_class_methods($this->object);
$this->assertTrue( in_array('save', $methods ), 'exists method save' );
$r = new ReflectionMethod('Xml_document', 'save');
$params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'filename');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}