ClsPmieducarServidorTest.class.php
994 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
* ClsPmieducarServidorTest class.
*
* @author Eriksen Costa <eriksen.paixao_bs@cobra.com.br>
* @version $Id$
*/
require_once realpath(dirname(__FILE__) . '/../') . '/UnitBaseTest.class.php';
require_once 'include/pmieducar/clsPmieducarServidor.inc.php';
class ClsPmieducarServidorTest extends UnitBaseTest {
private
$codServidor = NULL,
$codInstituicao = NULL;
protected function setUp() {
$db = new clsBanco();
$sql = 'SELECT cod_servidor, ref_cod_instituicao FROM pmieducar.servidor WHERE ativo = 1 LIMIT 1';
$db->Consulta($sql);
$db->ProximoRegistro();
list($this->codServidor, $this->codInstituicao) = $db->Tupla();
}
public function testPmieducarServidorExists() {
$codServidor = $this->codServidor;
$codInstituicao = $this->codInstituicao;
$servidor = new clsPmieducarServidor(
$codServidor, NULL, NULL, NULL, NULL, NULL, 1, $codInstituicao);
$this->assertTrue((boolean) $servidor->existe());
}
}