From d8e8ed425b510634d72f57c9b94a80aba6284bc3 Mon Sep 17 00:00:00 2001 From: Sander van Hooft Date: Mon, 31 Jul 2023 15:27:21 +0200 Subject: [PATCH 1/3] Added mollie client idempotency methods --- .phpunit.cache/test-results | 1 + composer.json | 2 +- src/Wrappers/MollieApiWrapper.php | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .phpunit.cache/test-results diff --git a/.phpunit.cache/test-results b/.phpunit.cache/test-results new file mode 100644 index 0000000..557b9c7 --- /dev/null +++ b/.phpunit.cache/test-results @@ -0,0 +1 @@ +{"version":1,"defects":[],"times":{"Mollie\\Laravel\\Tests\\Facades\\MollieTest::testIsAFacade":0.038,"Mollie\\Laravel\\Tests\\Facades\\MollieTest::testFacadeAccessor":0.001,"Mollie\\Laravel\\Tests\\Facades\\MollieTest::testFacadeRoot":0.002,"Mollie\\Laravel\\Tests\\Facades\\MollieTest::testServiceProvider":0.002,"Mollie\\Laravel\\Tests\\HelpersTest::testItCanWorkWithHelper":0.028,"Mollie\\Laravel\\Tests\\MollieConnectProviderTest::testRedirectGeneratesTheProperSymfonyRedirectResponse":0.025,"Mollie\\Laravel\\Tests\\MollieConnectProviderTest::testExceptionIsThrownIfStateIsInvalid":0.004,"Mollie\\Laravel\\Tests\\MollieConnectProviderTest::testExceptionIsThrownIfStateIsNotSet":0,"Mollie\\Laravel\\Tests\\MollieConnectProviderTest::testGetTokenFields":0.002,"Mollie\\Laravel\\Tests\\MollieManagerTest::testConstructor":0,"Mollie\\Laravel\\Tests\\MollieManagerTest::testApiMethod":0,"Mollie\\Laravel\\Tests\\MollieServiceProviderTest::testMollieManagerIsInjectable":0,"Mollie\\Laravel\\Tests\\MollieServiceProviderTest::testMollieApiWrapperIsInjectable":0.001,"Mollie\\Laravel\\Tests\\MollieServiceProviderTest::testMollieApiClientIsInjectable":0.001,"Mollie\\Laravel\\Tests\\MollieServiceProviderTest::testIsAServiceProvider":0,"Mollie\\Laravel\\Tests\\MollieServiceProviderTest::testProvides":0.002,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiLaravelClientTest::testPostRequest":0.038,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiLaravelClientTest::testGetRequest":0.001,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testConstruct":0.003,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testApiEndpoint":0.013,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testSetGoodApiKey":0.002,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testSetBadApiKey":0.001,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testDoesNotSetKeyWhenEmpty":0.001,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testSetGoodToken":0,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testSetBadToken":0,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testEnableDebugging":0,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testDisableDebugging":0,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testWrappedEndpoints":0,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testWrappedPropertyEndpoints":0,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testUnknownWrappedEndpoint":0,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testUnknownWrappedPropertyEndpoint":0}} \ No newline at end of file diff --git a/composer.json b/composer.json index 3a48341..ba8a5f7 100644 --- a/composer.json +++ b/composer.json @@ -42,7 +42,7 @@ ], "require": { "php": "^8.0", - "mollie/mollie-api-php": "v2.58.0-beta", + "mollie/mollie-api-php": "^2.60", "illuminate/support": "^9.0|^10.0", "ext-json": "*" }, diff --git a/src/Wrappers/MollieApiWrapper.php b/src/Wrappers/MollieApiWrapper.php index 9bb83cd..6351465 100644 --- a/src/Wrappers/MollieApiWrapper.php +++ b/src/Wrappers/MollieApiWrapper.php @@ -418,6 +418,26 @@ public function disableDebugging() $this->client->disableDebugging(); } + public function setIdempotencyKey(string $key) + { + return $this->client->setIdempotencyKey($key); + } + + public function resetIdempotencyKey() + { + return $this->client->resetIdempotencyKey(); + } + + public function setIdempotencyKeyGenerator($generator) + { + return $this->client->setIdempotencyKeyGenerator($generator); + } + + public function clearIdempotencyKeyGenerator() + { + return $this->client->clearIdempotencyKeyGenerator(); + } + /** * Handle dynamic property calls. * From 09f303348f7def753d76a010852359e9fe144709 Mon Sep 17 00:00:00 2001 From: Sander van Hooft Date: Mon, 31 Jul 2023 15:31:37 +0200 Subject: [PATCH 2/3] Delete test-results --- .phpunit.cache/test-results | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .phpunit.cache/test-results diff --git a/.phpunit.cache/test-results b/.phpunit.cache/test-results deleted file mode 100644 index 557b9c7..0000000 --- a/.phpunit.cache/test-results +++ /dev/null @@ -1 +0,0 @@ -{"version":1,"defects":[],"times":{"Mollie\\Laravel\\Tests\\Facades\\MollieTest::testIsAFacade":0.038,"Mollie\\Laravel\\Tests\\Facades\\MollieTest::testFacadeAccessor":0.001,"Mollie\\Laravel\\Tests\\Facades\\MollieTest::testFacadeRoot":0.002,"Mollie\\Laravel\\Tests\\Facades\\MollieTest::testServiceProvider":0.002,"Mollie\\Laravel\\Tests\\HelpersTest::testItCanWorkWithHelper":0.028,"Mollie\\Laravel\\Tests\\MollieConnectProviderTest::testRedirectGeneratesTheProperSymfonyRedirectResponse":0.025,"Mollie\\Laravel\\Tests\\MollieConnectProviderTest::testExceptionIsThrownIfStateIsInvalid":0.004,"Mollie\\Laravel\\Tests\\MollieConnectProviderTest::testExceptionIsThrownIfStateIsNotSet":0,"Mollie\\Laravel\\Tests\\MollieConnectProviderTest::testGetTokenFields":0.002,"Mollie\\Laravel\\Tests\\MollieManagerTest::testConstructor":0,"Mollie\\Laravel\\Tests\\MollieManagerTest::testApiMethod":0,"Mollie\\Laravel\\Tests\\MollieServiceProviderTest::testMollieManagerIsInjectable":0,"Mollie\\Laravel\\Tests\\MollieServiceProviderTest::testMollieApiWrapperIsInjectable":0.001,"Mollie\\Laravel\\Tests\\MollieServiceProviderTest::testMollieApiClientIsInjectable":0.001,"Mollie\\Laravel\\Tests\\MollieServiceProviderTest::testIsAServiceProvider":0,"Mollie\\Laravel\\Tests\\MollieServiceProviderTest::testProvides":0.002,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiLaravelClientTest::testPostRequest":0.038,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiLaravelClientTest::testGetRequest":0.001,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testConstruct":0.003,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testApiEndpoint":0.013,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testSetGoodApiKey":0.002,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testSetBadApiKey":0.001,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testDoesNotSetKeyWhenEmpty":0.001,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testSetGoodToken":0,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testSetBadToken":0,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testEnableDebugging":0,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testDisableDebugging":0,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testWrappedEndpoints":0,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testWrappedPropertyEndpoints":0,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testUnknownWrappedEndpoint":0,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testUnknownWrappedPropertyEndpoint":0}} \ No newline at end of file From e90dfc449a32c920f807fc9c2296df2fd09c5c00 Mon Sep 17 00:00:00 2001 From: Sander van Hooft Date: Mon, 31 Jul 2023 15:35:36 +0200 Subject: [PATCH 3/3] Updated phpunit config --- .gitignore | 1 + phpunit.xml.dist | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 4aa2fa6..c590e5b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,6 @@ vendor composer.lock phpunit.xml .phpunit.result.cache +.phpunit.cache .DS_Store .php-cs-fixer.cache diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 1f20019..fdc7ae3 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,13 +1,14 @@ - - - - ./src - - + + ./tests + + + ./src + +