N°3091 Update PHPUnit to 8.5 : composer and base files

Autoload wasn't working anymore, easy to see : just launch `php unittestautoload.php` (or see fatal errors when launching tests with your IDE)
This commit is contained in:
Pierre Goiffon
2022-04-21 10:36:26 +02:00
parent b9ddadeb44
commit cb39541e2a
5 changed files with 709 additions and 428 deletions

View File

@@ -1,10 +1,10 @@
{
"require": {
"phpunit/phpunit": "^6"
},
"autoload": {
"psr-4": { "": "src/" }
"require-dev": {
"phpunit/phpunit": "^8.5.23"
},
"autoload": {
"psr-4": {
"": "src/"
}
}
}

994
test/composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,44 +1,26 @@
<!-- Copyright (c) 2010-2017 Combodo SARL -->
<!-- -->
<!-- This file is part of iTop. -->
<!-- -->
<!-- iTop is free software; you can redistribute it and/or modify -->
<!-- it under the terms of the GNU Affero General Public License as published by -->
<!-- the Free Software Foundation, either version 3 of the License, or -->
<!-- (at your option) any later version. -->
<!-- -->
<!-- iTop is distributed in the hope that it will be useful, -->
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
<!-- GNU Affero General Public License for more details. -->
<!-- -->
<!-- You should have received a copy of the GNU Affero General Public License -->
<!-- along with iTop. If not, see <http://www.gnu.org/licenses/> -->
<!-- -->
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.5/phpunit.xsd"
bootstrap="unittestautoload.php"
backupGlobals="true"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnRisky="false"
stopOnSkipped="false"
verbose="true"
>
<phpunit bootstrap="unittestautoload.php"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.3/phpunit.xsd"
backupGlobals="true"
backupStaticAttributes="false"
cacheTokens="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="false"
mapTestClassNameToCoveredClassName="false"
printerClass="\PHPUnit\TextUI\ResultPrinter"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
stopOnRisky="false"
timeoutForSmallTests="1"
timeoutForMediumTests="10"
timeoutForLargeTests="60"
verbose="false">
<php>
<ini name="display_errors" value="true"/>
<ini name="error_reporting" value="true"/>
</php>
<testsuites>
<testsuite name="Application">

View File

@@ -1,44 +1,21 @@
<!-- Copyright (c) 2010-2017 Combodo SARL -->
<!-- -->
<!-- This file is part of iTop. -->
<!-- -->
<!-- iTop is free software; you can redistribute it and/or modify -->
<!-- it under the terms of the GNU Affero General Public License as published by -->
<!-- the Free Software Foundation, either version 3 of the License, or -->
<!-- (at your option) any later version. -->
<!-- -->
<!-- iTop is distributed in the hope that it will be useful, -->
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
<!-- GNU Affero General Public License for more details. -->
<!-- -->
<!-- You should have received a copy of the GNU Affero General Public License -->
<!-- along with iTop. If not, see <http://www.gnu.org/licenses/> -->
<!-- -->
<phpunit bootstrap="unittestautoload.php"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.3/phpunit.xsd"
backupGlobals="true"
backupStaticAttributes="false"
cacheTokens="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="false"
mapTestClassNameToCoveredClassName="false"
printerClass="\PHPUnit\TextUI\ResultPrinter"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
stopOnRisky="false"
timeoutForSmallTests="1"
timeoutForMediumTests="10"
timeoutForLargeTests="60"
verbose="false">
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.5/phpunit.xsd"
bootstrap="unittestautoload.php"
backupGlobals="true"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnRisky="false"
stopOnSkipped="false"
verbose="true"
>
<testsuites>
<testsuite name="PostBuildIntegration">

View File

@@ -1,7 +1,5 @@
<?php
include('./vendor/autoload.php');
@include_once('ItopTestCase.php');
@include_once('ItopDataTestCase.php');
@include_once('./vendor/autoload.php');
include('ItopTestCase.php');
include('ItopDataTestCase.php');