78 lines
2 KiB
PHP
78 lines
2 KiB
PHP
<?php
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
/**
|
|
* Generated by PHPUnit_SkeletonGenerator on 2014-10-31 at 20:33:22.
|
|
*/
|
|
class Acc_BalanceTest extends TestCase
|
|
{
|
|
|
|
/**
|
|
* @var Acc_Balance
|
|
*/
|
|
protected $object;
|
|
|
|
/**
|
|
* Sets up the fixture, for example, opens a network connection.
|
|
* This method is called before a test is executed.
|
|
*/
|
|
protected function setUp()
|
|
{
|
|
global $g_connection, $g_parameter,$g_user;
|
|
$_REQUEST['gDossier']=DOSSIER;
|
|
$g_connection=new Database(DOSSIER);
|
|
$g_parameter=new Noalyss_Parameter_Folder($g_connection);
|
|
$this->object=new Acc_Balance($g_connection);
|
|
|
|
|
|
}
|
|
|
|
/**
|
|
* Tears down the fixture, for example, closes a network connection.
|
|
* This method is called after a test is executed.
|
|
*/
|
|
protected function tearDown()
|
|
{
|
|
|
|
}
|
|
|
|
/**
|
|
* @covers Acc_Balance::get_row
|
|
* @todo Implement testGet_row().
|
|
*/
|
|
public function testGet_row()
|
|
{
|
|
global $g_connection,$g_user;
|
|
$g_user=new User($g_connection,1);
|
|
|
|
$max=$g_connection->get_value("select max(p_id) from parm_periode");
|
|
$min=$g_connection->get_value("select min(p_id) from parm_periode");
|
|
$this->object->get_row($min,$max);
|
|
}
|
|
|
|
/**
|
|
* @covers Acc_Balance::filter_cat
|
|
* @todo Implement testFilter_cat().
|
|
*/
|
|
public function testFilter_cat()
|
|
{
|
|
$this->object->jrn=1;
|
|
$this->object->filter_cat(array());
|
|
$this->assertEquals($this->object->jrn,null);
|
|
$this->object->filter_cat(array('FIN'));
|
|
$this->assertEquals($this->object->jrn[0],2);
|
|
}
|
|
|
|
/**
|
|
* @covers Acc_Balance::test_me
|
|
* @todo Implement testTest_me().
|
|
*/
|
|
public function testTest_me()
|
|
{
|
|
// Remove the following lines when you implement this test.
|
|
$this->markTestIncomplete(
|
|
'This test has not been implemented yet.'
|
|
);
|
|
}
|
|
|
|
}
|