PHPUNIT : adapt 12.3
This commit is contained in:
parent
9ebb89b38a
commit
8dca7f0866
32 changed files with 123 additions and 345 deletions
|
|
@ -27,6 +27,8 @@ use PHPUnit\Framework\TestCase;
|
|||
*/
|
||||
require DIRTEST . '/global.php';
|
||||
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
|
||||
/**
|
||||
* @backupGlobals disabled
|
||||
*/
|
||||
|
|
@ -251,10 +253,10 @@ class DocumentTest extends TestCase {
|
|||
$document->d_id = $d_id;
|
||||
$document->get();
|
||||
}
|
||||
return $document;
|
||||
return $document;
|
||||
}
|
||||
|
||||
function dataReplace() {
|
||||
static function dataReplace() {
|
||||
return array(
|
||||
["CUST_NAME", "Client 2"],
|
||||
["SOLDE", 27.29],
|
||||
|
|
@ -270,6 +272,7 @@ class DocumentTest extends TestCase {
|
|||
* @backupGlobals enabled
|
||||
* @dataProvider dataReplace
|
||||
*/
|
||||
#[DataProvider('dataReplace')]
|
||||
function testReplace2($tag_name, $value) {
|
||||
require "global.php";
|
||||
static $request = null;
|
||||
|
|
@ -288,7 +291,7 @@ class DocumentTest extends TestCase {
|
|||
$this->assertEquals($name, $value, $tag_name." fails");
|
||||
}
|
||||
|
||||
function dataBalance()
|
||||
static function dataBalance()
|
||||
{
|
||||
return array(
|
||||
['CLIENT1',27.29, 4204.14],
|
||||
|
|
@ -301,6 +304,7 @@ class DocumentTest extends TestCase {
|
|||
|
||||
* @dataProvider dataBalance
|
||||
*/
|
||||
#[DataProvider('dataBalance')]
|
||||
function testBalance($quickcode,$balance_report,$balance_noreport)
|
||||
{
|
||||
require "global.php";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue