altocompta/unit-test/include/class/dossier.Test.php
2021-12-24 12:12:36 +01:00

62 lines
1.4 KiB
PHP

<?php
use PHPUnit\Framework\TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-02-11 at 15:39:21.
* @coversDefaultClass \Dossier
* @backupGlobals enable
*/
class DossierTest extends TestCase
{
/**
* @var Dossier
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp():void
{
require_once 'global.php';
$this->object=new Dossier(DOSSIER);
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown():void
{
}
/**
* @covers Dossier::synchro_admin
*/
public function testSynchro_admin()
{
Dossier::synchro_admin(DOSSIER);
// nothing to test
$this->assertTrue(true);
}
/**
* @testdox Test Dossier::id()
* @covers ::id
*/
public function testID()
{
$this->assertEquals(DOSSIER,Dossier::id(),"Id() doesn't work");
}
/**
* @testdox Load
*/
public function testLoad()
{
global $g_connection;
$obj=new Dossier(DOSSIER);
$obj->load();
$this->assertEquals(DOSSIER,$obj->get_parameter("id"),"Not the right folder");
}
}