![]() |
Documentación GVHIDRA 3.1.5
|
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 |
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.
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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.' ); }
$object [protected] |
Definición en la línea 14 del archivo IgepComunicaUsuarioTest.php.