Last active
October 13, 2015 03:57
-
-
Save ferminhg/4135322 to your computer and use it in GitHub Desktop.
PHP-Unit: Fichero Base Clase PHP-Unit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Clase para PHP-UNIT que carga el document_root por parametros para | |
* carga de librerias como esta desarollado en marcadores. | |
*/ | |
if(isset($_SERVER['argv'][2])) { | |
if(!is_dir($_SERVER['argv'][2])) { | |
echo("El DocumentRoot especificado no existe o no es correcto."); | |
exit; | |
} | |
$_SERVER['DOCUMENT_ROOT'] = $_SERVER['argv'][2]; | |
} | |
require_once ($_SERVER['DOCUMENT_ROOT'].'/path/to/classdao.php'); | |
class NameDaoTest extends PHPUnit_Framework_TestCase | |
{ | |
protected $test; | |
protected function setUp() | |
{ | |
// Inicializacion de variables si hiciese falta | |
} | |
public function testname() | |
{ | |
// assertions | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment