2
0
forked from Wavyzz/dolibarr

FIX test/phpunit: add $name to __construct()

Fix the following errors when running recent phpunit:

    Message:  Too few arguments to function PHPUnit\Framework\TestCase::__construct(), 0 passed in
    dolibarr/test/phpunit/DateLibTzFranceTest.php on line 63 and exactly
    1 expected Location: phar:///usr/share/webapps/bin/phpunit.phar/phpunit/Framework/TestCase.php:265

Indeed, the old constructor had an optional $name='' parameter but the
new constructor reads like this:

    public function __construct(string $name)

and the parameter is now mandatory.
This commit is contained in:
Alexandre Janniaux
2023-05-07 14:31:35 +02:00
parent 5a3d271829
commit df0adc391d
85 changed files with 253 additions and 170 deletions

View File

@@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2010-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2023 Alexandre Janniaux <alexandre.janniaux@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -88,9 +89,9 @@ class FunctionsLibTest extends PHPUnit\Framework\TestCase
*
* @return CoreTest
*/
public function __construct()
public function __construct($name = '')
{
parent::__construct();
parent::__construct($name);
//$this->sharedFixture
global $conf,$user,$langs,$db,$mysoc;