Documentación GVHIDRA 3.1.5
Referencia de la Clase gvHidraTypeBaseTest

Métodos públicos

 testSetRequired ()
 testGetRequired ()
 testSetMaxLength ()
 testGetMaxLength ()
 testEnableInputMask ()
 testGetStatusInputMask ()
 testEnableServerValidation ()
 testGetStatusServerValidation ()
 testValidate ()
 testValidate2 ()

Métodos protegidos

 setUp ()
 tearDown ()

Atributos protegidos

 $object

Descripción detallada

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.


Documentación de las funciones miembro

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 ( )
Tareas pendientes:
Implement 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 ( )
Tareas pendientes:
Implement 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 ( )
Tareas pendientes:
Implement 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 ( )
Tareas pendientes:
Implement 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 ( )
Tareas pendientes:
Implement 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 ( )
Tareas pendientes:
Implement 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 ( )
Tareas pendientes:
Implement 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 ( )
Tareas pendientes:
Implement 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');
                        }
                }
    }

Documentación de los campos

$object [protected]

Definición en la línea 14 del archivo gvHidraTypeBaseTest.php.


La documentación para esta clase fue generada a partir del siguiente fichero: