Php unit10 (#124)

* Static PHPUnit providers
* Limit PHP upgrades till new PHP version is tested
* Upgrade PHPUnit config schema
This commit is contained in:
Bruce Wells 2023-03-21 10:10:06 -05:00 committed by GitHub
parent 1d41ca6da2
commit 1b8d71d953
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 23 deletions

1
.gitignore vendored
View file

@ -1,6 +1,7 @@
vendor/
.idea/
composer.lock
.phpunit.cache
.phpunit.result.cache
.vscode
.php-cs-fixer.cache

View file

@ -28,7 +28,7 @@
},
"require": {
"php": ">=8.0"
"php": ">=8.0 <8.3"
},
"require-dev": {
"phpunit/phpunit": ">=9.0",

View file

@ -1,20 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
convertDeprecationsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
bootstrap="./tests/bootstrap.php"
>
<testsuites>
<testsuite name="Math Executor tests">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupGlobals="false"
colors="true"
processIsolation="false"
stopOnFailure="false"
bootstrap="./tests/bootstrap.php"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd">
<testsuites>
<testsuite name="Math Executor tests">
<directory>./tests/</directory>
</testsuite>
</testsuites>
</phpunit>

View file

@ -51,7 +51,7 @@ class MathTest extends TestCase
*
* @return array<array<string>>
*/
public function providerExpressions()
public static function providerExpressions()
{
return [
['-5'],
@ -295,7 +295,7 @@ class MathTest extends TestCase
*
* @return array<array<string>>
*/
public function bcMathExpressions()
public static function bcMathExpressions()
{
return [
['-5'],
@ -518,7 +518,7 @@ class MathTest extends TestCase
*
* @return array<array<string>>
*/
public function incorrectExpressions()
public static function incorrectExpressions()
{
return [
['1 * + '],
@ -1091,7 +1091,7 @@ class MathTest extends TestCase
*
* @return array<array<mixed>>
*/
public function providerExpressionValues()
public static function providerExpressionValues()
{
return [
['arccos(0.5)', \acos(0.5)],