-
Notifications
You must be signed in to change notification settings - Fork 539
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes failing tests; reorganized test files (PHPUnit 10.x related) (#583
) * Fixes failing tests; reorganized test files (PHPUnit 10.x related) Since version 10, PHPUnit complains about: 1) Your XML configuration validates against a deprecated schema. Migrate your XML configuration using "--migrate-configuration"! 2) Class AltAutoloadTest cannot be found in D:\a\pdfparser\pdfparser\tests\AltAutoloadTest.php 3) Class Tests\Smalot\PdfParser\Performance\Test\AbstractPerformanceTest cannot be found in D:\a\pdfparser\pdfparser\tests\Performance\Test\AbstractPerformanceTest.php 4) Class Tests\Smalot\PdfParser\Performance\Test\DocumentDictionaryCacheTest cannot be found in D:\a\pdfparser\pdfparser\tests\Performance\Test\DocumentDictionaryCacheTest.php The first one is easy to solve. But the other 3 are confusing, because PHPUnit 9 did not complain at all. Reason for these warnings is that since PHPUnit v10, it doesn't like abstract Test classes or files (containing Test in the name), which contain no class at all. Source: sebastianbergmann/phpunit#4979 To mitigate these warnings and to make maintenance easier in the future, I reorganized our test files and put them in different folders. PHPUnit tests are separated from our other tests. * fixed alt autoloading * reverted name change for AbstractPerformanceTest * migrated Windows-related PHPUnit config file * dev-tools: restrict PHPUnit version in composer.json * Update dev-tools/composer.json Co-authored-by: Jérémy Benoist <[email protected]> --------- Co-authored-by: Jérémy Benoist <[email protected]>
- Loading branch information
Showing
38 changed files
with
104 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,5 @@ | |
debug* | ||
composer.lock | ||
/.php-cs-fixer.cache | ||
/.phpunit.cache | ||
/.phpunit.result.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- Only use this when running in Windows environment! --> | ||
|
||
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html --> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.1/phpunit.xsd" | ||
backupGlobals="false" | ||
backupStaticAttributes="false" | ||
bootstrap="vendor\autoload.php" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false" | ||
verbose="true" | ||
> | ||
<php> | ||
<ini name="error_reporting" value="-1" /> | ||
<ini name="zend.enable_gc" value="0"/> | ||
<ini name="error_reporting" value="-1"/> | ||
<ini name="intl.error_level" value="0"/> | ||
<ini name="display_errors" value="On"/> | ||
</php> | ||
|
||
<testsuites> | ||
<testsuite name="all"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
<whitelist> | ||
<directory>src</directory> | ||
</whitelist> | ||
</filter> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" backupGlobals="false" bootstrap="vendor\autoload.php" colors="true" processIsolation="false" stopOnFailure="false" cacheDirectory=".phpunit.cache" backupStaticProperties="false"> | ||
<coverage> | ||
<include> | ||
<directory>src</directory> | ||
</include> | ||
</coverage> | ||
<php> | ||
<ini name="error_reporting" value="-1"/> | ||
<ini name="zend.enable_gc" value="0"/> | ||
<ini name="error_reporting" value="-1"/> | ||
<ini name="intl.error_level" value="0"/> | ||
<ini name="display_errors" value="On"/> | ||
</php> | ||
<testsuites> | ||
<testsuite name="all"> | ||
<directory>tests/PHPUnit</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html --> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.1/phpunit.xsd" | ||
backupGlobals="false" | ||
backupStaticAttributes="false" | ||
bootstrap="vendor/autoload.php" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false" | ||
verbose="true" | ||
> | ||
<php> | ||
<ini name="error_reporting" value="-1" /> | ||
<ini name="zend.enable_gc" value="0"/> | ||
<ini name="error_reporting" value="-1"/> | ||
<ini name="intl.error_level" value="0"/> | ||
<ini name="display_errors" value="On"/> | ||
</php> | ||
|
||
<testsuites> | ||
<testsuite name="all"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
<whitelist> | ||
<directory>src</directory> | ||
</whitelist> | ||
</filter> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" cacheDirectory=".phpunit.cache" backupStaticProperties="false"> | ||
<coverage> | ||
<include> | ||
<directory>src</directory> | ||
</include> | ||
</coverage> | ||
<php> | ||
<ini name="error_reporting" value="-1"/> | ||
<ini name="zend.enable_gc" value="0"/> | ||
<ini name="error_reporting" value="-1"/> | ||
<ini name="intl.error_level" value="0"/> | ||
<ini name="display_errors" value="On"/> | ||
</php> | ||
<testsuites> | ||
<testsuite name="all"> | ||
<directory>tests/PHPUnit</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.