fixing testunits for gulliver classes

This commit is contained in:
Fernando
2012-07-13 06:27:36 -04:00
parent 259263bcc8
commit 8700af7df4
48 changed files with 516 additions and 419 deletions

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_JavaScriptTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_JavaScript();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_JavaScript($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_JavaScriptTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -67,7 +69,7 @@ class classXmlForm_Field_JavaScriptTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[2]->isArray() == false);
$this->assertTrue( $params[2]->isOptional () == true);
$this->assertTrue( $params[2]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field_JavaScript::render
@@ -87,7 +89,7 @@ class classXmlForm_Field_JavaScriptTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field_JavaScript::renderGrid
@@ -105,7 +107,7 @@ class classXmlForm_Field_JavaScriptTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_JavaScript::validateValue
@@ -120,6 +122,6 @@ class classXmlForm_Field_JavaScriptTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'value');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
}
}