mirror of
https://github.com/rmontanana/inventario2.git
synced 2025-08-18 00:45:58 +00:00
Primera aproximación para realizar los tests con phpunit
Configuración cambiada totalmente para optimizar el código y prepararlo para los tests. Quitada la clave APLICACION del fichero de configuración y de las clases que lo utilizaban (Aportacontenido, InformePDF y PDF_mysql_table) Creados los esqueletos de test para: Configuración, Menu y Sql Casi terminado el conjunto de pruebas de Configuración. Pendiente en @todo
This commit is contained in:
201
tests/SqlTest.php
Normal file
201
tests/SqlTest.php
Normal file
@@ -0,0 +1,201 @@
|
||||
<?php
|
||||
require_once('inc/configuracion.inc');
|
||||
require_once('Sql.php');
|
||||
/**
|
||||
* Generated by PHPUnit_SkeletonGenerator 1.2.1 on 2014-03-08 at 01:19:34.
|
||||
*/
|
||||
class SqlTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var Sql
|
||||
*/
|
||||
protected $bd;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
* @covers Sql::__construct
|
||||
* @uses Sql
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$this->bd = new Sql(SERVIDOR, USUARIO, CLAVE, BASEDATOSTEST);
|
||||
$this->assertFalse($this->bd->error(),"No se ha conectado a la base de datos de pruebas [".BASEDATOSTEST."]");
|
||||
}
|
||||
|
||||
/**
|
||||
* Tears down the fixture, for example, closes a network connection.
|
||||
* This method is called after a test is executed.
|
||||
*/
|
||||
protected function tearDown()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Sql::__destruct
|
||||
* @todo Implement test__destruct().
|
||||
*/
|
||||
public function test__destruct()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Sql::filtra
|
||||
* @todo Implement testFiltra().
|
||||
*/
|
||||
public function testFiltra()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Sql::ejecuta
|
||||
* @todo Implement testEjecuta().
|
||||
*/
|
||||
public function testEjecuta()
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Sql::procesaResultado
|
||||
* @todo Implement testProcesaResultado().
|
||||
*/
|
||||
public function testProcesaResultado()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Sql::camposResultado
|
||||
* @todo Implement testCamposResultado().
|
||||
*/
|
||||
public function testCamposResultado()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Sql::numeroTuplas
|
||||
* @todo Implement testNumeroTuplas().
|
||||
*/
|
||||
public function testNumeroTuplas()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Sql::error
|
||||
* @todo Implement testError().
|
||||
*/
|
||||
public function testError()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Sql::mensajeError
|
||||
* @todo Implement testMensajeError().
|
||||
*/
|
||||
public function testMensajeError()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Sql::estructura
|
||||
* @todo Implement testEstructura().
|
||||
*/
|
||||
public function testEstructura()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Sql::ultimoId
|
||||
* @todo Implement testUltimoId().
|
||||
*/
|
||||
public function testUltimoId()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Sql::obtieneManejador
|
||||
* @todo Implement testObtieneManejador().
|
||||
*/
|
||||
public function testObtieneManejador()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Sql::comienzaTransaccion
|
||||
* @todo Implement testComienzaTransaccion().
|
||||
*/
|
||||
public function testComienzaTransaccion()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Sql::abortaTransaccion
|
||||
* @todo Implement testAbortaTransaccion().
|
||||
*/
|
||||
public function testAbortaTransaccion()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Sql::confirmaTransaccion
|
||||
* @todo Implement testConfirmaTransaccion().
|
||||
*/
|
||||
public function testConfirmaTransaccion()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete(
|
||||
'This test has not been implemented yet.'
|
||||
);
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user