![]() |
Documentación GVHIDRA 3.1.5
|
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.
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.
{ return IgepComunicaUsuario::prepararPresentacion($fecha,$tipo); }
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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 | ( | ) |
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'); }
$object [protected] |
Definición en la línea 14 del archivo IgepComunicacionTest.php.