Documentación GVHIDRA 3.1.5
Referencia de la Clase IgepComunicacionTest

Métodos públicos

 testData2Arrays ()
 testConstruirArraySeleccionar ()
 testConstruirArrayBorrar ()
 test_limpiarRequest ()
 test_getPosicionRegistroPantalla ()
 testConstruirArrayBuscar ()
 testConstruirArrayIniciarVentana ()
 testBuildDataRefreshUI ()
 testConstruirArrayOrdenarTabla ()
 testConstruirArrayFocusChanged ()
 testConstruirArrayAbrirVentanaSeleccion ()
 testConstruirArrayBuscarVentanaSeleccion ()
 testCheckDataTypes ()
 testDameDatos ()
 testDameDatosAntiguos ()
 testDameFilaActual ()
 testDamePanelActivo ()
 testReset ()
 testSetOperacion ()
 testSetArrayOperacion ()
 testGetOperacion ()
 testGetIndice ()
 testPosicionarEnTupla ()
 test_next ()
 test_getIndiceInterno ()
 testCurrentTupla ()
 testGetCampo ()
 testGetOldValue ()
 testSetCampo ()
 testFetchTupla ()
 testNextTupla ()
 testSetTupla ()
 testGetAllTuplas ()
 testGetAllTuplasAntiguas ()
 testSetAllTuplas ()
 test_setAllTuplasAntiguas ()
 testSetLista ()
 testHayDatos ()
 testGetFileInfo ()
 testSetMapping ()
 testGetForward ()
 testTransform_User2FW01 ()
 testTransform_User2FW02 ()

Métodos públicos estáticos

static fechaUser ($d, $m, $a)

Métodos protegidos

 setUp ()
 tearDown ()

Atributos protegidos

 $object

Métodos privados estáticos

static selecParte ($car, $d, $m, $a)
static fechaFW2User ($fecha, $tipo)

Descripción detallada

Test class for IgepComunicacion. Generated by PHPUnit on 2009-06-19 at 08:57:00.

Definición en la línea 8 del archivo IgepComunicacionTest.php.


Documentación de las funciones miembro

static fechaFW2User ( fecha,
tipo 
) [static, private]

tipo puede ser TIPO_FECHA o TIPO_FECHAHORA

Definición en la línea 482 del archivo IgepComunicacionTest.php.

static fechaUser ( d,
m,
a 
) [static]

Forma una fecha con format User, aunque sea incorrecta Usada solo para los tests, y comprobar que el error se detecta

Definición en la línea 451 del archivo IgepComunicacionTest.php.

        {
        $p = ConfigFramework::getDateMaskUser();
        $partes = array();
        $partes[0] = self::selecParte($p[0],$d,$m,$a);
        $partes[1] = $p[1];
        $partes[2] = self::selecParte($p[2],$d,$m,$a);
        $partes[3] = $p[3];
        $partes[4] = self::selecParte($p[4],$d,$m,$a);
        return implode($partes);
        }
static selecParte ( car,
d,
m,
a 
) [static, private]

Definición en la línea 463 del archivo IgepComunicacionTest.php.

        {
                switch ($car) {
                        case 'd':
                        case 'j':
                                return $d;
                        case 'm':
                        case 'n':
                                return $m;
                        case 'Y':
                                return $a;
                        default:
                                throw new gvHidraException('Caracter incorrecto: '.$car);
                }
        }
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 IgepComunicacionTest.php.

    {
        $this->object = new IgepComunicacion;
    }
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 IgepComunicacionTest.php.

    {
    }
test_getIndiceInterno ( )
Tareas pendientes:
Implement test_getIndiceInterno().

