From 24b861eb667f09c0f359df33f809c5cbb0dfa0ca Mon Sep 17 00:00:00 2001 From: Sysix Date: Sat, 25 Nov 2023 21:57:39 +0100 Subject: [PATCH] test fix after merge --- .gitignore | 121 ++++- composer.json | 4 +- composer.lock | 587 +++++++++-------------- phpunit.xml | 43 +- tests/ApiTest.php | 24 +- tests/Clients/ContactTest.php | 14 +- tests/Clients/CountryTest.php | 4 +- tests/Clients/CreditNoteTest.php | 38 +- tests/Clients/DownPaymentInvoiceTest.php | 51 +- tests/Clients/EventTest.php | 11 +- tests/Clients/FileTest.php | 24 +- tests/Clients/InvoiceTest.php | 41 +- tests/Clients/OrderConfirmationTest.php | 41 +- tests/Clients/PaymentConditionTest.php | 4 +- tests/Clients/PaymentTest.php | 4 +- tests/Clients/PostingCategoryTest.php | 4 +- tests/Clients/ProfileTest.php | 3 +- tests/Clients/QuotationTest.php | 41 +- tests/Clients/RecurringTemplateTest.php | 6 +- tests/Clients/VoucherListTest.php | 3 +- tests/Clients/VoucherTest.php | 14 +- tests/PaginationClientTest.php | 12 +- tests/TestClient.php | 40 +- 23 files changed, 438 insertions(+), 696 deletions(-) diff --git a/.gitignore b/.gitignore index 8c28fd0..666c262 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,7 @@ +/cache/ -/tests/cache/ -.phpunit.cache/ -# Created by https://www.gitignore.io/api/macos,composer,phpstorm -# Edit at https://www.gitignore.io/?templates=macos,composer,phpstorm +# Created by https://www.toptal.com/developers/gitignore/api/windows,macos,linux,composer,phpunit,phpstorm+all,visualstudiocode +# Edit at https://www.toptal.com/developers/gitignore?templates=windows,macos,linux,composer,phpunit,phpstorm+all,visualstudiocode ### Composer ### composer.phar @@ -12,6 +11,21 @@ composer.phar # You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file # composer.lock +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + ### macOS ### # General .DS_Store @@ -21,6 +35,7 @@ composer.phar # Icon must end with two \r Icon + # Thumbnails ._* @@ -40,8 +55,12 @@ Network Trash Folder Temporary Items .apdisk -### PhpStorm ### -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +### macOS Patch ### +# iCloud generated files +*.icloud + +### PhpStorm+all ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 # User-specific stuff @@ -51,6 +70,9 @@ Temporary Items .idea/**/dictionaries .idea/**/shelf +# AWS User-specific +.idea/**/aws.xml + # Generated files .idea/**/contentModel.xml @@ -71,6 +93,9 @@ Temporary Items # When using Gradle or Maven with auto-import, you should exclude module files, # since they will be recreated, and may cause churn. Uncomment if using # auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml # .idea/modules.xml # .idea/*.iml # .idea/modules @@ -98,6 +123,9 @@ atlassian-ide-plugin.xml # Cursive Clojure plugin .idea/replstate.xml +# SonarLint plugin +.idea/sonarlint/ + # Crashlytics plugin (for Android Studio and IntelliJ) com_crashlytics_export_strings.xml crashlytics.properties @@ -110,22 +138,73 @@ fabric.properties # Android studio 3.1+ serialized cache file .idea/caches/build_file_checksums.ser -### PhpStorm Patch ### -# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 - -# *.iml -# modules.xml -# .idea/misc.xml -# *.ipr +### PhpStorm+all Patch ### +# Ignore everything but code style settings and run configurations +# that are supposed to be shared within teams. -# Sonarlint plugin -.idea/**/sonarlint/ +.idea/* -# SonarQube Plugin -.idea/**/sonarIssues.xml +!.idea/codeStyles +!.idea/runConfigurations -# Markdown Navigator plugin -.idea/**/markdown-navigator.xml -.idea/**/markdown-navigator/ +### PHPUnit ### +# Covers PHPUnit +# Reference: https://phpunit.de/ -# End of https://www.gitignore.io/api/macos,composer,phpstorm +# Generated files +.phpunit.result.cache +.phpunit.cache + +# PHPUnit +/app/phpunit.xml +/phpunit.xml + +# Build data +/build/ + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history +.ionide + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# End of https://www.toptal.com/developers/gitignore/api/windows,macos,linux,composer,phpunit,phpstorm+all,visualstudiocode diff --git a/composer.json b/composer.json index 82c47d8..e46b873 100644 --- a/composer.json +++ b/composer.json @@ -20,8 +20,8 @@ "guzzlehttp/guzzle": "^6.2 | ^7.0" }, "require-dev": { - "phpunit/phpunit": "^9.0", - "phpstan/phpstan": "^1.10" + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.4" }, "suggest": { "kevinrob/guzzle-cache-middleware": "*" diff --git a/composer.lock b/composer.lock index ed82891..fa622cb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8d09f9db68a84de1f3d508b1301f243b", + "content-hash": "a42c7df46aebdc60ea2f2bb9d5136182", "packages": [ { "name": "guzzlehttp/guzzle", @@ -604,76 +604,6 @@ } ], "packages-dev": [ - { - "name": "doctrine/instantiator", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "require-dev": { - "doctrine/coding-standard": "^11", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^1.2", - "phpstan/phpstan": "^1.9.4", - "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^9.5.27", - "vimeo/psalm": "^5.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/2.0.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2022-12-30T00:23:10+00:00" - }, { "name": "myclabs/deep-copy", "version": "1.11.1", @@ -964,16 +894,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.29", + "version": "10.1.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76" + "reference": "a56a9ab2f680246adcf3db43f38ddf1765774735" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/a56a9ab2f680246adcf3db43f38ddf1765774735", + "reference": "a56a9ab2f680246adcf3db43f38ddf1765774735", "shasum": "" }, "require": { @@ -981,18 +911,18 @@ "ext-libxml": "*", "ext-xmlwriter": "*", "nikic/php-parser": "^4.15", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", + "php": ">=8.1", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-text-template": "^3.0", + "sebastian/code-unit-reverse-lookup": "^3.0", + "sebastian/complexity": "^3.0", + "sebastian/environment": "^6.0", + "sebastian/lines-of-code": "^2.0", + "sebastian/version": "^4.0", "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.1" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -1001,7 +931,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "10.1-dev" } }, "autoload": { @@ -1030,7 +960,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.29" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.9" }, "funding": [ { @@ -1038,32 +968,32 @@ "type": "github" } ], - "time": "2023-09-19T04:57:46+00:00" + "time": "2023-11-23T12:23:20+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.6", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c", + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1090,7 +1020,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0" }, "funding": [ { @@ -1098,28 +1029,28 @@ "type": "github" } ], - "time": "2021-12-02T12:48:52+00:00" + "time": "2023-08-31T06:24:48+00:00" }, { "name": "phpunit/php-invoker", - "version": "3.1.1", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-pcntl": "*" @@ -1127,7 +1058,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1153,7 +1084,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" }, "funding": [ { @@ -1161,32 +1092,32 @@ "type": "github" } ], - "time": "2020-09-28T05:58:55+00:00" + "time": "2023-02-03T06:56:09+00:00" }, { "name": "phpunit/php-text-template", - "version": "2.0.4", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -1212,7 +1143,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1" }, "funding": [ { @@ -1220,32 +1152,32 @@ "type": "github" } ], - "time": "2020-10-26T05:33:50+00:00" + "time": "2023-08-31T14:07:24+00:00" }, { "name": "phpunit/php-timer", - "version": "5.0.3", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1271,7 +1203,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" }, "funding": [ { @@ -1279,24 +1211,23 @@ "type": "github" } ], - "time": "2020-10-26T13:16:10+00:00" + "time": "2023-02-03T06:57:52+00:00" }, { "name": "phpunit/phpunit", - "version": "9.6.13", + "version": "10.4.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be" + "reference": "cacd8b9dd224efa8eb28beb69004126c7ca1a1a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f3d767f7f9e191eab4189abe41ab37797e30b1be", - "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/cacd8b9dd224efa8eb28beb69004126c7ca1a1a1", + "reference": "cacd8b9dd224efa8eb28beb69004126c7ca1a1a1", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -1306,27 +1237,26 @@ "myclabs/deep-copy": "^1.10.1", "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.28", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.5", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.2", - "sebastian/version": "^3.0.2" + "php": ">=8.1", + "phpunit/php-code-coverage": "^10.1.5", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-invoker": "^4.0", + "phpunit/php-text-template": "^3.0", + "phpunit/php-timer": "^6.0", + "sebastian/cli-parser": "^2.0", + "sebastian/code-unit": "^2.0", + "sebastian/comparator": "^5.0", + "sebastian/diff": "^5.0", + "sebastian/environment": "^6.0", + "sebastian/exporter": "^5.1", + "sebastian/global-state": "^6.0.1", + "sebastian/object-enumerator": "^5.0", + "sebastian/recursion-context": "^5.0", + "sebastian/type": "^4.0", + "sebastian/version": "^4.0" }, "suggest": { - "ext-soap": "To be able to generate mocks based on WSDL files", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + "ext-soap": "To be able to generate mocks based on WSDL files" }, "bin": [ "phpunit" @@ -1334,7 +1264,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.6-dev" + "dev-main": "10.4-dev" } }, "autoload": { @@ -1366,7 +1296,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.13" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.4.2" }, "funding": [ { @@ -1382,32 +1312,32 @@ "type": "tidelift" } ], - "time": "2023-09-19T05:39:22+00:00" + "time": "2023-10-26T07:21:45+00:00" }, { "name": "sebastian/cli-parser", - "version": "1.0.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/efdc130dbbbb8ef0b545a994fd811725c5282cae", + "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -1430,7 +1360,7 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.0" }, "funding": [ { @@ -1438,32 +1368,32 @@ "type": "github" } ], - "time": "2020-09-28T06:08:49+00:00" + "time": "2023-02-03T06:58:15+00:00" }, { "name": "sebastian/code-unit", - "version": "1.0.8", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -1486,7 +1416,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" }, "funding": [ { @@ -1494,32 +1424,32 @@ "type": "github" } ], - "time": "2020-10-26T13:08:54+00:00" + "time": "2023-02-03T06:58:43+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -1541,7 +1471,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" }, "funding": [ { @@ -1549,34 +1479,36 @@ "type": "github" } ], - "time": "2020-09-28T05:30:19+00:00" + "time": "2023-02-03T06:59:15+00:00" }, { "name": "sebastian/comparator", - "version": "4.0.8", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + "reference": "2db5010a484d53ebf536087a70b4a5423c102372" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2db5010a484d53ebf536087a70b4a5423c102372", + "reference": "2db5010a484d53ebf536087a70b4a5423c102372", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/diff": "^5.0", + "sebastian/exporter": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -1615,7 +1547,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.1" }, "funding": [ { @@ -1623,33 +1556,33 @@ "type": "github" } ], - "time": "2022-09-14T12:41:17+00:00" + "time": "2023-08-14T13:18:12+00:00" }, { "name": "sebastian/complexity", - "version": "2.0.2", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "reference": "68cfb347a44871f01e33ab0ef8215966432f6957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68cfb347a44871f01e33ab0ef8215966432f6957", + "reference": "68cfb347a44871f01e33ab0ef8215966432f6957", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" + "nikic/php-parser": "^4.10", + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.1-dev" } }, "autoload": { @@ -1672,7 +1605,8 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/3.1.0" }, "funding": [ { @@ -1680,33 +1614,33 @@ "type": "github" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2023-09-28T11:50:59+00:00" }, { "name": "sebastian/diff", - "version": "4.0.5", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/912dc2fbe3e3c1e7873313cc801b100b6c68c87b", + "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3", + "phpunit/phpunit": "^10.0", "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -1738,7 +1672,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.0.3" }, "funding": [ { @@ -1746,27 +1681,27 @@ "type": "github" } ], - "time": "2023-05-07T05:35:17+00:00" + "time": "2023-05-01T07:48:21+00:00" }, { "name": "sebastian/environment", - "version": "5.1.5", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/43c751b41d74f96cbbd4e07b7aec9675651e2951", + "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-posix": "*" @@ -1774,7 +1709,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1793,7 +1728,7 @@ } ], "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", + "homepage": "https://github.com/sebastianbergmann/environment", "keywords": [ "Xdebug", "environment", @@ -1801,7 +1736,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/6.0.1" }, "funding": [ { @@ -1809,34 +1745,34 @@ "type": "github" } ], - "time": "2023-02-03T06:03:51+00:00" + "time": "2023-04-11T05:39:26+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.5", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/64f51654862e0f5e318db7e9dcc2292c63cdbddc", + "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -1878,7 +1814,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.1" }, "funding": [ { @@ -1886,38 +1823,35 @@ "type": "github" } ], - "time": "2022-09-14T06:03:37+00:00" + "time": "2023-09-24T13:22:09+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.6", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bde739e7565280bda77be70044ac1047bc007e34" + "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", - "reference": "bde739e7565280bda77be70044ac1047bc007e34", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/7ea9ead78f6d380d2a667864c132c2f7b83055e4", + "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1942,7 +1876,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.1" }, "funding": [ { @@ -1950,33 +1885,33 @@ "type": "github" } ], - "time": "2023-08-02T09:26:13+00:00" + "time": "2023-07-19T07:19:23+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.3", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/649e40d279e243d985aa8fb6e74dd5bb28dc185d", + "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" + "nikic/php-parser": "^4.10", + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -1999,7 +1934,8 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.1" }, "funding": [ { @@ -2007,34 +1943,34 @@ "type": "github" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2023-08-31T09:25:50+00:00" }, { "name": "sebastian/object-enumerator", - "version": "4.0.4", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2056,7 +1992,7 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" }, "funding": [ { @@ -2064,32 +2000,32 @@ "type": "github" } ], - "time": "2020-10-26T13:12:34+00:00" + "time": "2023-02-03T07:08:32+00:00" }, { "name": "sebastian/object-reflector", - "version": "2.0.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -2111,7 +2047,7 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" }, "funding": [ { @@ -2119,32 +2055,32 @@ "type": "github" } ], - "time": "2020-10-26T13:14:26+00:00" + "time": "2023-02-03T07:06:18+00:00" }, { "name": "sebastian/recursion-context", - "version": "4.0.5", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" + "reference": "05909fb5bc7df4c52992396d0116aed689f93712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712", + "reference": "05909fb5bc7df4c52992396d0116aed689f93712", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2174,7 +2110,7 @@ "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0" }, "funding": [ { @@ -2182,87 +2118,32 @@ "type": "github" } ], - "time": "2023-02-03T06:07:39+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2023-02-03T07:05:40+00:00" }, { "name": "sebastian/type", - "version": "3.2.1", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -2285,7 +2166,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" }, "funding": [ { @@ -2293,29 +2174,29 @@ "type": "github" } ], - "time": "2023-02-03T06:13:03+00:00" + "time": "2023-02-03T07:10:45+00:00" }, { "name": "sebastian/version", - "version": "3.0.2", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -2338,7 +2219,7 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" }, "funding": [ { @@ -2346,7 +2227,7 @@ "type": "github" } ], - "time": "2020-09-28T06:39:44+00:00" + "time": "2023-02-07T11:34:05+00:00" }, { "name": "theseer/tokenizer", diff --git a/phpunit.xml b/phpunit.xml index 479301a..fe4d9ef 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,25 +1,22 @@ - - - - tests - - - - - - src - - + + + + tests + + + + + + src + + diff --git a/tests/ApiTest.php b/tests/ApiTest.php index 9c59b20..9ee08e5 100644 --- a/tests/ApiTest.php +++ b/tests/ApiTest.php @@ -22,10 +22,9 @@ class ApiTest extends TestClient { - public function createApiMockObject(Response $response, $methodExcept = []) + public function createApiMockObject(Response $response) { - $stub = parent::createApiMockObject($response, $methodExcept); - + $stub = parent::createApiMockObject($response); $stub->newRequest('GET', '/'); return $stub; @@ -33,24 +32,7 @@ public function createApiMockObject(Response $response, $methodExcept = []) public function testClients() { - $stub = $this->createApiMockObject(new Response(), [ - 'contact', - 'country', - 'event', - 'invoice', - 'downPaymentInvoice', - 'orderConfirmation', - 'quotation', - 'voucher', - 'voucherlist', - 'profile', - 'creditNote', - 'payment', - 'paymentCondition', - 'file', - 'recurringTemplate', - 'postingCategory' - ]); + $stub = $this->createApiMockObject(new Response()); $this->assertInstanceOf(Country::class, $stub->country()); $this->assertInstanceOf(Contact::class, $stub->contact()); diff --git a/tests/Clients/ContactTest.php b/tests/Clients/ContactTest.php index a9f5332..b759738 100644 --- a/tests/Clients/ContactTest.php +++ b/tests/Clients/ContactTest.php @@ -1,4 +1,4 @@ -createClientMockObject( Contact::class, - new Response(200, [], 'body'), - ['generateUrl'] + new Response(200, [], 'body') ); $this->assertEquals( @@ -26,8 +25,7 @@ public function testCreate() { $stub = $this->createClientMockObject( Contact::class, - new Response(200, [], 'body'), - ['create'] + new Response(200, [], 'body') ); $response = $stub->create([ @@ -41,8 +39,7 @@ public function testGet() { $stub = $this->createClientMockObject( Contact::class, - new Response(200, [], 'body'), - ['get'] + new Response(200, [], 'body') ); $response = $stub->get('resource-id'); @@ -54,8 +51,7 @@ public function testUpdate() { $stub = $this->createClientMockObject( Contact::class, - new Response(200, [], 'body'), - ['update'] + new Response(200, [], 'body') ); $response = $stub->update('resource-id', []); diff --git a/tests/Clients/CountryTest.php b/tests/Clients/CountryTest.php index b25a770..ab6d6c5 100644 --- a/tests/Clients/CountryTest.php +++ b/tests/Clients/CountryTest.php @@ -2,7 +2,6 @@ namespace Clicksports\LexOffice\Tests\Clients; -use Clicksports\LexOffice\Exceptions\BadMethodCallException; use Clicksports\LexOffice\Clients\Country; use GuzzleHttp\Psr7\Response; use Clicksports\LexOffice\Tests\TestClient; @@ -13,8 +12,7 @@ public function testGetAll() { $stub = $this->createClientMockObject( Country::class, - new Response(200, [], '{"content": [], "totalPages": 1}'), - ['getAll'] + new Response(200, [], '{"content": [], "totalPages": 1}') ); $response = $stub->getAll(); diff --git a/tests/Clients/CreditNoteTest.php b/tests/Clients/CreditNoteTest.php index c493d9f..f711cf4 100644 --- a/tests/Clients/CreditNoteTest.php +++ b/tests/Clients/CreditNoteTest.php @@ -1,4 +1,4 @@ -createClientMockObject( CreditNote::class, - new Response(200, [], 'body'), - ['create'] + new Response(200, [], 'body') ); $response = $stub->create([ @@ -25,36 +24,13 @@ public function testCreate() public function testGetAll() { - $stub = $this->createClientMultiMockObject( + $stub = $this->createClientMockObject( CreditNote::class, - [ - new Response(200, [], '{"content": ["a"], "totalPages": 1}'), - new Response(200, [], '{"content": ["b"], "totalPages": 1}') - ], - ['getAll'] + new Response(200, [], '{"content": [], "totalPages": 1}') ); $response = $stub->getAll(); - $this->assertEquals('{"content": ["a"], "totalPages": 1}', $response->getBody()->__toString()); - - $response = $stub->getAll(['open']); - - $this->assertEquals('{"content": ["b"], "totalPages": 1}', $response->getBody()->__toString()); - } - - public function testGetPage() - { - $stub = $this->createClientMultiMockObject( - CreditNote::class, - [ - new Response(200, [], '{"content": [], "totalPages": 1}'), - ], - ['getPage'] - ); - - $response = $stub->getPage(0); - $this->assertEquals('{"content": [], "totalPages": 1}', $response->getBody()->__toString()); } @@ -62,8 +38,7 @@ public function testDocument() { $stub = $this->createClientMockObject( CreditNote::class, - new Response(200, [], '{"documentFileId": "fake-id"}'), - ['document'] + new Response(200, [], '{"documentFileId": "fake-id"}') ); $response = $stub->document('resource-id'); @@ -78,8 +53,7 @@ public function testDocument() [ new Response(200, [], '{"documentFileId": "fake-id"}'), new Response(200, [], '{}') - ], - ['document'] + ] ); $response = $stub->document('resource-id', true); diff --git a/tests/Clients/DownPaymentInvoiceTest.php b/tests/Clients/DownPaymentInvoiceTest.php index 000725e..fe895d5 100644 --- a/tests/Clients/DownPaymentInvoiceTest.php +++ b/tests/Clients/DownPaymentInvoiceTest.php @@ -1,59 +1,22 @@ -createClientMockObject( - DownPaymentInvoice::class, - new Response(200, [], 'body'), - ['get'] - ); - - $response = $stub->get('resource-id'); - - $this->assertEquals('body', $response->getBody()->__toString()); - } - public function testGetAll() { - $stub = $this->createClientMultiMockObject( + $stub = $this->createClientMockObject( DownPaymentInvoice::class, - [ - new Response(200, [], '{"content": ["a"], "totalPages": 1}'), - new Response(200, [], '{"content": ["b"], "totalPages": 1}') - ], - ['getAll'] + new Response(200, [], '{"content": [], "totalPages": 1}') ); $response = $stub->getAll(); - $this->assertEquals('{"content": ["a"], "totalPages": 1}', $response->getBody()->__toString()); - - $response = $stub->getAll(['open']); - - $this->assertEquals('{"content": ["b"], "totalPages": 1}', $response->getBody()->__toString()); - } - - public function testGetPage() - { - $stub = $this->createClientMultiMockObject( - DownPaymentInvoice::class, - [ - new Response(200, [], '{"content": [], "totalPages": 1}'), - ], - ['getPage'] - ); - - $response = $stub->getPage(0); - $this->assertEquals('{"content": [], "totalPages": 1}', $response->getBody()->__toString()); } @@ -61,8 +24,7 @@ public function testDocument() { $stub = $this->createClientMockObject( DownPaymentInvoice::class, - new Response(200, [], '{"documentFileId": "fake-id"}'), - ['document'] + new Response(200, [], '{"documentFileId": "fake-id"}') ); $response = $stub->document('resource-id'); @@ -77,8 +39,7 @@ public function testDocument() [ new Response(200, [], '{"documentFileId": "fake-id"}'), new Response(200, [], '{}') - ], - ['document'] + ] ); $response = $stub->document('resource-id', true); diff --git a/tests/Clients/EventTest.php b/tests/Clients/EventTest.php index 5cf86c4..b0b62eb 100644 --- a/tests/Clients/EventTest.php +++ b/tests/Clients/EventTest.php @@ -1,4 +1,4 @@ -createClientMockObject( Event::class, - new Response(200, [], 'body'), - ['create'] + new Response(200, [], 'body') ); $response = $stub->create([ @@ -28,8 +27,7 @@ public function testGetAll() { $stub = $this->createClientMockObject( Event::class, - new Response(200, [], '{"content": [], "totalPages": 1}'), - ['getAll'] + new Response(200, [], '{"content": [], "totalPages": 1}') ); $response = $stub->getAll(); @@ -41,8 +39,7 @@ public function testDelete() { $stub = $this->createClientMockObject( Event::class, - new Response(200, [], 'body'), - ['delete'] + new Response(200, [], 'body') ); $response = $stub->delete('resource-id'); diff --git a/tests/Clients/FileTest.php b/tests/Clients/FileTest.php index fd77ec7..e9ea6c6 100644 --- a/tests/Clients/FileTest.php +++ b/tests/Clients/FileTest.php @@ -1,9 +1,9 @@ -createClientMockObject( File::class, - new Response(200, [], '{}'), - ['upload'] + new Response(200, [], '{}') ); $stub->upload('not_allowed.gif', 'voucher'); @@ -29,8 +28,7 @@ public function testUploadNotFound() $stub = $this->createClientMockObject( File::class, - new Response(200, [], '{}'), - ['upload'] + new Response(200, [], '{}') ); $stub->upload('not_existing.jpg', 'voucher'); @@ -42,12 +40,10 @@ public function testUploadToBig() $stub = $this->createClientMockObject( File::class, - new Response(200, [], '{}'), - ['upload'] + new Response(200, [], '{}') ); - $this->createCacheDir(); - $file = $this->getCacheDir() . '/somefile.jpg'; + $file = __DIR__ . '/somefile.jpg'; $fp = fopen($file, 'w+'); // fseek($fp, File::MAX_FILE_SIZE + 1,SEEK_CUR); fwrite($fp,'a'); @@ -62,12 +58,10 @@ public function testUpload() { $stub = $this->createClientMockObject( File::class, - new Response(200, [], '{}'), - ['upload'] + new Response(200, [], '{}') ); - $this->createCacheDir(); - $file = $this->getCacheDir() . '/somefile2.jpg'; + $file = __DIR__ . '/somefile2.jpg'; $fp = fopen($file, 'w+'); // fseek($fp, 5,SEEK_CUR); fwrite($fp,'a'); diff --git a/tests/Clients/InvoiceTest.php b/tests/Clients/InvoiceTest.php index 2405809..b91f251 100644 --- a/tests/Clients/InvoiceTest.php +++ b/tests/Clients/InvoiceTest.php @@ -1,4 +1,4 @@ -createClientMockObject( Invoice::class, - new Response(200, [], 'body'), - ['create'] + new Response(200, [], 'body') ); $response = $stub->create([ @@ -28,8 +27,7 @@ public function testGet() { $stub = $this->createClientMockObject( Invoice::class, - new Response(200, [], 'body'), - ['get'] + new Response(200, [], 'body') ); $response = $stub->get('resource-id'); @@ -39,36 +37,13 @@ public function testGet() public function testGetAll() { - $stub = $this->createClientMultiMockObject( + $stub = $this->createClientMockObject( Invoice::class, - [ - new Response(200, [], '{"content": ["a"], "totalPages": 1}'), - new Response(200, [], '{"content": ["b"], "totalPages": 1}') - ], - ['getAll'] + new Response(200, [], '{"content": [], "totalPages": 1}') ); $response = $stub->getAll(); - $this->assertEquals('{"content": ["a"], "totalPages": 1}', $response->getBody()->__toString()); - - $response = $stub->getAll(['open']); - - $this->assertEquals('{"content": ["b"], "totalPages": 1}', $response->getBody()->__toString()); - } - - public function testGetPage() - { - $stub = $this->createClientMultiMockObject( - Invoice::class, - [ - new Response(200, [], '{"content": [], "totalPages": 1}'), - ], - ['getPage'] - ); - - $response = $stub->getPage(0); - $this->assertEquals('{"content": [], "totalPages": 1}', $response->getBody()->__toString()); } @@ -76,8 +51,7 @@ public function testDocument() { $stub = $this->createClientMockObject( Invoice::class, - new Response(200, [], '{"documentFileId": "fake-id"}'), - ['document'] + new Response(200, [], '{"documentFileId": "fake-id"}') ); $response = $stub->document('resource-id'); @@ -92,8 +66,7 @@ public function testDocument() [ new Response(200, [], '{"documentFileId": "fake-id"}'), new Response(200, [], '{}') - ], - ['document'] + ] ); $response = $stub->document('resource-id', true); diff --git a/tests/Clients/OrderConfirmationTest.php b/tests/Clients/OrderConfirmationTest.php index d6eac8e..2e2068d 100644 --- a/tests/Clients/OrderConfirmationTest.php +++ b/tests/Clients/OrderConfirmationTest.php @@ -1,4 +1,4 @@ -createClientMockObject( OrderConfirmation::class, - new Response(200, [], 'body'), - ['create'] + new Response(200, [], 'body') ); $response = $stub->create([ @@ -28,8 +27,7 @@ public function testGet() { $stub = $this->createClientMockObject( OrderConfirmation::class, - new Response(200, [], 'body'), - ['get'] + new Response(200, [], 'body') ); $response = $stub->get('resource-id'); @@ -39,36 +37,13 @@ public function testGet() public function testGetAll() { - $stub = $this->createClientMultiMockObject( + $stub = $this->createClientMockObject( OrderConfirmation::class, - [ - new Response(200, [], '{"content": ["a"], "totalPages": 1}'), - new Response(200, [], '{"content": ["b"], "totalPages": 1}') - ], - ['getAll'] + new Response(200, [], '{"content": [], "totalPages": 1}') ); $response = $stub->getAll(); - $this->assertEquals('{"content": ["a"], "totalPages": 1}', $response->getBody()->__toString()); - - $response = $stub->getAll(['open']); - - $this->assertEquals('{"content": ["b"], "totalPages": 1}', $response->getBody()->__toString()); - } - - public function testGetPage() - { - $stub = $this->createClientMultiMockObject( - OrderConfirmation::class, - [ - new Response(200, [], '{"content": [], "totalPages": 1}'), - ], - ['getPage'] - ); - - $response = $stub->getPage(0); - $this->assertEquals('{"content": [], "totalPages": 1}', $response->getBody()->__toString()); } @@ -76,8 +51,7 @@ public function testDocument() { $stub = $this->createClientMockObject( OrderConfirmation::class, - new Response(200, [], '{"documentFileId": "fake-id"}'), - ['document'] + new Response(200, [], '{"documentFileId": "fake-id"}') ); $response = $stub->document('resource-id'); @@ -92,8 +66,7 @@ public function testDocument() [ new Response(200, [], '{"documentFileId": "fake-id"}'), new Response(200, [], '{}') - ], - ['document'] + ] ); $response = $stub->document('resource-id', true); diff --git a/tests/Clients/PaymentConditionTest.php b/tests/Clients/PaymentConditionTest.php index eb7b6f5..6cd8ed1 100644 --- a/tests/Clients/PaymentConditionTest.php +++ b/tests/Clients/PaymentConditionTest.php @@ -2,7 +2,6 @@ namespace Clicksports\LexOffice\Tests\Clients; -use Clicksports\LexOffice\Exceptions\BadMethodCallException; use Clicksports\LexOffice\Clients\PaymentCondition; use GuzzleHttp\Psr7\Response; use Clicksports\LexOffice\Tests\TestClient; @@ -13,8 +12,7 @@ public function testGetAll() { $stub = $this->createClientMockObject( PaymentCondition::class, - new Response(200, [], '{"content": [], "totalPages": 1}'), - ['getAll'] + new Response(200, [], '{"content": [], "totalPages": 1}') ); $response = $stub->getAll(); diff --git a/tests/Clients/PaymentTest.php b/tests/Clients/PaymentTest.php index 5338627..2dc9bd1 100644 --- a/tests/Clients/PaymentTest.php +++ b/tests/Clients/PaymentTest.php @@ -2,7 +2,6 @@ namespace Clicksports\LexOffice\Tests\Clients; -use Clicksports\LexOffice\Exceptions\BadMethodCallException; use Clicksports\LexOffice\Clients\Payment; use GuzzleHttp\Psr7\Response; use Clicksports\LexOffice\Tests\TestClient; @@ -13,8 +12,7 @@ public function testGet() { $stub = $this->createClientMockObject( Payment::class, - new Response(200, [], 'body'), - ['get'] + new Response(200, [], 'body') ); $response = $stub->get('resource-id'); diff --git a/tests/Clients/PostingCategoryTest.php b/tests/Clients/PostingCategoryTest.php index 0500552..8fa0a58 100644 --- a/tests/Clients/PostingCategoryTest.php +++ b/tests/Clients/PostingCategoryTest.php @@ -2,7 +2,6 @@ namespace Clicksports\LexOffice\Tests\Clients; -use Clicksports\LexOffice\Exceptions\BadMethodCallException; use Clicksports\LexOffice\Clients\PostingCategory; use Clicksports\LexOffice\Tests\TestClient; use GuzzleHttp\Psr7\Response; @@ -13,8 +12,7 @@ public function testGetAll(): void { $stub = $this->createClientMockObject( PostingCategory::class, - new Response(200, [], '{"content": [], "totalPages": 1}'), - ['getAll'] + new Response(200, [], '{"content": [], "totalPages": 1}') ); $response = $stub->getAll(); diff --git a/tests/Clients/ProfileTest.php b/tests/Clients/ProfileTest.php index 4f6f989..a8115fc 100644 --- a/tests/Clients/ProfileTest.php +++ b/tests/Clients/ProfileTest.php @@ -12,8 +12,7 @@ public function testGet() { $stub = $this->createClientMockObject( Profile::class, - new Response(200, [], '{}'), - ['get'] + new Response(200, [], '{}') ); $this->assertEquals( diff --git a/tests/Clients/QuotationTest.php b/tests/Clients/QuotationTest.php index 2610509..081e27c 100644 --- a/tests/Clients/QuotationTest.php +++ b/tests/Clients/QuotationTest.php @@ -1,4 +1,4 @@ -createClientMockObject( Quotation::class, - new Response(200, [], 'body'), - ['create'] + new Response(200, [], 'body') ); $response = $stub->create([ @@ -28,8 +27,7 @@ public function testGet() { $stub = $this->createClientMockObject( Quotation::class, - new Response(200, [], 'body'), - ['get'] + new Response(200, [], 'body') ); $response = $stub->get('resource-id'); @@ -39,36 +37,13 @@ public function testGet() public function testGetAll() { - $stub = $this->createClientMultiMockObject( + $stub = $this->createClientMockObject( Quotation::class, - [ - new Response(200, [], '{"content": ["a"], "totalPages": 1}'), - new Response(200, [], '{"content": ["b"], "totalPages": 1}') - ], - ['getAll'] + new Response(200, [], '{"content": [], "totalPages": 1}') ); $response = $stub->getAll(); - $this->assertEquals('{"content": ["a"], "totalPages": 1}', $response->getBody()->__toString()); - - $response = $stub->getAll(['open']); - - $this->assertEquals('{"content": ["b"], "totalPages": 1}', $response->getBody()->__toString()); - } - - public function testGetPage() - { - $stub = $this->createClientMultiMockObject( - Quotation::class, - [ - new Response(200, [], '{"content": [], "totalPages": 1}'), - ], - ['getPage'] - ); - - $response = $stub->getPage(0); - $this->assertEquals('{"content": [], "totalPages": 1}', $response->getBody()->__toString()); } @@ -76,8 +51,7 @@ public function testDocument() { $stub = $this->createClientMockObject( Quotation::class, - new Response(200, [], '{"documentFileId": "fake-id"}'), - ['document'] + new Response(200, [], '{"documentFileId": "fake-id"}') ); $response = $stub->document('resource-id'); @@ -92,8 +66,7 @@ public function testDocument() [ new Response(200, [], '{"documentFileId": "fake-id"}'), new Response(200, [], '{}') - ], - ['document'] + ] ); $response = $stub->document('resource-id', true); diff --git a/tests/Clients/RecurringTemplateTest.php b/tests/Clients/RecurringTemplateTest.php index 1a9c12b..92414df 100644 --- a/tests/Clients/RecurringTemplateTest.php +++ b/tests/Clients/RecurringTemplateTest.php @@ -12,8 +12,7 @@ public function testGet(): void { $stub = $this->createClientMockObject( RecurringTemplate::class, - new Response(200, [], 'body'), - ['get'] + new Response(200, [], 'body') ); $response = $stub->get('resource-id'); @@ -25,8 +24,7 @@ public function testGenerateUrl(): void { $stub = $this->createClientMockObject( RecurringTemplate::class, - new Response(200, [], 'body'), - ['generateUrl'] + new Response(200, [], 'body') ); $this->assertEquals( diff --git a/tests/Clients/VoucherListTest.php b/tests/Clients/VoucherListTest.php index 2dc7ab0..1e51cf9 100644 --- a/tests/Clients/VoucherListTest.php +++ b/tests/Clients/VoucherListTest.php @@ -13,8 +13,7 @@ public function testGenerateUrl() { $stub = $this->createClientMockObject( VoucherList::class, - new Response(200, [], 'body'), - ['generateUrl'] + new Response(200, [], 'body') ); $stub->types = ['invoice']; diff --git a/tests/Clients/VoucherTest.php b/tests/Clients/VoucherTest.php index 1f834d6..383f993 100644 --- a/tests/Clients/VoucherTest.php +++ b/tests/Clients/VoucherTest.php @@ -1,4 +1,4 @@ -createClientMockObject( Voucher::class, - new Response(200, [], 'body'), - ['create'] + new Response(200, [], 'body') ); $response = $stub->create([ @@ -28,8 +27,7 @@ public function testGet() { $stub = $this->createClientMockObject( Voucher::class, - new Response(200, [], 'body'), - ['get'] + new Response(200, [], 'body') ); $response = $stub->get('resource-id'); @@ -41,8 +39,7 @@ public function testGetAll() { $stub = $this->createClientMockObject( Voucher::class, - new Response(200, [], '{"content": [], "totalPages": 1}'), - ['getAll'] + new Response(200, [], '{"content": [], "totalPages": 1}') ); $response = $stub->getAll(); @@ -54,8 +51,7 @@ public function testUpdate() { $stub = $this->createClientMockObject( Voucher::class, - new Response(200, [], '{}'), - ['update'] + new Response(200, [], '{}') ); $response = $stub->update('resource-id', []); diff --git a/tests/PaginationClientTest.php b/tests/PaginationClientTest.php index ebab09a..0ef3cf7 100644 --- a/tests/PaginationClientTest.php +++ b/tests/PaginationClientTest.php @@ -10,8 +10,7 @@ class PaginationClientTest extends TestClient public function testGenerateUrl() { $stub = $this->createPaginationClientMockObject( - [new Response()], - ['generateUrl'] + [new Response()] ); $this->assertEquals( @@ -23,8 +22,7 @@ public function testGenerateUrl() public function testGetAll() { $stub = $this->createPaginationClientMockObject( - [new Response(200, [], '{"content": [], "totalPages": 1}')], - ['getAll', 'getPage'] + [new Response(200, [], '{"content": [], "totalPages": 1}')] ); $this->assertEquals( @@ -37,8 +35,7 @@ public function testGetAll() [ new Response(200, [], '{"content": [{"name": "a"}], "totalPages": 2}'), new Response(200, [], '{"content": [{"name": "b"}], "totalPages": 2}') - ], - ['getAll', 'getPage'] + ] ); $this->assertEquals( @@ -50,8 +47,7 @@ public function testGetAll() public function testGetPage() { $stub = $this->createPaginationClientMockObject( - [new Response(200, [], '{"content": [], "totalPages": 1}')], - ['getPage'] + [new Response(200, [], '{"content": [], "totalPages": 1}')] ); $this->assertEquals( diff --git a/tests/TestClient.php b/tests/TestClient.php index e7bde95..b821946 100644 --- a/tests/TestClient.php +++ b/tests/TestClient.php @@ -3,7 +3,6 @@ namespace Clicksports\LexOffice\Tests; use Clicksports\LexOffice\Api; -use Clicksports\LexOffice\ClientInterface; use Clicksports\LexOffice\PaginationClient; use GuzzleHttp\Client; use GuzzleHttp\Handler\MockHandler; @@ -18,37 +17,30 @@ class TestClient extends TestCase { /** * @param Response $response - * @param string[] $methodExcept * @return Api|MockObject */ - public function createApiMockObject(Response $response, $methodExcept = []) + public function createApiMockObject(Response $response) { - return $this->createApiMultiMockObject([$response], $methodExcept); + return $this->createApiMultiMockObject([$response]); } /** * @param Response[] $responses - * @param string[] $methodExcept * @return MockObject|Api */ - public function createApiMultiMockObject(array $responses, $methodExcept = []) + public function createApiMultiMockObject(array $responses) { $responseMock = new MockHandler($responses); return $this ->getMockBuilder(Api::class) + ->addMethods([]) ->setConstructorArgs([ '', new Client([ 'handler' => HandlerStack::create($responseMock) ]) ]) - ->setMethodsExcept([ - ...$methodExcept, - 'setRequest', - 'newRequest', - 'getResponse' - ]) ->getMock(); } @@ -56,54 +48,44 @@ public function createApiMultiMockObject(array $responses, $methodExcept = []) * @template T * @param class-string $className * @param Response $response - * @param string[] $methodExcept * @return MockObject|T */ - public function createClientMockObject(string $className, Response $response, array $methodExcept = []) + public function createClientMockObject(string $className, Response $response) { - return $this->createClientMultiMockObject($className, [$response], $methodExcept); + return $this->createClientMultiMockObject($className, [$response]); } /** * @template T * @param class-string $className * @param Response[] $responses - * @param string[] $methodExcept * @return MockObject|T */ - public function createClientMultiMockObject(string $className, array $responses, array $methodExcept = []) + public function createClientMultiMockObject(string $className, array $responses) { $api = $this->createApiMultiMockObject($responses); return $this ->getMockBuilder($className) + ->addMethods([]) ->setConstructorArgs([$api]) - ->setMethodsExcept([ - ...$methodExcept, - 'getAsJson', - 'createStream' - ]) ->getMock(); } /** * @param Response[] $responses - * @param string[] $methodExcept * @return MockObject|PaginationClient * @throws ReflectionException */ - public function createPaginationClientMockObject(array $responses, array $methodExcept = []) + public function createPaginationClientMockObject(array $responses) { $api = $this->createApiMultiMockObject($responses); $stub = $this ->getMockBuilder(PaginationClient::class) + ->addMethods([]) ->setConstructorArgs([$api]) - ->setMethodsExcept([ - ...$methodExcept, - 'getAsJson' - ]) - ->getMock(); + ->getMockForAbstractClass(); $this->setProtectedProperty($stub, 'resource', 'resource');