Documentación GVHIDRA 3.1.5
Referencia de la Clase IgepComunicaUsuarioTest

Métodos públicos

 testReset ()
 testSetOperacion ()
 testSetIndice ()
 testGetOperacion ()
 testGetIndice ()
 testCurrentTupla ()
 testGetCampo ()
 testGetValue ()
 testGetOldValue ()
 testSetCampo ()
 testSetSelected ()
 testSetSeleccionado ()
 testSetValue ()
 testNextTupla ()
 testFetchTupla ()
 testSetTupla ()
 testGetAllTuplas ()
 testGetAllTuplasAntiguas ()
 testSetAllTuplas ()
 testHayDatos ()
 testGetLista ()
 testSetLista ()
 testGetFileInfo ()
 testSetRowColor ()
 test_prepararOperacion ()
 testPrepararPresentacion ()
 testGetForward ()

Métodos protegidos

 setUp ()
 tearDown ()

Atributos protegidos

 $object

Descripción detallada

Test class for IgepComunicaUsuario. Generated by PHPUnit on 2009-05-19 at 18:56:11.

Definición en la línea 8 del archivo IgepComunicaUsuarioTest.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 IgepComunicaUsuarioTest.php.

    {
        $var = array();
        $this->o = new IgepComunicaUsuario($var,$var,$var);
    }
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 34 del archivo IgepComunicaUsuarioTest.php.

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

Definición en la línea 281 del archivo IgepComunicaUsuarioTest.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 91 del archivo IgepComunicaUsuarioTest.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 181 del archivo IgepComunicaUsuarioTest.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 201 del archivo IgepComunicaUsuarioTest.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 211 del archivo IgepComunicaUsuarioTest.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 101 del archivo IgepComunicaUsuarioTest.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 261 del archivo IgepComunicaUsuarioTest.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 477 del archivo IgepComunicaUsuarioTest.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 81 del archivo IgepComunicaUsuarioTest.php.

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

Definición en la línea 241 del archivo IgepComunicaUsuarioTest.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 121 del archivo IgepComunicaUsuarioTest.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 71 del archivo IgepComunicaUsuarioTest.php.

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

Definición en la línea 111 del archivo IgepComunicaUsuarioTest.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 231 del archivo IgepComunicaUsuarioTest.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 171 del archivo IgepComunicaUsuarioTest.php.

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

de negocio a interfaz