Definición en la línea 280 del archivo IgepComunicacionTest.php.

                                            {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
test_getPosicionRegistroPantalla ( )
Tareas pendientes:
Implement test_getPosicionRegistroPantalla().

Definición en la línea 80 del archivo IgepComunicacionTest.php.

                                                       {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
test_limpiarRequest ( )
Tareas pendientes:
Implement test_limpiarRequest().

Definición en la línea 70 del archivo IgepComunicacionTest.php.

                                          {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
test_next ( )
Tareas pendientes:
Implement test_next().

Definición en la línea 270 del archivo IgepComunicacionTest.php.

                                {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
test_setAllTuplasAntiguas ( )
Tareas pendientes:
Implement test_setAllTuplasAntiguas().

Definición en la línea 390 del archivo IgepComunicacionTest.php.

                                                {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testBuildDataRefreshUI ( )
Tareas pendientes:
Implement testBuildDataRefreshUI().

Definición en la línea 110 del archivo IgepComunicacionTest.php.

                                             {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testCheckDataTypes ( )
Tareas pendientes:
Implement testCheckDataTypes().

Definición en la línea 160 del archivo IgepComunicacionTest.php.

                                         {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testConstruirArrayAbrirVentanaSeleccion ( )
Tareas pendientes:
Implement testConstruirArrayAbrirVentanaSeleccion().

Definición en la línea 140 del archivo IgepComunicacionTest.php.

                                                              {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testConstruirArrayBorrar ( )
Tareas pendientes:
Implement testConstruirArrayBorrar().

Definición en la línea 60 del archivo IgepComunicacionTest.php.

                                               {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testConstruirArrayBuscar ( )
Tareas pendientes:
Implement testConstruirArrayBuscar().

Definición en la línea 90 del archivo IgepComunicacionTest.php.

                                               {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testConstruirArrayBuscarVentanaSeleccion ( )
Tareas pendientes:
Implement testConstruirArrayBuscarVentanaSeleccion().

Definición en la línea 150 del archivo IgepComunicacionTest.php.

                                                               {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testConstruirArrayFocusChanged ( )
Tareas pendientes:
Implement testConstruirArrayFocusChanged().

Definición en la línea 130 del archivo IgepComunicacionTest.php.

                                                     {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testConstruirArrayIniciarVentana ( )
Tareas pendientes:
Implement testConstruirArrayIniciarVentana().

Definición en la línea 100 del archivo IgepComunicacionTest.php.

                                                       {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testConstruirArrayOrdenarTabla ( )
Tareas pendientes:
Implement testConstruirArrayOrdenarTabla().

Definición en la línea 120 del archivo IgepComunicacionTest.php.

                                                     {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testConstruirArraySeleccionar ( )
Tareas pendientes:
Implement testConstruirArraySeleccionar().

Definición en la línea 50 del archivo IgepComunicacionTest.php.

                                                    {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testCurrentTupla ( )
Tareas pendientes:
Implement testCurrentTupla().

Definición en la línea 290 del archivo IgepComunicacionTest.php.

                                       {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testDameDatos ( )
Tareas pendientes:
Implement testDameDatos().

Definición en la línea 170 del archivo IgepComunicacionTest.php.

                                    {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testDameDatosAntiguos ( )
Tareas pendientes:
Implement testDameDatosAntiguos().

Definición en la línea 180 del archivo IgepComunicacionTest.php.

                                            {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testDameFilaActual ( )
Tareas pendientes:
Implement testDameFilaActual().

Definición en la línea 190 del archivo IgepComunicacionTest.php.

                                         {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testDamePanelActivo ( )
Tareas pendientes:
Implement testDamePanelActivo().

Definición en la línea 200 del archivo IgepComunicacionTest.php.

                                          {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testData2Arrays ( )
Tareas pendientes:
Implement testData2Arrays().

Definición en la línea 40 del archivo IgepComunicacionTest.php.

                                      {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testFetchTupla ( )
Tareas pendientes:
Implement testFetchTupla().

Definición en la línea 330 del archivo IgepComunicacionTest.php.

                                     {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testGetAllTuplas ( )
Tareas pendientes:
Implement testGetAllTuplas().

Definición en la línea 360 del archivo IgepComunicacionTest.php.

                                       {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testGetAllTuplasAntiguas ( )
Tareas pendientes:
Implement testGetAllTuplasAntiguas().

Definición en la línea 370 del archivo IgepComunicacionTest.php.

                                               {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testGetCampo ( )
Tareas pendientes:
Implement testGetCampo().

Definición en la línea 300 del archivo IgepComunicacionTest.php.

                                   {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testGetFileInfo ( )
Tareas pendientes:
Implement testGetFileInfo().

Definición en la línea 420 del archivo IgepComunicacionTest.php.

                                      {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testGetForward ( )
Tareas pendientes:
Implement testGetForward().

Definición en la línea 440 del archivo IgepComunicacionTest.php.

                                     {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testGetIndice ( )
Tareas pendientes:
Implement testGetIndice().

Definición en la línea 250 del archivo IgepComunicacionTest.php.

                                    {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testGetOldValue ( )
Tareas pendientes:
Implement testGetOldValue().

Definición en la línea 310 del archivo IgepComunicacionTest.php.

                                      {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testGetOperacion ( )
Tareas pendientes:
Implement testGetOperacion().

Definición en la línea 240 del archivo IgepComunicacionTest.php.

                                       {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testHayDatos ( )
Tareas pendientes:
Implement testHayDatos().

Definición en la línea 410 del archivo IgepComunicacionTest.php.

                                   {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testNextTupla ( )
Tareas pendientes:
Implement testNextTupla().

Definición en la línea 340 del archivo IgepComunicacionTest.php.

                                    {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testPosicionarEnTupla ( )
Tareas pendientes:
Implement testPosicionarEnTupla().

Definición en la línea 260 del archivo IgepComunicacionTest.php.

                                            {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testReset ( )
Tareas pendientes:
Implement testReset().

Definición en la línea 210 del archivo IgepComunicacionTest.php.

                                {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testSetAllTuplas ( )
Tareas pendientes:
Implement testSetAllTuplas().

Definición en la línea 380 del archivo IgepComunicacionTest.php.

                                       {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testSetArrayOperacion ( )
Tareas pendientes:
Implement testSetArrayOperacion().

Definición en la línea 230 del archivo IgepComunicacionTest.php.

                                            {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testSetCampo ( )
Tareas pendientes:
Implement testSetCampo().

Definición en la línea 320 del archivo IgepComunicacionTest.php.

                                   {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testSetLista ( )
Tareas pendientes:
Implement testSetLista().

Definición en la línea 400 del archivo IgepComunicacionTest.php.

                                   {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testSetMapping ( )
Tareas pendientes:
Implement testSetMapping().

Definición en la línea 430 del archivo IgepComunicacionTest.php.

                                     {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testSetOperacion ( )
Tareas pendientes:
Implement testSetOperacion().

Definición en la línea 220 del archivo IgepComunicacionTest.php.

                                       {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testSetTupla ( )
Tareas pendientes:
Implement testSetTupla().

Definición en la línea 350 del archivo IgepComunicacionTest.php.

                                   {
        // Remove the following lines when you implement this test.
        $this->markTestIncomplete(
          'This test has not been implemented yet.'
        );
    }
testTransform_User2FW01 ( )

Definición en la línea 487 del archivo IgepComunicacionTest.php.

                                              {
                //TODO: pasar aqui los test de transformaNumero
        $p = ConfigFramework::getNumericSeparatorsUser();
        $pd = $p['DECIMAL'];
        $pg = $p['GROUP'];
        $n = ConfigFramework::getNumericSeparatorsFW();
        $nd = $n['DECIMAL'];
        $ng = $n['GROUP'];
        $nf = ConfigFramework::getDateMaskFW();
        $pf = ConfigFramework::getDateMaskUser();

        // numeros
        $v = "1{$pg}234";
        IgepComunicacion::transform_User2FW($v,TIPO_DECIMAL);
        $this->assertSame("1{$ng}234",$v, "decimal con grupos");
        $v = "1{$pg}234{$pg}567";
        $res2 = IgepComunicacion::transform_User2FW($v,TIPO_ENTERO);
        $this->assertSame("1{$ng}234{$ng}567", $v, "entero con grupos");

                $v = 'numeroinvalido';
                IgepComunicacion::transform_User2FW($v, TIPO_ENTERO);
            $this->assertSame('0', $v);
        $errores = ConfigFramework::getTransformErrors();
                $this->assertSame(1, count($errores), 'no defecta numero invalido - '.var_export($errores,true));

                //TODO: el tipo entero no se maneja muy bien en el transformer y se produce
                // algun mensaje de error confuso
                $v = "{$pd}39{$pg}343";
                IgepComunicacion::transform_User2FW($v, TIPO_ENTERO);
            $this->assertSame("0{$nd}393430", $v);
        $errores = ConfigFramework::getTransformErrors();
                $this->assertSame(0, count($errores), 'defecta entero incorrecto - '.var_export($errores,true));
                

                // fechas
                $v = 'fecha invalida';
                IgepComunicacion::transform_User2FW($v, TIPO_FECHA);
        $errores = ConfigFramework::getTransformErrors();
        $this->assertSame($v,null);
                $this->assertEquals(1, count($errores), 'no defecta fecha invalida - '.var_export($errores,true));

                $v = 'fechainvalida';
                IgepComunicacion::transform_User2FW($v, TIPO_FECHA);
        $this->assertSame($v,null);
        $errores = ConfigFramework::getTransformErrors();
                $this->assertSame(1, count($errores), 'no defecta fecha invalida (1 palabra) - '.var_export($errores,true));

        $v = self::fechaUser('30','02','1995');
                IgepComunicacion::transform_User2FW($v, TIPO_FECHA);
        $errores = ConfigFramework::getTransformErrors();
                $this->assertSame(1, count($errores), 'no defecta dia invalido - '.var_export($errores,true));

                $v = '';
                IgepComunicacion::transform_User2FW($v, TIPO_FECHA);
        $this->assertTrue(is_null($v));
                $v = null;
                IgepComunicacion::transform_User2FW($v, TIPO_FECHA);
        $this->assertTrue(is_null($v));
        $var_unset = ''; unset($var_unset);
                IgepComunicacion::transform_User2FW($var_unset, TIPO_FECHA);
        $this->assertTrue(is_null($var_unset));

                $fnegocio = new gvHidraTimestamp('1995-12-24');
                $factualpantalla = self::fechaFW2User($fnegocio,TIPO_FECHA);
                IgepComunicacion::transform_User2FW($factualpantalla, TIPO_FECHA);
                $this->assertSame($fnegocio->formatSOAP(),$factualpantalla->formatSOAP(), "obj1-fecha simple");

                $fnegocio = new gvHidraTimestamp('1995-12-24 15:24:56');
                $factualpantalla = self::fechaFW2User($fnegocio,TIPO_FECHAHORA);
                IgepComunicacion::transform_User2FW($factualpantalla, TIPO_FECHAHORA);
                $this->assertSame($fnegocio->formatSOAP(), $factualpantalla->formatSOAP(), "obj2-fecha con hora");

                $v = '34';
                IgepComunicacion::transform_User2FW($v, TIPO_FECHAHORA);
        $errores = ConfigFramework::getTransformErrors();
                $this->assertNull($v, "numero");
                $this->assertSame(1, count($errores), 'no defecta fecha invalida - '.var_export($errores,true));
                
                $v = '-34';
                IgepComunicacion::transform_User2FW($v, TIPO_FECHAHORA);
        $errores = ConfigFramework::getTransformErrors();
                $this->assertNull($v, "numero negativo");
                $this->assertSame(1, count($errores), 'no defecta fecha invalida - '.var_export($errores,true));
                
                $v = '34.2';
                IgepComunicacion::transform_User2FW($v, TIPO_FECHAHORA);
        $errores = ConfigFramework::getTransformErrors();
                $this->assertNull($v, "numero decimal");
                $this->assertSame(1, count($errores), 'no defecta fecha invalida - '.var_export($errores,true));

                $v = self::fechaUser('12','11','');
                IgepComunicacion::transform_User2FW($v, TIPO_FECHAHORA);
        $errores = ConfigFramework::getTransformErrors();
                $this->assertNull($v, "fecha incompleta");
                $this->assertSame(1, count($errores), 'no defecta fecha invalida - '.var_export($errores,true));

                $v = self::fechaUser('12','11','2007').' 18';
                IgepComunicacion::transform_User2FW($v, TIPO_FECHAHORA);
        $errores = ConfigFramework::getTransformErrors();
                $this->assertNull($v, "fecha con hora incompleta");
                $this->assertSame(1, count($errores), 'no defecta fecha invalida - '.var_export($errores,true));

                $v = self::fechaUser('12','11','2007').' 18:163';
                IgepComunicacion::transform_User2FW($v, TIPO_FECHAHORA);
        $errores = ConfigFramework::getTransformErrors();
                $this->assertNull($v, "fecha con minuto erroneo");
                $this->assertSame(1, count($errores), 'no defecta fecha invalida - '.var_export($errores,true));

                $v1 = self::fechaUser('4','12','2007');
                IgepComunicacion::transform_User2FW($v1, TIPO_FECHAHORA);
                $v2 = self::fechaUser('04','12','2007');
                IgepComunicacion::transform_User2FW($v2, TIPO_FECHAHORA);
                $this->assertEquals($v1->formatSOAP(), $v2->formatSOAP(), "no convierte dia sin 0's delante");
        
                $v1 = self::fechaUser('04','2','2007');
                IgepComunicacion::transform_User2FW($v1, TIPO_FECHAHORA);
                $v2 = self::fechaUser('04','02','2007');
                IgepComunicacion::transform_User2FW($v2, TIPO_FECHAHORA);
                $this->assertEquals($v1->formatSOAP(), $v2->formatSOAP(), "no convierte mes sin 0's delante");


                // otros tests
                $v = 'algo';
                IgepComunicacion::transform_User2FW($v, null);
            $this->assertSame('algo', $v,'tipo null');
                IgepComunicacion::transform_User2FW($v,'');
            $this->assertSame('algo', $v,'tipo cadena vacia');
                IgepComunicacion::transform_User2FW($v);
            $this->assertSame('algo', $v,'sin tipo');

    }
testTransform_User2FW02 ( )

Definición en la línea 619 del archivo IgepComunicacionTest.php.

                                              {
                $v = "algo";
                try {
                        IgepComunicacion::transform_User2FW($v,array(''));
                } catch (Exception $e) {
                        return;
                }
                $this->fail('tipo array vacia');
    }

Documentación de los campos

$object [protected]

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


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