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:
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* 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
|
||||
@@ -89,9 +90,9 @@ class ScriptsTest extends PHPUnit\Framework\TestCase
|
||||
*
|
||||
* @return ScriptsTest
|
||||
*/
|
||||
public function __construct()
|
||||
public function __construct($name = '')
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct($name);
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
|
||||
Reference in New Issue
Block a user