Definición en la línea 291 del archivo IgepComunicaUsuarioTest.php.

                                               {
                $fhora = ' H:i:s';
                // los tests de fechas basados en los de ConfIgepTest::testFormatoFecha
                $cambios = array(
                //      array('j','d'),
                        //array('n','m'),
                        );

        $pe = ConfigFramework::getDateMaskUser();
        $n = ConfigFramework::getDateMaskFW();

        // obtengo formato salida
        $po = $pe;
        foreach ($cambios as $fila=>$val) {
                        $po = str_replace($val[0], $val[1], $po);
        }
        $pant = ConfigFramework::getNumericSeparatorsUser();
        $d = $pant['DECIMAL'];
        $g = $pant['GROUP'];
        $neg = ConfigFramework::getNumericSeparatorsFW();
        $nd = $neg['DECIMAL'];
        $ng = $neg['GROUP'];

                // fecha en negocio como objeto
                $fnegocio = new gvHidraTimestamp('1995-12-24');
                $factualpantalla = $fnegocio;
                $this->o->prepararPresentacion($factualpantalla,TIPO_FECHA);
                $this->assertSame($factualpantalla, $fnegocio->formatUser(), "obj1-fecha simple");

                $fnegocio = new gvHidraTimestamp('1995-12-24 15:24:56');
                $factualpantalla = $fnegocio;
                $this->o->prepararPresentacion($factualpantalla,TIPO_FECHAHORA);
                $this->assertSame($factualpantalla, $fnegocio->formatUser(), "obj2-fecha con hora");

                $fnegocio = new gvHidraTimestamp('1995-06-04'); // 4-jun
                $factualpantalla = $fnegocio;
                $this->o->prepararPresentacion($factualpantalla,TIPO_FECHA);
                $this->assertSame($factualpantalla, $fnegocio->formatUser(), "obj3-dia y mes menor de 10");

                // fecha en negocio como string
                $f = new gvHidraTimestamp('1995-12-24');
                $fnegocio = $f->formatFW();
                $factualpantalla = $fnegocio;
                $this->o->prepararPresentacion($factualpantalla,TIPO_FECHA);
                $this->assertSame($factualpantalla, $f->formatUser(), "st1-fecha simple");

                $f = new gvHidraTimestamp('1995-12-24 15:24:56');
                $fnegocio = $f->formatFW();
                $this->o->prepararPresentacion($fnegocio,TIPO_FECHAHORA);
                $this->assertSame($fnegocio, $f->formatUser(), "st2-fecha con hora");

                $f = new gvHidraTimestamp('1995-06-04'); // 4-jun
                $fnegocio = $f->formatFW();
                $this->o->prepararPresentacion($fnegocio,TIPO_FECHA);
                $this->assertSame($fnegocio, $f->formatUser(), "st3-dia y mes menor de 10");

                // los tests de numeros basados en los de ConfIgepTest::testFormatoNumero
        $num = 123;
        $this->o->prepararPresentacion($num,TIPO_ENTERO);
        $this->assertEquals($num,123,'entero como numero, sin grupos ni decimales');
        $num = '123';
        $this->o->prepararPresentacion($num,TIPO_ENTERO);
        $this->assertEquals($num,123,'entero como string, sin grupos ni decimales');
        $res = "1{$g}234";
        $num = 1234;
        $this->o->prepararPresentacion($num,TIPO_ENTERO);
        $this->assertSame($res,$num, 'entero como numero entero, con 1 grupo');
        $res = "1{$g}234{$d}00";
        $num = 1234;
        $this->o->prepararPresentacion($num,TIPO_DECIMAL);
        $this->assertSame($res,$num, 'entero como numero decimal, con 1 grupo');
        $res = "1{$g}234{$d}57";
        $num = 1234.57;
        $this->o->prepararPresentacion($num,TIPO_DECIMAL);
        $this->assertSame($num,$res, 'decimal con grupo');
        
        $res = "1{$g}234{$d}567";
        $num = 1234.567;
        $this->o->prepararPresentacion($num,TIPO_DECIMAL, 3);
        $this->assertSame($num,$res, 'decimal con 3 decimales');
        $res = "0{$d}567";
        $num = .567;
        $this->o->prepararPresentacion($num,TIPO_DECIMAL, 3);
        $this->assertSame($num,$res, 'decimal sin parte entera');
        $res = "1{$g}567";
        $num = 1567;
        $this->o->prepararPresentacion($num,TIPO_DECIMAL, 0);
        $this->assertSame($num,$res, 'decimal con 0 decimales');
        $res = "1{$g}000";
        $num = 1E3;
        $this->o->prepararPresentacion($num,TIPO_DECIMAL, 0);
        $this->assertSame($num,$res, 'entero con exponente');
        // numeros con signo
        $res = "-1{$g}234{$d}00";
        $num = -1234;
        $this->o->prepararPresentacion($num,TIPO_DECIMAL);
        $this->assertSame($num,$res, 'numero negativo con un grupo');
        $res = "-1{$g}234{$d}56";
        $num = -1234.56;
        $this->o->prepararPresentacion($num,TIPO_DECIMAL);
        $this->assertSame($num,$res, 'numero negativo con un grupo y 2 decimales');
        $res = "-1{$g}234{$d}000";
        $num = -1234.0;
        $this->o->prepararPresentacion($num,TIPO_DECIMAL,3);
        $this->assertSame($num,$res, 'numero negativo con un grupo y 3 decimales');
        $res = "1{$g}234{$d}00";
        $num = +1234;
        $this->o->prepararPresentacion($num,TIPO_DECIMAL);
        $this->assertSame($num,$res, 'numero positivo con un grupo y sin decimales');

        $num = 0;
        $this->o->prepararPresentacion($num,TIPO_DECIMAL);
        $this->assertSame("0{$d}00", $num, 'numero 0 y sin decimales');
        $num = 0.0;
        $this->o->prepararPresentacion($num,TIPO_DECIMAL);
        $this->assertSame("0{$d}00", $num, 'numero 0 como double y sin decimales');
        $num = "0";
        $this->o->prepararPresentacion($num,TIPO_DECIMAL);
        $this->assertSame("0{$d}00", $num, 'numero 0 como string y sin decimales');
        $num = 0;
        $this->o->prepararPresentacion($num,TIPO_ENTERO);
        $this->assertSame("0", $num, 'numero 0 entero y sin decimales');
        $num = 0.0;
        $this->o->prepararPresentacion($num,TIPO_ENTERO);
        $this->assertSame("0", $num, 'numero 0 como double y sin decimales');

        $res = "abc";
        $num = $res;
        $this->o->prepararPresentacion($num,TIPO_CARACTER);
        $this->assertSame($num,$res, 'cadena sin comillas');
        $res = "ab'c";
        $num = $res;
        $this->o->prepararPresentacion($num,TIPO_CARACTER);
        $this->assertSame($num,$res, 'cadena con comillas');            
        $res = "";
        $num = $res;
        $this->o->prepararPresentacion($num,TIPO_CARACTER);
        $this->assertSame($num,$res, 'cadena vacia');           

                // arrays: prueba de algunos casos
                $datos = array(
                        array('edad'=>"1e5", 'importe'=>"1{$ng}234{$ng}567{$nd}8", 'nom'=>"abc", 'saldo'=>"-12", 'ffirma'=>new gvHidraTimestamp('1995-12-24'), 'nombre'=>"abc", ),
                        array('edad'=>"-1{$ng}234{$ng}567", 'importe'=>"1{$ng}234{$ng}567{$nd}89", 'nom'=>"a'bc", 'saldo'=>"+12", 'ffirma'=>"se asigna abajo!!!", 'nombre'=>"a'bc", ),
                        array('edad'=>"+1{$ng}234{$ng}567", 'importe'=>"0", 'nom'=>"", 'saldo'=>"", 'ffirma'=>new gvHidraTimestamp('1995-06-04'), 'factu'=>new gvHidraTimestamp('1995-12-24 18:34:56'), 'nombre'=>'a"bc', ),
                        array('edad'=>"", 'importe'=>0, 'nom'=>"", 'saldo'=>"", 'ffirma'=>'se asigna abajo!!!', 'factu'=>"se asigna abajo!!!", 'nombre'=>"a\\bc", ),
                        );
                $datos[1]['ffirma'] = $datos[0]['ffirma']->formatFW();
                $datos[3]['factu'] = $datos[2]['factu']->formatFW();
                $datos[3]['ffirma'] = $datos[2]['ffirma']->formatFW();
                $tipos = array('edad'=>array('tipo'=>TIPO_ENTERO),
                                                'importe'=>array('tipo'=>TIPO_DECIMAL, 'parteDecimal'=>2),
                                                'saldo'=>array('tipo'=>TIPO_ENTERO),
                                                'ffirma'=>array('tipo'=>TIPO_FECHA),
                                                'factu'=>array('tipo'=>TIPO_FECHAHORA),
                                                'nombre'=>array('tipo'=>TIPO_CARACTER),
                                );
                $valor = $datos;
        $this->o->prepararPresentacion($valor,$tipos);
        
        // cadenas
        $this->assertSame($valor[0]['nom'],'abc', 'cadena sin definir sin comillas (array)');
        $this->assertSame($valor[1]['nom'],"a'bc", 'cadena sin cefinir con comillas (array)');
        $this->assertSame($valor[0]['nombre'],'abc', 'cadena sin comillas (array)');
        $this->assertSame($valor[1]['nombre'],"a'bc", 'cadena con comillas (array)');
        $this->assertSame($valor[3]['nom'],"", 'cadena vacia (array)');
                
                // numeros
        $this->assertSame($valor[0]['importe'],"1{$g}234{$g}567{$d}80", 'numero con grupos y decimales (array)');
        $this->assertSame($valor[0]['saldo'],"-12", 'numero entero negativo (array)');
        $this->assertSame($valor[0]['edad'],"100{$g}000", 'numero con grupos, exp y sin decimales (array)');

                // fechas
                // fecha en negocio como obj
                $this->assertSame($valor[0]['ffirma'], $datos[0]['ffirma']->formatUser(), "obj1-fecha sin hora (array)");
                $this->assertSame($valor[2]['factu'], $datos[2]['factu']->formatUser(), "obj2-fecha con hora (array)");
                $this->assertSame($valor[2]['ffirma'], $datos[2]['ffirma']->formatUser(), "obj3-fecha sin hora con dia y mes menor de 10 (array)");

                // fecha en negocio como string
                $this->assertSame($valor[1]['ffirma'], $datos[0]['ffirma']->formatUser(), "st1-fecha sin hora en string (array)");
                $this->assertSame($valor[3]['factu'], $datos[2]['factu']->formatUser(), "st2-fecha con hora en string (array)");
                $this->assertSame($valor[3]['ffirma'], $datos[2]['ffirma']->formatUser(), "st3-fecha sin hora con dia y mes menor de 10 (array)");
    }
testReset ( )
Tareas pendientes:
Implement testReset().

Definición en la línea 41 del archivo IgepComunicaUsuarioTest.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 221 del archivo IgepComunicaUsuarioTest.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 131 del archivo IgepComunicaUsuarioTest.php.

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

Definición en la línea 61 del archivo IgepComunicaUsuarioTest.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 251 del archivo IgepComunicaUsuarioTest.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 51 del archivo IgepComunicaUsuarioTest.php.

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

Definición en la línea 271 del archivo IgepComunicaUsuarioTest.php.

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

Definición en la línea 151 del archivo IgepComunicaUsuarioTest.php.

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

Definición en la línea 141 del archivo IgepComunicaUsuarioTest.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 191 del archivo IgepComunicaUsuarioTest.php.

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

Definición en la línea 161 del archivo IgepComunicaUsuarioTest.php.

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

Documentación de los campos

$object [protected]

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


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