![]() |
Documentación GVHIDRA 3.1.5
|
Métodos públicos | |
testSetRequired () | |
testGetRequired () | |
testSetMaxLength () | |
testGetMaxLength () | |
testEnableInputMask () | |
testGetStatusInputMask () | |
testEnableServerValidation () | |
testGetStatusServerValidation () | |
testValidate () | |
testValidate2 () | |
Métodos protegidos | |
setUp () | |
tearDown () | |
Atributos protegidos | |
$object |
Test class for gvHidraTypeBase. Generated by PHPUnit on 2009-04-23 at 09:38:40.
Definición en la línea 8 del archivo gvHidraTypeBaseTest.php.
setUp | ( | ) | [protected] |
Sets up the fixture, for example, opens a network connection. This method is called before a test is executed.
protected
Definición en la línea 22 del archivo gvHidraTypeBaseTest.php.
{ $this->object = new gvHidraTypeBase; }
tearDown | ( | ) | [protected] |
Tears down the fixture, for example, closes a network connection. This method is called after a test is executed.
protected
Definición en la línea 33 del archivo gvHidraTypeBaseTest.php.
{ }
testEnableInputMask | ( | ) |
Definición en la línea 79 del archivo gvHidraTypeBaseTest.php.
{ // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); }
testEnableServerValidation | ( | ) |
Definición en la línea 99 del archivo gvHidraTypeBaseTest.php.
{ // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); }
testGetMaxLength | ( | ) |
Definición en la línea 69 del archivo gvHidraTypeBaseTest.php.
{ // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); }
testGetRequired | ( | ) |
Definición en la línea 49 del archivo gvHidraTypeBaseTest.php.
{ // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); }
testGetStatusInputMask | ( | ) |
Definición en la línea 89 del archivo gvHidraTypeBaseTest.php.
{ // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); }
testGetStatusServerValidation | ( | ) |
Definición en la línea 109 del archivo gvHidraTypeBaseTest.php.
{ // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); }
testSetMaxLength | ( | ) |
Definición en la línea 59 del archivo gvHidraTypeBaseTest.php.
{ // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); }
testSetRequired | ( | ) |
Definición en la línea 40 del archivo gvHidraTypeBaseTest.php.
{ $this->assertFalse($this->object->getRequired(),'por defecto false'); $this->object->setRequired(true); $this->assertTrue($this->object->getRequired(),'cambiar a true'); }
testValidate | ( | ) |
comprobar requeridos vacios
Definición en la línea 119 del archivo gvHidraTypeBaseTest.php.
{ $txt = 'Es un campo obligatorio.'; $this->object->setRequired(true); // si debe dar error de required foreach (array('',"",null,) as $val) { try { $this->object->validate($val); } catch (Exception $e) { if ($e->getMessage()!=$txt) $this->fail('hay otra excepcion pero no la de required: '.$e->getMessage()); continue; } $this->fail('valor '.var_export($val,true).' no pasa el required'); } }
testValidate2 | ( | ) |
comprobar requeridos vacios
Definición en la línea 139 del archivo gvHidraTypeBaseTest.php.
{ $txt = 'Es un campo obligatorio.'; $this->object->setRequired(true); // no debe dar error de required foreach (array(0,'0','algo',' ',1234) as $val) { try { $this->object->validate($val); } catch (Exception $e) { if ($e->getMessage()==$txt) $this->fail('el valor '.var_export($val,true).' no pasa la validacion de required'); } } }
$object [protected] |
Definición en la línea 14 del archivo gvHidraTypeBaseTest.php.