aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Wells <brucekwells@gmail.com>2023-03-21 18:10:06 +0300
committerGitHub <noreply@github.com>2023-03-21 18:10:06 +0300
commit1b8d71d953d2ad9c9eb97d1fed9fe4ed4f8e83d3 (patch)
tree8d3ee58521931c7e35bcf56547c55c7f12b97eff
parent1d41ca6da294dbfda701f90833943fd87bff5d96 (diff)
Php unit10 (#124)
* Static PHPUnit providers * Limit PHP upgrades till new PHP version is tested * Upgrade PHPUnit config schema
-rw-r--r--.gitignore1
-rw-r--r--composer.json2
-rw-r--r--phpunit.xml.dist30
-rw-r--r--tests/MathTest.php8
4 files changed, 18 insertions, 23 deletions
diff --git a/.gitignore b/.gitignore
index 9aedff4..1054073 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
vendor/
.idea/
composer.lock
+.phpunit.cache
.phpunit.result.cache
.vscode
.php-cs-fixer.cache
diff --git a/composer.json b/composer.json
index a0dee1f..745e3d5 100644
--- a/composer.json
+++ b/composer.json
@@ -28,7 +28,7 @@
},
"require": {
- "php": ">=8.0"
+ "php": ">=8.0 <8.3"
},
"require-dev": {
"phpunit/phpunit": ">=9.0",
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index f591521..56bd7e0 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -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>
diff --git a/tests/MathTest.php b/tests/MathTest.php
index f8573d3..573b634 100644
--- a/tests/MathTest.php
+++ b/tests/MathTest.php
@@ -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)],