diff --git a/CHANGELOG.md b/CHANGELOG.md index db228b8b..296d9857 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### v2.14.0 от 07.07.2026 +* Добавлена поддержка совместимости с PHP 8.5 + ### v2.13.3 от 06.07.2026 * Добавлен прием платежей через Alfa Pay diff --git a/composer.json b/composer.json index 31c7e1c0..83e1e20b 100644 --- a/composer.json +++ b/composer.json @@ -13,9 +13,9 @@ ], "dist": { "type": "zip", - "url": "https://git.yoomoney.ru/rest/api/latest/projects/SDK/repos/yookassa-sdk-php/archive?at=refs%2Ftags%2F2.13.3&format=zip" + "url": "https://git.yoomoney.ru/rest/api/latest/projects/SDK/repos/yookassa-sdk-php/archive?at=refs%2Ftags%2F2.14.0&format=zip" }, - "version": "2.13.3", + "version": "2.14.0", "require": { "php": ">=5.3.0", "ext-curl": "*", @@ -25,7 +25,7 @@ }, "require-dev": { "ext-xml": "*", - "phpunit/phpunit": "^4.8 || ^5.7", + "phpunit/phpunit": "^4.8 || ^5.7 || ^9.0", "mockery/mockery": "^0.9 || ^1.6", "php-parallel-lint/php-parallel-lint": "^1.0", "phpmd/phpmd": "^2.13", diff --git a/docs/classes/JsonSerializable.md b/docs/classes/JsonSerializable.md index e180f57e..7b2203c9 100644 --- a/docs/classes/JsonSerializable.md +++ b/docs/classes/JsonSerializable.md @@ -50,6 +50,6 @@ public jsonSerialize() : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Client-ApiClientInterface.md b/docs/classes/YooKassa-Client-ApiClientInterface.md index 4010169e..b4b8a226 100644 --- a/docs/classes/YooKassa-Client-ApiClientInterface.md +++ b/docs/classes/YooKassa-Client-ApiClientInterface.md @@ -218,6 +218,6 @@ public setAdvancedCurlOptions() : void --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Client-BaseClient.md b/docs/classes/YooKassa-Client-BaseClient.md index 3860e89d..1ab7fde7 100644 --- a/docs/classes/YooKassa-Client-BaseClient.md +++ b/docs/classes/YooKassa-Client-BaseClient.md @@ -698,6 +698,6 @@ protected handleError(\YooKassa\Common\ResponseObject $response) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Client-CurlClient.md b/docs/classes/YooKassa-Client-CurlClient.md index 05bca67d..3c72c7d7 100644 --- a/docs/classes/YooKassa-Client-CurlClient.md +++ b/docs/classes/YooKassa-Client-CurlClient.md @@ -513,6 +513,6 @@ public setTimeout(int $timeout) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Client-UserAgent.md b/docs/classes/YooKassa-Client-UserAgent.md index 21b50b46..718e7d5a 100644 --- a/docs/classes/YooKassa-Client-UserAgent.md +++ b/docs/classes/YooKassa-Client-UserAgent.md @@ -316,6 +316,6 @@ public setModule(string $name, string $version) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Client.md b/docs/classes/YooKassa-Client.md index 946d3aad..8fccbbf2 100644 --- a/docs/classes/YooKassa-Client.md +++ b/docs/classes/YooKassa-Client.md @@ -276,7 +276,7 @@ DEFAULT_ATTEMPTS_COUNT = 3 Текущая версия библиотеки ```php -SDK_VERSION = '2.13.3' +SDK_VERSION = '2.14.0' ``` @@ -2503,6 +2503,6 @@ protected handleError(\YooKassa\Common\ResponseObject $response) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-AbstractEnum.md b/docs/classes/YooKassa-Common-AbstractEnum.md index 96d74e32..04976b64 100644 --- a/docs/classes/YooKassa-Common-AbstractEnum.md +++ b/docs/classes/YooKassa-Common-AbstractEnum.md @@ -118,6 +118,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-AbstractObject.md b/docs/classes/YooKassa-Common-AbstractObject.md index a3506a96..fadc8a7b 100644 --- a/docs/classes/YooKassa-Common-AbstractObject.md +++ b/docs/classes/YooKassa-Common-AbstractObject.md @@ -332,6 +332,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-AbstractPaymentRequest.md b/docs/classes/YooKassa-Common-AbstractPaymentRequest.md index c53a1e0b..a8ec0f45 100644 --- a/docs/classes/YooKassa-Common-AbstractPaymentRequest.md +++ b/docs/classes/YooKassa-Common-AbstractPaymentRequest.md @@ -738,6 +738,6 @@ protected setValidationError(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-AbstractPaymentRequestBuilder.md b/docs/classes/YooKassa-Common-AbstractPaymentRequestBuilder.md index 686a74db..d708478e 100644 --- a/docs/classes/YooKassa-Common-AbstractPaymentRequestBuilder.md +++ b/docs/classes/YooKassa-Common-AbstractPaymentRequestBuilder.md @@ -192,7 +192,7 @@ public addReceiptShipping(string $title, string $price, int $vatCode, null|strin #### public build() : \YooKassa\Common\AbstractRequest ```php -public build(array $options = null) : \YooKassa\Common\AbstractRequest +public build(mixed $options = null) : \YooKassa\Common\AbstractRequest ``` **Summary** @@ -205,7 +205,7 @@ public build(array $options = null) : \YooKassa\Common\AbstractRequest ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | -| array | options | Массив свойств запроса, если нужно их установить перед сборкой | +| mixed | options | Массив свойств запроса, если нужно их установить перед сборкой | **Returns:** \YooKassa\Common\AbstractRequest - Инстанс собранного запроса @@ -462,6 +462,6 @@ protected initCurrentObject() : self --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-AbstractRefundRequest.md b/docs/classes/YooKassa-Common-AbstractRefundRequest.md index 7dd22ecf..6c341d4d 100644 --- a/docs/classes/YooKassa-Common-AbstractRefundRequest.md +++ b/docs/classes/YooKassa-Common-AbstractRefundRequest.md @@ -637,6 +637,6 @@ protected setValidationError(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-AbstractRequest.md b/docs/classes/YooKassa-Common-AbstractRequest.md index 7f9787f6..44037e5e 100644 --- a/docs/classes/YooKassa-Common-AbstractRequest.md +++ b/docs/classes/YooKassa-Common-AbstractRequest.md @@ -407,6 +407,6 @@ protected setValidationError(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-AbstractRequestBuilder.md b/docs/classes/YooKassa-Common-AbstractRequestBuilder.md index f529db8b..cfa8d1e4 100644 --- a/docs/classes/YooKassa-Common-AbstractRequestBuilder.md +++ b/docs/classes/YooKassa-Common-AbstractRequestBuilder.md @@ -157,6 +157,6 @@ Abstract protected initCurrentObject() : \YooKassa\Common\AbstractRequest --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-Exceptions-ApiConnectionException.md b/docs/classes/YooKassa-Common-Exceptions-ApiConnectionException.md index f1df63b3..c08a60b3 100644 --- a/docs/classes/YooKassa-Common-Exceptions-ApiConnectionException.md +++ b/docs/classes/YooKassa-Common-Exceptions-ApiConnectionException.md @@ -126,6 +126,6 @@ public getResponseHeaders() : string[] --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-Exceptions-ApiException.md b/docs/classes/YooKassa-Common-Exceptions-ApiException.md index c59ad71e..19988759 100644 --- a/docs/classes/YooKassa-Common-Exceptions-ApiException.md +++ b/docs/classes/YooKassa-Common-Exceptions-ApiException.md @@ -123,6 +123,6 @@ public getResponseHeaders() : string[] --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-Exceptions-AuthorizeException.md b/docs/classes/YooKassa-Common-Exceptions-AuthorizeException.md index d90579b0..0fe4eadb 100644 --- a/docs/classes/YooKassa-Common-Exceptions-AuthorizeException.md +++ b/docs/classes/YooKassa-Common-Exceptions-AuthorizeException.md @@ -126,6 +126,6 @@ public getResponseHeaders() : string[] --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-Exceptions-BadApiRequestException.md b/docs/classes/YooKassa-Common-Exceptions-BadApiRequestException.md index 01907fd2..d55fe9a2 100644 --- a/docs/classes/YooKassa-Common-Exceptions-BadApiRequestException.md +++ b/docs/classes/YooKassa-Common-Exceptions-BadApiRequestException.md @@ -152,6 +152,6 @@ public getResponseHeaders() : string[] --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-Exceptions-EmptyPropertyValueException.md b/docs/classes/YooKassa-Common-Exceptions-EmptyPropertyValueException.md index 0733a466..5d983475 100644 --- a/docs/classes/YooKassa-Common-Exceptions-EmptyPropertyValueException.md +++ b/docs/classes/YooKassa-Common-Exceptions-EmptyPropertyValueException.md @@ -79,6 +79,6 @@ public getProperty() : string --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-Exceptions-ExtensionNotFoundException.md b/docs/classes/YooKassa-Common-Exceptions-ExtensionNotFoundException.md index af483384..d41f7cbe 100644 --- a/docs/classes/YooKassa-Common-Exceptions-ExtensionNotFoundException.md +++ b/docs/classes/YooKassa-Common-Exceptions-ExtensionNotFoundException.md @@ -67,6 +67,6 @@ Constructor --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-Exceptions-ForbiddenException.md b/docs/classes/YooKassa-Common-Exceptions-ForbiddenException.md index 7a48741b..6d5cd08b 100644 --- a/docs/classes/YooKassa-Common-Exceptions-ForbiddenException.md +++ b/docs/classes/YooKassa-Common-Exceptions-ForbiddenException.md @@ -152,6 +152,6 @@ public getResponseHeaders() : string[] --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-Exceptions-InternalServerError.md b/docs/classes/YooKassa-Common-Exceptions-InternalServerError.md index 257224f9..e9ab66b2 100644 --- a/docs/classes/YooKassa-Common-Exceptions-InternalServerError.md +++ b/docs/classes/YooKassa-Common-Exceptions-InternalServerError.md @@ -155,6 +155,6 @@ public getResponseHeaders() : string[] --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-Exceptions-InvalidPropertyException.md b/docs/classes/YooKassa-Common-Exceptions-InvalidPropertyException.md index 9ba83129..9a9df344 100644 --- a/docs/classes/YooKassa-Common-Exceptions-InvalidPropertyException.md +++ b/docs/classes/YooKassa-Common-Exceptions-InvalidPropertyException.md @@ -78,6 +78,6 @@ public getProperty() : string --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-Exceptions-InvalidPropertyValueException.md b/docs/classes/YooKassa-Common-Exceptions-InvalidPropertyValueException.md index 24a144aa..dbafd996 100644 --- a/docs/classes/YooKassa-Common-Exceptions-InvalidPropertyValueException.md +++ b/docs/classes/YooKassa-Common-Exceptions-InvalidPropertyValueException.md @@ -94,6 +94,6 @@ public getValue() : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-Exceptions-InvalidPropertyValueTypeException.md b/docs/classes/YooKassa-Common-Exceptions-InvalidPropertyValueTypeException.md index 0624349a..5c6c87c1 100644 --- a/docs/classes/YooKassa-Common-Exceptions-InvalidPropertyValueTypeException.md +++ b/docs/classes/YooKassa-Common-Exceptions-InvalidPropertyValueTypeException.md @@ -94,6 +94,6 @@ public getType() : string --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-Exceptions-InvalidRequestException.md b/docs/classes/YooKassa-Common-Exceptions-InvalidRequestException.md index 13245128..569dc90c 100644 --- a/docs/classes/YooKassa-Common-Exceptions-InvalidRequestException.md +++ b/docs/classes/YooKassa-Common-Exceptions-InvalidRequestException.md @@ -78,6 +78,6 @@ public getRequestObject() : \YooKassa\Common\AbstractRequest|null --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-Exceptions-JsonException.md b/docs/classes/YooKassa-Common-Exceptions-JsonException.md index 075737d3..87b7f26e 100644 --- a/docs/classes/YooKassa-Common-Exceptions-JsonException.md +++ b/docs/classes/YooKassa-Common-Exceptions-JsonException.md @@ -76,6 +76,6 @@ public __construct(mixed $message = "", mixed $code, mixed $previous = --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-Exceptions-NotFoundException.md b/docs/classes/YooKassa-Common-Exceptions-NotFoundException.md index ecc1fe12..4510af7e 100644 --- a/docs/classes/YooKassa-Common-Exceptions-NotFoundException.md +++ b/docs/classes/YooKassa-Common-Exceptions-NotFoundException.md @@ -152,6 +152,6 @@ public getResponseHeaders() : string[] --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-Exceptions-ResponseProcessingException.md b/docs/classes/YooKassa-Common-Exceptions-ResponseProcessingException.md index 101967a2..d7295423 100644 --- a/docs/classes/YooKassa-Common-Exceptions-ResponseProcessingException.md +++ b/docs/classes/YooKassa-Common-Exceptions-ResponseProcessingException.md @@ -152,6 +152,6 @@ public getResponseHeaders() : string[] --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-Exceptions-TooManyRequestsException.md b/docs/classes/YooKassa-Common-Exceptions-TooManyRequestsException.md index ef79ee55..3a4fc32c 100644 --- a/docs/classes/YooKassa-Common-Exceptions-TooManyRequestsException.md +++ b/docs/classes/YooKassa-Common-Exceptions-TooManyRequestsException.md @@ -152,6 +152,6 @@ public getResponseHeaders() : string[] --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-Exceptions-UnauthorizedException.md b/docs/classes/YooKassa-Common-Exceptions-UnauthorizedException.md index 62800dc7..452f3ad3 100644 --- a/docs/classes/YooKassa-Common-Exceptions-UnauthorizedException.md +++ b/docs/classes/YooKassa-Common-Exceptions-UnauthorizedException.md @@ -155,6 +155,6 @@ public getResponseHeaders() : string[] --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-HttpVerb.md b/docs/classes/YooKassa-Common-HttpVerb.md index 2ee1cea8..ff400ce4 100644 --- a/docs/classes/YooKassa-Common-HttpVerb.md +++ b/docs/classes/YooKassa-Common-HttpVerb.md @@ -193,6 +193,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-LoggerWrapper.md b/docs/classes/YooKassa-Common-LoggerWrapper.md index f565f611..cb5a5290 100644 --- a/docs/classes/YooKassa-Common-LoggerWrapper.md +++ b/docs/classes/YooKassa-Common-LoggerWrapper.md @@ -299,6 +299,6 @@ that are not necessarily wrong. --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Common-ResponseObject.md b/docs/classes/YooKassa-Common-ResponseObject.md index 43e41eb8..f510a5c0 100644 --- a/docs/classes/YooKassa-Common-ResponseObject.md +++ b/docs/classes/YooKassa-Common-ResponseObject.md @@ -162,6 +162,6 @@ public getHeaders() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Helpers-Config-ConfigurationLoader.md b/docs/classes/YooKassa-Helpers-Config-ConfigurationLoader.md index 03f5e5e2..dc321263 100644 --- a/docs/classes/YooKassa-Helpers-Config-ConfigurationLoader.md +++ b/docs/classes/YooKassa-Helpers-Config-ConfigurationLoader.md @@ -73,6 +73,6 @@ public load(mixed $filePath = null) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Helpers-Config-ConfigurationLoaderInterface.md b/docs/classes/YooKassa-Helpers-Config-ConfigurationLoaderInterface.md index 0b7e431f..9789f803 100644 --- a/docs/classes/YooKassa-Helpers-Config-ConfigurationLoaderInterface.md +++ b/docs/classes/YooKassa-Helpers-Config-ConfigurationLoaderInterface.md @@ -64,6 +64,6 @@ public load() : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Helpers-FiscalizationProvider.md b/docs/classes/YooKassa-Helpers-FiscalizationProvider.md index abfa4a86..023c4612 100644 --- a/docs/classes/YooKassa-Helpers-FiscalizationProvider.md +++ b/docs/classes/YooKassa-Helpers-FiscalizationProvider.md @@ -298,6 +298,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Helpers-ProductCode.md b/docs/classes/YooKassa-Helpers-ProductCode.md index 179df66a..6dfc31e1 100644 --- a/docs/classes/YooKassa-Helpers-ProductCode.md +++ b/docs/classes/YooKassa-Helpers-ProductCode.md @@ -635,6 +635,6 @@ public validate() : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Helpers-Random.md b/docs/classes/YooKassa-Helpers-Random.md index 2d61bcbc..db4faf52 100644 --- a/docs/classes/YooKassa-Helpers-Random.md +++ b/docs/classes/YooKassa-Helpers-Random.md @@ -243,6 +243,6 @@ Static public value(array $values, bool $useBest = true) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Helpers-RawHeadersParser.md b/docs/classes/YooKassa-Helpers-RawHeadersParser.md index f8391d5d..dbd6be16 100644 --- a/docs/classes/YooKassa-Helpers-RawHeadersParser.md +++ b/docs/classes/YooKassa-Helpers-RawHeadersParser.md @@ -57,6 +57,6 @@ Static public parse(mixed $rawHeaders) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Helpers-SecurityHelper.md b/docs/classes/YooKassa-Helpers-SecurityHelper.md index 36f3931f..0ca6fc02 100644 --- a/docs/classes/YooKassa-Helpers-SecurityHelper.md +++ b/docs/classes/YooKassa-Helpers-SecurityHelper.md @@ -66,6 +66,6 @@ public isIPTrusted($ip) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Helpers-StringObject.md b/docs/classes/YooKassa-Helpers-StringObject.md index 518ffdcd..439a426c 100644 --- a/docs/classes/YooKassa-Helpers-StringObject.md +++ b/docs/classes/YooKassa-Helpers-StringObject.md @@ -83,6 +83,6 @@ public __toString() : string --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Helpers-TypeCast.md b/docs/classes/YooKassa-Helpers-TypeCast.md index feabe2fc..b44142d0 100644 --- a/docs/classes/YooKassa-Helpers-TypeCast.md +++ b/docs/classes/YooKassa-Helpers-TypeCast.md @@ -162,6 +162,6 @@ Static public castToDateTime(string|int|\DateTime $value) : \DateTime|null --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Helpers-UUID.md b/docs/classes/YooKassa-Helpers-UUID.md index 5ec3cb2d..3a40d95f 100644 --- a/docs/classes/YooKassa-Helpers-UUID.md +++ b/docs/classes/YooKassa-Helpers-UUID.md @@ -57,6 +57,6 @@ Static public v4() : string --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Airline.md b/docs/classes/YooKassa-Model-Airline.md index fd067f46..3c626e5f 100644 --- a/docs/classes/YooKassa-Model-Airline.md +++ b/docs/classes/YooKassa-Model-Airline.md @@ -666,6 +666,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-AirlineInterface.md b/docs/classes/YooKassa-Model-AirlineInterface.md index e7f5b660..0e638cf5 100644 --- a/docs/classes/YooKassa-Model-AirlineInterface.md +++ b/docs/classes/YooKassa-Model-AirlineInterface.md @@ -108,6 +108,6 @@ public getLegs() : \YooKassa\Model\LegInterface[] --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-AmountInterface.md b/docs/classes/YooKassa-Model-AmountInterface.md index d192db60..7cf81377 100644 --- a/docs/classes/YooKassa-Model-AmountInterface.md +++ b/docs/classes/YooKassa-Model-AmountInterface.md @@ -165,6 +165,6 @@ public toArray() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-AuthorizationDetails.md b/docs/classes/YooKassa-Model-AuthorizationDetails.md index 805e7ddd..5a2410de 100644 --- a/docs/classes/YooKassa-Model-AuthorizationDetails.md +++ b/docs/classes/YooKassa-Model-AuthorizationDetails.md @@ -517,6 +517,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-AuthorizationDetailsInterface.md b/docs/classes/YooKassa-Model-AuthorizationDetailsInterface.md index 99243c52..4e1e846e 100644 --- a/docs/classes/YooKassa-Model-AuthorizationDetailsInterface.md +++ b/docs/classes/YooKassa-Model-AuthorizationDetailsInterface.md @@ -102,6 +102,6 @@ public getThreeDSecure() : \YooKassa\Model\ThreeDSecure|null --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-BaseDeal.md b/docs/classes/YooKassa-Model-BaseDeal.md index 29757c2c..9f7c7734 100644 --- a/docs/classes/YooKassa-Model-BaseDeal.md +++ b/docs/classes/YooKassa-Model-BaseDeal.md @@ -371,6 +371,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-CancellationDetails.md b/docs/classes/YooKassa-Model-CancellationDetails.md index 92222263..6711c606 100644 --- a/docs/classes/YooKassa-Model-CancellationDetails.md +++ b/docs/classes/YooKassa-Model-CancellationDetails.md @@ -449,6 +449,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-CancellationDetailsInterface.md b/docs/classes/YooKassa-Model-CancellationDetailsInterface.md index 3df12d8e..867a8d3c 100644 --- a/docs/classes/YooKassa-Model-CancellationDetailsInterface.md +++ b/docs/classes/YooKassa-Model-CancellationDetailsInterface.md @@ -83,6 +83,6 @@ public getReason() : string --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-CancellationDetailsPartyCode.md b/docs/classes/YooKassa-Model-CancellationDetailsPartyCode.md index 2d296b4d..3f775c36 100644 --- a/docs/classes/YooKassa-Model-CancellationDetailsPartyCode.md +++ b/docs/classes/YooKassa-Model-CancellationDetailsPartyCode.md @@ -163,6 +163,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-CancellationDetailsReasonCode.md b/docs/classes/YooKassa-Model-CancellationDetailsReasonCode.md index a7cbef05..f4f89951 100644 --- a/docs/classes/YooKassa-Model-CancellationDetailsReasonCode.md +++ b/docs/classes/YooKassa-Model-CancellationDetailsReasonCode.md @@ -340,6 +340,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Confirmation-AbstractConfirmation.md b/docs/classes/YooKassa-Model-Confirmation-AbstractConfirmation.md index 3a52756f..50a1c52a 100644 --- a/docs/classes/YooKassa-Model-Confirmation-AbstractConfirmation.md +++ b/docs/classes/YooKassa-Model-Confirmation-AbstractConfirmation.md @@ -442,6 +442,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Confirmation-ConfirmationCodeVerification.md b/docs/classes/YooKassa-Model-Confirmation-ConfirmationCodeVerification.md index ccc4395c..f039745c 100644 --- a/docs/classes/YooKassa-Model-Confirmation-ConfirmationCodeVerification.md +++ b/docs/classes/YooKassa-Model-Confirmation-ConfirmationCodeVerification.md @@ -435,6 +435,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Confirmation-ConfirmationEmbedded.md b/docs/classes/YooKassa-Model-Confirmation-ConfirmationEmbedded.md index 8f548658..ad14569a 100644 --- a/docs/classes/YooKassa-Model-Confirmation-ConfirmationEmbedded.md +++ b/docs/classes/YooKassa-Model-Confirmation-ConfirmationEmbedded.md @@ -481,6 +481,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Confirmation-ConfirmationExternal.md b/docs/classes/YooKassa-Model-Confirmation-ConfirmationExternal.md index e357ff5d..8493b4e1 100644 --- a/docs/classes/YooKassa-Model-Confirmation-ConfirmationExternal.md +++ b/docs/classes/YooKassa-Model-Confirmation-ConfirmationExternal.md @@ -436,6 +436,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Confirmation-ConfirmationFactory.md b/docs/classes/YooKassa-Model-Confirmation-ConfirmationFactory.md index 6416e4c8..56cf05d7 100644 --- a/docs/classes/YooKassa-Model-Confirmation-ConfirmationFactory.md +++ b/docs/classes/YooKassa-Model-Confirmation-ConfirmationFactory.md @@ -89,6 +89,6 @@ public factoryFromArray(array $data, string|null $type = null) : \YooKassa\Model --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Confirmation-ConfirmationMobileApplication.md b/docs/classes/YooKassa-Model-Confirmation-ConfirmationMobileApplication.md index 9219ea23..9c1413cd 100644 --- a/docs/classes/YooKassa-Model-Confirmation-ConfirmationMobileApplication.md +++ b/docs/classes/YooKassa-Model-Confirmation-ConfirmationMobileApplication.md @@ -559,6 +559,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Confirmation-ConfirmationQr.md b/docs/classes/YooKassa-Model-Confirmation-ConfirmationQr.md index 4270bcf3..08b39a26 100644 --- a/docs/classes/YooKassa-Model-Confirmation-ConfirmationQr.md +++ b/docs/classes/YooKassa-Model-Confirmation-ConfirmationQr.md @@ -494,6 +494,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Confirmation-ConfirmationRedirect.md b/docs/classes/YooKassa-Model-Confirmation-ConfirmationRedirect.md index 01b6f532..4c2704a1 100644 --- a/docs/classes/YooKassa-Model-Confirmation-ConfirmationRedirect.md +++ b/docs/classes/YooKassa-Model-Confirmation-ConfirmationRedirect.md @@ -602,6 +602,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-ConfirmationAttributes-AbstractConfirmationAttributes.md b/docs/classes/YooKassa-Model-ConfirmationAttributes-AbstractConfirmationAttributes.md index b376acdb..6f3106f9 100644 --- a/docs/classes/YooKassa-Model-ConfirmationAttributes-AbstractConfirmationAttributes.md +++ b/docs/classes/YooKassa-Model-ConfirmationAttributes-AbstractConfirmationAttributes.md @@ -413,6 +413,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesCodeVerification.md b/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesCodeVerification.md index d25f4e56..31a66c59 100644 --- a/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesCodeVerification.md +++ b/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesCodeVerification.md @@ -406,6 +406,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesEmbedded.md b/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesEmbedded.md index c09e9060..f04e11da 100644 --- a/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesEmbedded.md +++ b/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesEmbedded.md @@ -406,6 +406,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesExternal.md b/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesExternal.md index ac7d257f..ff52ed74 100644 --- a/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesExternal.md +++ b/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesExternal.md @@ -407,6 +407,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesFactory.md b/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesFactory.md index ed478618..4084a845 100644 --- a/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesFactory.md +++ b/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesFactory.md @@ -81,6 +81,6 @@ public factoryFromArray(array $data, string|null $type = null) : \YooKassa\Model --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesMobileApplication.md b/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesMobileApplication.md index c70747d3..f873ea9b 100644 --- a/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesMobileApplication.md +++ b/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesMobileApplication.md @@ -470,6 +470,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesQr.md b/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesQr.md index 49932ca5..f0ac21f4 100644 --- a/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesQr.md +++ b/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesQr.md @@ -406,6 +406,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesRedirect.md b/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesRedirect.md index 4b0aeede..d1a17082 100644 --- a/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesRedirect.md +++ b/docs/classes/YooKassa-Model-ConfirmationAttributes-ConfirmationAttributesRedirect.md @@ -513,6 +513,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-ConfirmationType.md b/docs/classes/YooKassa-Model-ConfirmationType.md index ce3d0cd3..d4703912 100644 --- a/docs/classes/YooKassa-Model-ConfirmationType.md +++ b/docs/classes/YooKassa-Model-ConfirmationType.md @@ -194,6 +194,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-CurrencyCode.md b/docs/classes/YooKassa-Model-CurrencyCode.md index 3f67bd9a..17d93dad 100644 --- a/docs/classes/YooKassa-Model-CurrencyCode.md +++ b/docs/classes/YooKassa-Model-CurrencyCode.md @@ -253,6 +253,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Deal-CaptureDealData.md b/docs/classes/YooKassa-Model-Deal-CaptureDealData.md index cf8c49ba..517e38df 100644 --- a/docs/classes/YooKassa-Model-Deal-CaptureDealData.md +++ b/docs/classes/YooKassa-Model-Deal-CaptureDealData.md @@ -415,6 +415,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Deal-DealBalanceAmount.md b/docs/classes/YooKassa-Model-Deal-DealBalanceAmount.md index 7aeb4d53..b2b976c0 100644 --- a/docs/classes/YooKassa-Model-Deal-DealBalanceAmount.md +++ b/docs/classes/YooKassa-Model-Deal-DealBalanceAmount.md @@ -481,6 +481,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Deal-DealStatus.md b/docs/classes/YooKassa-Model-Deal-DealStatus.md index 43998fd6..750840b2 100644 --- a/docs/classes/YooKassa-Model-Deal-DealStatus.md +++ b/docs/classes/YooKassa-Model-Deal-DealStatus.md @@ -144,6 +144,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Deal-DealType.md b/docs/classes/YooKassa-Model-Deal-DealType.md index 59b70beb..ae7ba3f5 100644 --- a/docs/classes/YooKassa-Model-Deal-DealType.md +++ b/docs/classes/YooKassa-Model-Deal-DealType.md @@ -133,6 +133,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Deal-FeeMoment.md b/docs/classes/YooKassa-Model-Deal-FeeMoment.md index 768771f0..9969d1df 100644 --- a/docs/classes/YooKassa-Model-Deal-FeeMoment.md +++ b/docs/classes/YooKassa-Model-Deal-FeeMoment.md @@ -143,6 +143,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Deal-PaymentDealInfo.md b/docs/classes/YooKassa-Model-Deal-PaymentDealInfo.md index 5d424454..49f7bfe7 100644 --- a/docs/classes/YooKassa-Model-Deal-PaymentDealInfo.md +++ b/docs/classes/YooKassa-Model-Deal-PaymentDealInfo.md @@ -469,6 +469,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Deal-PayoutDealInfo.md b/docs/classes/YooKassa-Model-Deal-PayoutDealInfo.md index ec4cd2f7..cd79cbd5 100644 --- a/docs/classes/YooKassa-Model-Deal-PayoutDealInfo.md +++ b/docs/classes/YooKassa-Model-Deal-PayoutDealInfo.md @@ -392,6 +392,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Deal-RefundDealData.md b/docs/classes/YooKassa-Model-Deal-RefundDealData.md index f4a3cb9b..85bb3fed 100644 --- a/docs/classes/YooKassa-Model-Deal-RefundDealData.md +++ b/docs/classes/YooKassa-Model-Deal-RefundDealData.md @@ -428,6 +428,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Deal-RefundDealInfo.md b/docs/classes/YooKassa-Model-Deal-RefundDealInfo.md index ab6218ac..27bfa3ec 100644 --- a/docs/classes/YooKassa-Model-Deal-RefundDealInfo.md +++ b/docs/classes/YooKassa-Model-Deal-RefundDealInfo.md @@ -482,6 +482,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Deal-SettlementPayoutPayment.md b/docs/classes/YooKassa-Model-Deal-SettlementPayoutPayment.md index ff2e6b37..bfe8c07a 100644 --- a/docs/classes/YooKassa-Model-Deal-SettlementPayoutPayment.md +++ b/docs/classes/YooKassa-Model-Deal-SettlementPayoutPayment.md @@ -448,6 +448,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Deal-SettlementPayoutPaymentType.md b/docs/classes/YooKassa-Model-Deal-SettlementPayoutPaymentType.md index 7a9b83c4..4af16242 100644 --- a/docs/classes/YooKassa-Model-Deal-SettlementPayoutPaymentType.md +++ b/docs/classes/YooKassa-Model-Deal-SettlementPayoutPaymentType.md @@ -131,6 +131,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Deal-SettlementPayoutRefund.md b/docs/classes/YooKassa-Model-Deal-SettlementPayoutRefund.md index ef7b6723..377e77b7 100644 --- a/docs/classes/YooKassa-Model-Deal-SettlementPayoutRefund.md +++ b/docs/classes/YooKassa-Model-Deal-SettlementPayoutRefund.md @@ -452,6 +452,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-DealInterface.md b/docs/classes/YooKassa-Model-DealInterface.md index 4fc1ac25..d7de9474 100644 --- a/docs/classes/YooKassa-Model-DealInterface.md +++ b/docs/classes/YooKassa-Model-DealInterface.md @@ -258,6 +258,6 @@ public getTest() : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-FraudData.md b/docs/classes/YooKassa-Model-FraudData.md index 0fc799dd..da6fac3b 100644 --- a/docs/classes/YooKassa-Model-FraudData.md +++ b/docs/classes/YooKassa-Model-FraudData.md @@ -414,6 +414,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Leg.md b/docs/classes/YooKassa-Model-Leg.md index a1b6bab1..68304392 100644 --- a/docs/classes/YooKassa-Model-Leg.md +++ b/docs/classes/YooKassa-Model-Leg.md @@ -584,6 +584,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-LegInterface.md b/docs/classes/YooKassa-Model-LegInterface.md index 6c657319..62617999 100644 --- a/docs/classes/YooKassa-Model-LegInterface.md +++ b/docs/classes/YooKassa-Model-LegInterface.md @@ -159,6 +159,6 @@ public setDepartureDate(\DateTime|string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Locale.md b/docs/classes/YooKassa-Model-Locale.md index 7ec79ed6..2cecfbe9 100644 --- a/docs/classes/YooKassa-Model-Locale.md +++ b/docs/classes/YooKassa-Model-Locale.md @@ -148,6 +148,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Metadata.md b/docs/classes/YooKassa-Model-Metadata.md index 4207345f..94b6359b 100644 --- a/docs/classes/YooKassa-Model-Metadata.md +++ b/docs/classes/YooKassa-Model-Metadata.md @@ -377,6 +377,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-MonetaryAmount.md b/docs/classes/YooKassa-Model-MonetaryAmount.md index 14e0564d..117b46e0 100644 --- a/docs/classes/YooKassa-Model-MonetaryAmount.md +++ b/docs/classes/YooKassa-Model-MonetaryAmount.md @@ -541,6 +541,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Notification-AbstractNotification.md b/docs/classes/YooKassa-Model-Notification-AbstractNotification.md index 90b008f4..f761c878 100644 --- a/docs/classes/YooKassa-Model-Notification-AbstractNotification.md +++ b/docs/classes/YooKassa-Model-Notification-AbstractNotification.md @@ -571,6 +571,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Notification-NotificationCanceled.md b/docs/classes/YooKassa-Model-Notification-NotificationCanceled.md index 8dae16c4..ae799024 100644 --- a/docs/classes/YooKassa-Model-Notification-NotificationCanceled.md +++ b/docs/classes/YooKassa-Model-Notification-NotificationCanceled.md @@ -596,6 +596,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Notification-NotificationDealClosed.md b/docs/classes/YooKassa-Model-Notification-NotificationDealClosed.md index c9eaed67..081c2ab9 100644 --- a/docs/classes/YooKassa-Model-Notification-NotificationDealClosed.md +++ b/docs/classes/YooKassa-Model-Notification-NotificationDealClosed.md @@ -596,6 +596,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Notification-NotificationFactory.md b/docs/classes/YooKassa-Model-Notification-NotificationFactory.md index 5e18a673..00898d36 100644 --- a/docs/classes/YooKassa-Model-Notification-NotificationFactory.md +++ b/docs/classes/YooKassa-Model-Notification-NotificationFactory.md @@ -138,6 +138,6 @@ public factory(array $data) : \YooKassa\Model\Notification\AbstractNotification --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Notification-NotificationInterface.md b/docs/classes/YooKassa-Model-Notification-NotificationInterface.md index 1043a274..480cee23 100644 --- a/docs/classes/YooKassa-Model-Notification-NotificationInterface.md +++ b/docs/classes/YooKassa-Model-Notification-NotificationInterface.md @@ -104,6 +104,6 @@ public getObject() : \YooKassa\Model\PaymentInterface|\YooKassa\Model\RefundInte --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Notification-NotificationPayoutCanceled.md b/docs/classes/YooKassa-Model-Notification-NotificationPayoutCanceled.md index d7230883..f20d9b2f 100644 --- a/docs/classes/YooKassa-Model-Notification-NotificationPayoutCanceled.md +++ b/docs/classes/YooKassa-Model-Notification-NotificationPayoutCanceled.md @@ -596,6 +596,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Notification-NotificationPayoutSucceeded.md b/docs/classes/YooKassa-Model-Notification-NotificationPayoutSucceeded.md index 5825511c..0d636930 100644 --- a/docs/classes/YooKassa-Model-Notification-NotificationPayoutSucceeded.md +++ b/docs/classes/YooKassa-Model-Notification-NotificationPayoutSucceeded.md @@ -596,6 +596,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Notification-NotificationRefundSucceeded.md b/docs/classes/YooKassa-Model-Notification-NotificationRefundSucceeded.md index 80b6b813..af509c4e 100644 --- a/docs/classes/YooKassa-Model-Notification-NotificationRefundSucceeded.md +++ b/docs/classes/YooKassa-Model-Notification-NotificationRefundSucceeded.md @@ -596,6 +596,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Notification-NotificationSucceeded.md b/docs/classes/YooKassa-Model-Notification-NotificationSucceeded.md index 60e520d4..56fe8fe6 100644 --- a/docs/classes/YooKassa-Model-Notification-NotificationSucceeded.md +++ b/docs/classes/YooKassa-Model-Notification-NotificationSucceeded.md @@ -596,6 +596,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Notification-NotificationWaitingForCapture.md b/docs/classes/YooKassa-Model-Notification-NotificationWaitingForCapture.md index 4513094a..bd6fc7f9 100644 --- a/docs/classes/YooKassa-Model-Notification-NotificationWaitingForCapture.md +++ b/docs/classes/YooKassa-Model-Notification-NotificationWaitingForCapture.md @@ -601,6 +601,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-NotificationEventType.md b/docs/classes/YooKassa-Model-NotificationEventType.md index 4b203358..1dd0c83f 100644 --- a/docs/classes/YooKassa-Model-NotificationEventType.md +++ b/docs/classes/YooKassa-Model-NotificationEventType.md @@ -203,6 +203,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-NotificationType.md b/docs/classes/YooKassa-Model-NotificationType.md index 1cb9db0e..05c1626b 100644 --- a/docs/classes/YooKassa-Model-NotificationType.md +++ b/docs/classes/YooKassa-Model-NotificationType.md @@ -131,6 +131,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Passenger.md b/docs/classes/YooKassa-Model-Passenger.md index 977b1e73..0b0ae618 100644 --- a/docs/classes/YooKassa-Model-Passenger.md +++ b/docs/classes/YooKassa-Model-Passenger.md @@ -490,6 +490,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PassengerInterface.md b/docs/classes/YooKassa-Model-PassengerInterface.md index e7dcb910..a11a6e04 100644 --- a/docs/classes/YooKassa-Model-PassengerInterface.md +++ b/docs/classes/YooKassa-Model-PassengerInterface.md @@ -118,6 +118,6 @@ public setLastName(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Payment.md b/docs/classes/YooKassa-Model-Payment.md index 169ab4f5..bc3fce06 100644 --- a/docs/classes/YooKassa-Model-Payment.md +++ b/docs/classes/YooKassa-Model-Payment.md @@ -1808,6 +1808,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-AbstractPaymentData.md b/docs/classes/YooKassa-Model-PaymentData-AbstractPaymentData.md index a1dab153..b8d1a4ef 100644 --- a/docs/classes/YooKassa-Model-PaymentData-AbstractPaymentData.md +++ b/docs/classes/YooKassa-Model-PaymentData-AbstractPaymentData.md @@ -392,6 +392,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-B2b-Sberbank-VatData.md b/docs/classes/YooKassa-Model-PaymentData-B2b-Sberbank-VatData.md index 009625f0..31d81288 100644 --- a/docs/classes/YooKassa-Model-PaymentData-B2b-Sberbank-VatData.md +++ b/docs/classes/YooKassa-Model-PaymentData-B2b-Sberbank-VatData.md @@ -516,6 +516,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-B2b-Sberbank-VatDataInterface.md b/docs/classes/YooKassa-Model-PaymentData-B2b-Sberbank-VatDataInterface.md index 427542a6..1a4104da 100644 --- a/docs/classes/YooKassa-Model-PaymentData-B2b-Sberbank-VatDataInterface.md +++ b/docs/classes/YooKassa-Model-PaymentData-B2b-Sberbank-VatDataInterface.md @@ -102,6 +102,6 @@ public getAmount() : \YooKassa\Model\AmountInterface --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-B2b-Sberbank-VatDataRate.md b/docs/classes/YooKassa-Model-PaymentData-B2b-Sberbank-VatDataRate.md index bc3b8a3b..431ac8e2 100644 --- a/docs/classes/YooKassa-Model-PaymentData-B2b-Sberbank-VatDataRate.md +++ b/docs/classes/YooKassa-Model-PaymentData-B2b-Sberbank-VatDataRate.md @@ -191,6 +191,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-B2b-Sberbank-VatDataType.md b/docs/classes/YooKassa-Model-PaymentData-B2b-Sberbank-VatDataType.md index c084368f..1c80c2cc 100644 --- a/docs/classes/YooKassa-Model-PaymentData-B2b-Sberbank-VatDataType.md +++ b/docs/classes/YooKassa-Model-PaymentData-B2b-Sberbank-VatDataType.md @@ -159,6 +159,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-ElectronicCertificate-ElectronicCertificateArticle.md b/docs/classes/YooKassa-Model-PaymentData-ElectronicCertificate-ElectronicCertificateArticle.md index 986df5d1..30eeaefd 100644 --- a/docs/classes/YooKassa-Model-PaymentData-ElectronicCertificate-ElectronicCertificateArticle.md +++ b/docs/classes/YooKassa-Model-PaymentData-ElectronicCertificate-ElectronicCertificateArticle.md @@ -815,6 +815,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-PaymentDataAlfaPay.md b/docs/classes/YooKassa-Model-PaymentData-PaymentDataAlfaPay.md index fd71cf92..9cfcf493 100644 --- a/docs/classes/YooKassa-Model-PaymentData-PaymentDataAlfaPay.md +++ b/docs/classes/YooKassa-Model-PaymentData-PaymentDataAlfaPay.md @@ -401,6 +401,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-PaymentDataAlfabank.md b/docs/classes/YooKassa-Model-PaymentData-PaymentDataAlfabank.md index 35dbf1be..056310af 100644 --- a/docs/classes/YooKassa-Model-PaymentData-PaymentDataAlfabank.md +++ b/docs/classes/YooKassa-Model-PaymentData-PaymentDataAlfabank.md @@ -446,6 +446,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-PaymentDataApplePay.md b/docs/classes/YooKassa-Model-PaymentData-PaymentDataApplePay.md index c977009d..e8df8a39 100644 --- a/docs/classes/YooKassa-Model-PaymentData-PaymentDataApplePay.md +++ b/docs/classes/YooKassa-Model-PaymentData-PaymentDataApplePay.md @@ -466,6 +466,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-PaymentDataB2bSberbank.md b/docs/classes/YooKassa-Model-PaymentData-PaymentDataB2bSberbank.md index dc13b491..7ba2638e 100644 --- a/docs/classes/YooKassa-Model-PaymentData-PaymentDataB2bSberbank.md +++ b/docs/classes/YooKassa-Model-PaymentData-PaymentDataB2bSberbank.md @@ -494,6 +494,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-PaymentDataBankCard.md b/docs/classes/YooKassa-Model-PaymentData-PaymentDataBankCard.md index a309c1da..3aa40262 100644 --- a/docs/classes/YooKassa-Model-PaymentData-PaymentDataBankCard.md +++ b/docs/classes/YooKassa-Model-PaymentData-PaymentDataBankCard.md @@ -440,6 +440,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-PaymentDataBankCardCard.md b/docs/classes/YooKassa-Model-PaymentData-PaymentDataBankCardCard.md index 1d94a009..b4cfab04 100644 --- a/docs/classes/YooKassa-Model-PaymentData-PaymentDataBankCardCard.md +++ b/docs/classes/YooKassa-Model-PaymentData-PaymentDataBankCardCard.md @@ -635,6 +635,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-PaymentDataCash.md b/docs/classes/YooKassa-Model-PaymentData-PaymentDataCash.md index acb571a1..61e52ad3 100644 --- a/docs/classes/YooKassa-Model-PaymentData-PaymentDataCash.md +++ b/docs/classes/YooKassa-Model-PaymentData-PaymentDataCash.md @@ -440,6 +440,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-PaymentDataElectronicCertificate.md b/docs/classes/YooKassa-Model-PaymentData-PaymentDataElectronicCertificate.md index fbc99ca0..14de911c 100644 --- a/docs/classes/YooKassa-Model-PaymentData-PaymentDataElectronicCertificate.md +++ b/docs/classes/YooKassa-Model-PaymentData-PaymentDataElectronicCertificate.md @@ -576,6 +576,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-PaymentDataFactory.md b/docs/classes/YooKassa-Model-PaymentData-PaymentDataFactory.md index b32ee9d5..5f9bcc32 100644 --- a/docs/classes/YooKassa-Model-PaymentData-PaymentDataFactory.md +++ b/docs/classes/YooKassa-Model-PaymentData-PaymentDataFactory.md @@ -89,6 +89,6 @@ public factoryFromArray(array $data, string|null $type = null) : \YooKassa\Model --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-PaymentDataGooglePay.md b/docs/classes/YooKassa-Model-PaymentData-PaymentDataGooglePay.md index 0f8f391b..b642e69f 100644 --- a/docs/classes/YooKassa-Model-PaymentData-PaymentDataGooglePay.md +++ b/docs/classes/YooKassa-Model-PaymentData-PaymentDataGooglePay.md @@ -494,6 +494,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-PaymentDataInstallments.md b/docs/classes/YooKassa-Model-PaymentData-PaymentDataInstallments.md index cbe9c47c..ee192859 100644 --- a/docs/classes/YooKassa-Model-PaymentData-PaymentDataInstallments.md +++ b/docs/classes/YooKassa-Model-PaymentData-PaymentDataInstallments.md @@ -391,6 +391,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-PaymentDataMobileBalance.md b/docs/classes/YooKassa-Model-PaymentData-PaymentDataMobileBalance.md index 16803ffe..24de7752 100644 --- a/docs/classes/YooKassa-Model-PaymentData-PaymentDataMobileBalance.md +++ b/docs/classes/YooKassa-Model-PaymentData-PaymentDataMobileBalance.md @@ -436,6 +436,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-PaymentDataQiwi.md b/docs/classes/YooKassa-Model-PaymentData-PaymentDataQiwi.md index 7f1bb890..67c78d58 100644 --- a/docs/classes/YooKassa-Model-PaymentData-PaymentDataQiwi.md +++ b/docs/classes/YooKassa-Model-PaymentData-PaymentDataQiwi.md @@ -433,6 +433,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-PaymentDataSberBnpl.md b/docs/classes/YooKassa-Model-PaymentData-PaymentDataSberBnpl.md index e97eabaa..24d465ff 100644 --- a/docs/classes/YooKassa-Model-PaymentData-PaymentDataSberBnpl.md +++ b/docs/classes/YooKassa-Model-PaymentData-PaymentDataSberBnpl.md @@ -438,6 +438,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-PaymentDataSberLoan.md b/docs/classes/YooKassa-Model-PaymentData-PaymentDataSberLoan.md index d418be47..708a84bb 100644 --- a/docs/classes/YooKassa-Model-PaymentData-PaymentDataSberLoan.md +++ b/docs/classes/YooKassa-Model-PaymentData-PaymentDataSberLoan.md @@ -385,6 +385,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-PaymentDataSberbank.md b/docs/classes/YooKassa-Model-PaymentData-PaymentDataSberbank.md index b978fa5d..0034713c 100644 --- a/docs/classes/YooKassa-Model-PaymentData-PaymentDataSberbank.md +++ b/docs/classes/YooKassa-Model-PaymentData-PaymentDataSberbank.md @@ -436,6 +436,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-PaymentDataSbp.md b/docs/classes/YooKassa-Model-PaymentData-PaymentDataSbp.md index bcbdbfda..9450e22b 100644 --- a/docs/classes/YooKassa-Model-PaymentData-PaymentDataSbp.md +++ b/docs/classes/YooKassa-Model-PaymentData-PaymentDataSbp.md @@ -385,6 +385,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-PaymentDataTinkoffBank.md b/docs/classes/YooKassa-Model-PaymentData-PaymentDataTinkoffBank.md index d4b776b1..43c38d9c 100644 --- a/docs/classes/YooKassa-Model-PaymentData-PaymentDataTinkoffBank.md +++ b/docs/classes/YooKassa-Model-PaymentData-PaymentDataTinkoffBank.md @@ -385,6 +385,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-PaymentDataWebmoney.md b/docs/classes/YooKassa-Model-PaymentData-PaymentDataWebmoney.md index b298a82b..9088dff6 100644 --- a/docs/classes/YooKassa-Model-PaymentData-PaymentDataWebmoney.md +++ b/docs/classes/YooKassa-Model-PaymentData-PaymentDataWebmoney.md @@ -392,6 +392,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-PaymentDataWechat.md b/docs/classes/YooKassa-Model-PaymentData-PaymentDataWechat.md index 976d2489..c56382a6 100644 --- a/docs/classes/YooKassa-Model-PaymentData-PaymentDataWechat.md +++ b/docs/classes/YooKassa-Model-PaymentData-PaymentDataWechat.md @@ -391,6 +391,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentData-PaymentDataYooMoney.md b/docs/classes/YooKassa-Model-PaymentData-PaymentDataYooMoney.md index 8fe4f0ba..167649cc 100644 --- a/docs/classes/YooKassa-Model-PaymentData-PaymentDataYooMoney.md +++ b/docs/classes/YooKassa-Model-PaymentData-PaymentDataYooMoney.md @@ -385,6 +385,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentInterface.md b/docs/classes/YooKassa-Model-PaymentInterface.md index 450cadd0..654ab399 100644 --- a/docs/classes/YooKassa-Model-PaymentInterface.md +++ b/docs/classes/YooKassa-Model-PaymentInterface.md @@ -428,6 +428,6 @@ public getDeal() : \YooKassa\Model\Deal\PaymentDealInfo --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-AbstractPaymentMethod.md b/docs/classes/YooKassa-Model-PaymentMethod-AbstractPaymentMethod.md index edecb83d..b38a1244 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-AbstractPaymentMethod.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-AbstractPaymentMethod.md @@ -541,6 +541,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-B2b-Sberbank-PayerBankDetails.md b/docs/classes/YooKassa-Model-PaymentMethod-B2b-Sberbank-PayerBankDetails.md index c201d615..ecbb5c53 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-B2b-Sberbank-PayerBankDetails.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-B2b-Sberbank-PayerBankDetails.md @@ -826,6 +826,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-B2b-Sberbank-PayerBankDetailsInterface.md b/docs/classes/YooKassa-Model-PaymentMethod-B2b-Sberbank-PayerBankDetailsInterface.md index eb660852..7c9463db 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-B2b-Sberbank-PayerBankDetailsInterface.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-B2b-Sberbank-PayerBankDetailsInterface.md @@ -216,6 +216,6 @@ public getAccount() : string --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-BankCard.md b/docs/classes/YooKassa-Model-PaymentMethod-BankCard.md index a5af1be8..35c724ce 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-BankCard.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-BankCard.md @@ -855,6 +855,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-BankCardSource.md b/docs/classes/YooKassa-Model-PaymentMethod-BankCardSource.md index c78d1b66..02a694cd 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-BankCardSource.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-BankCardSource.md @@ -159,6 +159,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-ElectronicCertificate-ElectronicCertificate.md b/docs/classes/YooKassa-Model-PaymentMethod-ElectronicCertificate-ElectronicCertificate.md index ec87664a..e2289cb7 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-ElectronicCertificate-ElectronicCertificate.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-ElectronicCertificate-ElectronicCertificate.md @@ -629,6 +629,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-ElectronicCertificate-ElectronicCertificateApprovedPaymentArticle.md b/docs/classes/YooKassa-Model-PaymentMethod-ElectronicCertificate-ElectronicCertificateApprovedPaymentArticle.md index 4b0b0b14..22e72db6 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-ElectronicCertificate-ElectronicCertificateApprovedPaymentArticle.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-ElectronicCertificate-ElectronicCertificateApprovedPaymentArticle.md @@ -632,6 +632,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-ElectronicCertificate-ElectronicCertificatePaymentData.md b/docs/classes/YooKassa-Model-PaymentMethod-ElectronicCertificate-ElectronicCertificatePaymentData.md index f2bafeb2..8418870f 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-ElectronicCertificate-ElectronicCertificatePaymentData.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-ElectronicCertificate-ElectronicCertificatePaymentData.md @@ -463,6 +463,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodAlfaBank.md b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodAlfaBank.md index fe66e0d2..e59816cd 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodAlfaBank.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodAlfaBank.md @@ -609,6 +609,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodAlfaPay.md b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodAlfaPay.md index ed869123..82503fd2 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodAlfaPay.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodAlfaPay.md @@ -815,6 +815,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodApplePay.md b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodApplePay.md index 94965f01..18ac3c55 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodApplePay.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodApplePay.md @@ -549,6 +549,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodB2bSberbank.md b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodB2bSberbank.md index 6dc26040..0d4e6a2b 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodB2bSberbank.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodB2bSberbank.md @@ -724,6 +724,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodBankCard.md b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodBankCard.md index 3c89d494..afb79b1f 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodBankCard.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodBankCard.md @@ -781,6 +781,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodCardType.md b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodCardType.md index d1ad3235..4a0ee512 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodCardType.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodCardType.md @@ -261,6 +261,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodCash.md b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodCash.md index d7784476..c790cad2 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodCash.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodCash.md @@ -549,6 +549,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodElectronicCertificate.md b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodElectronicCertificate.md index 73050736..ebe920d4 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodElectronicCertificate.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodElectronicCertificate.md @@ -727,6 +727,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodFactory.md b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodFactory.md index 711afba5..92a91421 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodFactory.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodFactory.md @@ -103,6 +103,6 @@ public factoryFromArray(array $data, string|null $type = null) : \YooKassa\Model --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodGooglePay.md b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodGooglePay.md index 86784657..e4419381 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodGooglePay.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodGooglePay.md @@ -549,6 +549,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodInstallments.md b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodInstallments.md index bb2b16b1..bc74db52 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodInstallments.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodInstallments.md @@ -555,6 +555,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodMobileBalance.md b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodMobileBalance.md index d334d7ed..112beb44 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodMobileBalance.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodMobileBalance.md @@ -603,6 +603,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodPsb.md b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodPsb.md index 884fcd04..6b80ff6d 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodPsb.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodPsb.md @@ -542,6 +542,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodQiwi.md b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodQiwi.md index 3bfdd995..ecc4b2bc 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodQiwi.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodQiwi.md @@ -555,6 +555,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodSberBnpl.md b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodSberBnpl.md index e5a99a54..0156a11f 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodSberBnpl.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodSberBnpl.md @@ -552,6 +552,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodSberLoan.md b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodSberLoan.md index 2b0d79ca..f51118c7 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodSberLoan.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodSberLoan.md @@ -670,6 +670,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodSberbank.md b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodSberbank.md index 0e1e5574..0382b50a 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodSberbank.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodSberbank.md @@ -853,6 +853,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodSbp.md b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodSbp.md index 39a3e405..8daa65b5 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodSbp.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodSbp.md @@ -536,6 +536,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodTinkoffBank.md b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodTinkoffBank.md index aff9b153..72212052 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodTinkoffBank.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodTinkoffBank.md @@ -536,6 +536,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodUnknown.md b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodUnknown.md index 16753f3c..93784f5b 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodUnknown.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodUnknown.md @@ -542,6 +542,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodWebmoney.md b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodWebmoney.md index a3b2bc60..b00ea54f 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodWebmoney.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodWebmoney.md @@ -555,6 +555,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodWechat.md b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodWechat.md index 9042b42c..3b0dcb23 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodWechat.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodWechat.md @@ -542,6 +542,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodYooMoney.md b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodYooMoney.md index d417278a..88473492 100644 --- a/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodYooMoney.md +++ b/docs/classes/YooKassa-Model-PaymentMethod-PaymentMethodYooMoney.md @@ -616,6 +616,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentMethodType.md b/docs/classes/YooKassa-Model-PaymentMethodType.md index 681e3819..e8dac112 100644 --- a/docs/classes/YooKassa-Model-PaymentMethodType.md +++ b/docs/classes/YooKassa-Model-PaymentMethodType.md @@ -366,6 +366,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PaymentStatus.md b/docs/classes/YooKassa-Model-PaymentStatus.md index 5ab41638..f6fbb742 100644 --- a/docs/classes/YooKassa-Model-PaymentStatus.md +++ b/docs/classes/YooKassa-Model-PaymentStatus.md @@ -170,6 +170,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Payout-AbstractPayoutDestination.md b/docs/classes/YooKassa-Model-Payout-AbstractPayoutDestination.md index 9c9e908e..796c855f 100644 --- a/docs/classes/YooKassa-Model-Payout-AbstractPayoutDestination.md +++ b/docs/classes/YooKassa-Model-Payout-AbstractPayoutDestination.md @@ -392,6 +392,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Payout-IncomeReceipt.md b/docs/classes/YooKassa-Model-Payout-IncomeReceipt.md index 2d06ce03..eecfadaf 100644 --- a/docs/classes/YooKassa-Model-Payout-IncomeReceipt.md +++ b/docs/classes/YooKassa-Model-Payout-IncomeReceipt.md @@ -601,6 +601,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Payout-PayoutCancellationDetails.md b/docs/classes/YooKassa-Model-Payout-PayoutCancellationDetails.md index 94df100b..6953a342 100644 --- a/docs/classes/YooKassa-Model-Payout-PayoutCancellationDetails.md +++ b/docs/classes/YooKassa-Model-Payout-PayoutCancellationDetails.md @@ -448,6 +448,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Payout-PayoutCancellationDetailsPartyCode.md b/docs/classes/YooKassa-Model-Payout-PayoutCancellationDetailsPartyCode.md index 110a2771..abd39413 100644 --- a/docs/classes/YooKassa-Model-Payout-PayoutCancellationDetailsPartyCode.md +++ b/docs/classes/YooKassa-Model-Payout-PayoutCancellationDetailsPartyCode.md @@ -155,6 +155,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Payout-PayoutCancellationDetailsReasonCode.md b/docs/classes/YooKassa-Model-Payout-PayoutCancellationDetailsReasonCode.md index b482fd00..36a46ef1 100644 --- a/docs/classes/YooKassa-Model-Payout-PayoutCancellationDetailsReasonCode.md +++ b/docs/classes/YooKassa-Model-Payout-PayoutCancellationDetailsReasonCode.md @@ -255,6 +255,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Payout-PayoutDestinationBankCard.md b/docs/classes/YooKassa-Model-Payout-PayoutDestinationBankCard.md index 64803c7e..efa400c1 100644 --- a/docs/classes/YooKassa-Model-Payout-PayoutDestinationBankCard.md +++ b/docs/classes/YooKassa-Model-Payout-PayoutDestinationBankCard.md @@ -440,6 +440,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md b/docs/classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md index d702526c..34eb51ef 100644 --- a/docs/classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md +++ b/docs/classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md @@ -668,6 +668,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Payout-PayoutDestinationFactory.md b/docs/classes/YooKassa-Model-Payout-PayoutDestinationFactory.md index 37f4d5ee..173a942a 100644 --- a/docs/classes/YooKassa-Model-Payout-PayoutDestinationFactory.md +++ b/docs/classes/YooKassa-Model-Payout-PayoutDestinationFactory.md @@ -89,6 +89,6 @@ public factoryFromArray(array $data, string|null $type = null) : \YooKassa\Model --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Payout-PayoutDestinationSbp.md b/docs/classes/YooKassa-Model-Payout-PayoutDestinationSbp.md index 0ba7fde2..1cc0ae6e 100644 --- a/docs/classes/YooKassa-Model-Payout-PayoutDestinationSbp.md +++ b/docs/classes/YooKassa-Model-Payout-PayoutDestinationSbp.md @@ -586,6 +586,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Payout-PayoutDestinationType.md b/docs/classes/YooKassa-Model-Payout-PayoutDestinationType.md index b0c5bd27..aa7729d3 100644 --- a/docs/classes/YooKassa-Model-Payout-PayoutDestinationType.md +++ b/docs/classes/YooKassa-Model-Payout-PayoutDestinationType.md @@ -125,6 +125,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Payout-PayoutDestinationYooMoney.md b/docs/classes/YooKassa-Model-Payout-PayoutDestinationYooMoney.md index 58b7b50a..5d4a793b 100644 --- a/docs/classes/YooKassa-Model-Payout-PayoutDestinationYooMoney.md +++ b/docs/classes/YooKassa-Model-Payout-PayoutDestinationYooMoney.md @@ -465,6 +465,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Payout-PayoutSelfEmployed.md b/docs/classes/YooKassa-Model-Payout-PayoutSelfEmployed.md index e474f849..f3804913 100644 --- a/docs/classes/YooKassa-Model-Payout-PayoutSelfEmployed.md +++ b/docs/classes/YooKassa-Model-Payout-PayoutSelfEmployed.md @@ -398,6 +398,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Payout-SbpParticipantBank.md b/docs/classes/YooKassa-Model-Payout-SbpParticipantBank.md index 1be835d7..24b3eae7 100644 --- a/docs/classes/YooKassa-Model-Payout-SbpParticipantBank.md +++ b/docs/classes/YooKassa-Model-Payout-SbpParticipantBank.md @@ -462,6 +462,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Payout.md b/docs/classes/YooKassa-Model-Payout.md index ac781ab4..cee2bad8 100644 --- a/docs/classes/YooKassa-Model-Payout.md +++ b/docs/classes/YooKassa-Model-Payout.md @@ -1083,6 +1083,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PayoutInterface.md b/docs/classes/YooKassa-Model-PayoutInterface.md index 8de91684..38f35332 100644 --- a/docs/classes/YooKassa-Model-PayoutInterface.md +++ b/docs/classes/YooKassa-Model-PayoutInterface.md @@ -238,6 +238,6 @@ public getTest() : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PayoutStatus.md b/docs/classes/YooKassa-Model-PayoutStatus.md index 024e5669..250482ae 100644 --- a/docs/classes/YooKassa-Model-PayoutStatus.md +++ b/docs/classes/YooKassa-Model-PayoutStatus.md @@ -159,6 +159,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PersonalData-PersonalData.md b/docs/classes/YooKassa-Model-PersonalData-PersonalData.md index e0fbc0ed..507d63b3 100644 --- a/docs/classes/YooKassa-Model-PersonalData-PersonalData.md +++ b/docs/classes/YooKassa-Model-PersonalData-PersonalData.md @@ -776,6 +776,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetails.md b/docs/classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetails.md index 5db05acf..8b2dc518 100644 --- a/docs/classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetails.md +++ b/docs/classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetails.md @@ -421,6 +421,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetailsPartyCode.md b/docs/classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetailsPartyCode.md index 929435a1..9339b4d0 100644 --- a/docs/classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetailsPartyCode.md +++ b/docs/classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetailsPartyCode.md @@ -133,6 +133,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetailsReasonCode.md b/docs/classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetailsReasonCode.md index 62a92df8..65c45a3c 100644 --- a/docs/classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetailsReasonCode.md +++ b/docs/classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetailsReasonCode.md @@ -133,6 +133,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PersonalData-PersonalDataInterface.md b/docs/classes/YooKassa-Model-PersonalData-PersonalDataInterface.md index 5a391248..a087392e 100644 --- a/docs/classes/YooKassa-Model-PersonalData-PersonalDataInterface.md +++ b/docs/classes/YooKassa-Model-PersonalData-PersonalDataInterface.md @@ -357,6 +357,6 @@ public setMetadata(\YooKassa\Model\Metadata|array|null $metadata = null) : $this --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PersonalData-PersonalDataStatus.md b/docs/classes/YooKassa-Model-PersonalData-PersonalDataStatus.md index be4e96ba..b71fb326 100644 --- a/docs/classes/YooKassa-Model-PersonalData-PersonalDataStatus.md +++ b/docs/classes/YooKassa-Model-PersonalData-PersonalDataStatus.md @@ -169,6 +169,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-PersonalData-PersonalDataType.md b/docs/classes/YooKassa-Model-PersonalData-PersonalDataType.md index 1d7f1ede..bb840b41 100644 --- a/docs/classes/YooKassa-Model-PersonalData-PersonalDataType.md +++ b/docs/classes/YooKassa-Model-PersonalData-PersonalDataType.md @@ -145,6 +145,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Receipt-AdditionalUserProps.md b/docs/classes/YooKassa-Model-Receipt-AdditionalUserProps.md index 402bd97f..4ac52935 100644 --- a/docs/classes/YooKassa-Model-Receipt-AdditionalUserProps.md +++ b/docs/classes/YooKassa-Model-Receipt-AdditionalUserProps.md @@ -469,6 +469,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Receipt-AgentType.md b/docs/classes/YooKassa-Model-Receipt-AgentType.md index f89d52f8..943a8c14 100644 --- a/docs/classes/YooKassa-Model-Receipt-AgentType.md +++ b/docs/classes/YooKassa-Model-Receipt-AgentType.md @@ -207,6 +207,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Receipt-IndustryDetails.md b/docs/classes/YooKassa-Model-Receipt-IndustryDetails.md index 5a443f49..034e1dda 100644 --- a/docs/classes/YooKassa-Model-Receipt-IndustryDetails.md +++ b/docs/classes/YooKassa-Model-Receipt-IndustryDetails.md @@ -633,6 +633,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Receipt-MarkCodeInfo.md b/docs/classes/YooKassa-Model-Receipt-MarkCodeInfo.md index 79f8d99e..7c211a2b 100644 --- a/docs/classes/YooKassa-Model-Receipt-MarkCodeInfo.md +++ b/docs/classes/YooKassa-Model-Receipt-MarkCodeInfo.md @@ -965,6 +965,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Receipt-MarkQuantity.md b/docs/classes/YooKassa-Model-Receipt-MarkQuantity.md index 21cbc34d..f7678f25 100644 --- a/docs/classes/YooKassa-Model-Receipt-MarkQuantity.md +++ b/docs/classes/YooKassa-Model-Receipt-MarkQuantity.md @@ -461,6 +461,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Receipt-OperationalDetails.md b/docs/classes/YooKassa-Model-Receipt-OperationalDetails.md index 7eef6812..d067da40 100644 --- a/docs/classes/YooKassa-Model-Receipt-OperationalDetails.md +++ b/docs/classes/YooKassa-Model-Receipt-OperationalDetails.md @@ -558,6 +558,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Receipt-PaymentMode.md b/docs/classes/YooKassa-Model-Receipt-PaymentMode.md index ff381c2c..6e3a55c5 100644 --- a/docs/classes/YooKassa-Model-Receipt-PaymentMode.md +++ b/docs/classes/YooKassa-Model-Receipt-PaymentMode.md @@ -193,6 +193,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Receipt-PaymentSubject.md b/docs/classes/YooKassa-Model-Receipt-PaymentSubject.md index 7e4e764a..63bda60c 100644 --- a/docs/classes/YooKassa-Model-Receipt-PaymentSubject.md +++ b/docs/classes/YooKassa-Model-Receipt-PaymentSubject.md @@ -453,6 +453,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Receipt-ReceiptItemAmount.md b/docs/classes/YooKassa-Model-Receipt-ReceiptItemAmount.md index 83575228..4e0da965 100644 --- a/docs/classes/YooKassa-Model-Receipt-ReceiptItemAmount.md +++ b/docs/classes/YooKassa-Model-Receipt-ReceiptItemAmount.md @@ -538,6 +538,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md b/docs/classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md index 4b357b5a..1dbf2b9d 100644 --- a/docs/classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md +++ b/docs/classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md @@ -366,6 +366,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Receipt-SettlementType.md b/docs/classes/YooKassa-Model-Receipt-SettlementType.md index dc992d57..1dd2b52d 100644 --- a/docs/classes/YooKassa-Model-Receipt-SettlementType.md +++ b/docs/classes/YooKassa-Model-Receipt-SettlementType.md @@ -172,6 +172,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Receipt.md b/docs/classes/YooKassa-Model-Receipt.md index 817ef9f1..9e73088a 100644 --- a/docs/classes/YooKassa-Model-Receipt.md +++ b/docs/classes/YooKassa-Model-Receipt.md @@ -1049,6 +1049,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-ReceiptCustomer.md b/docs/classes/YooKassa-Model-ReceiptCustomer.md index 1fa5628d..e6c95ef8 100644 --- a/docs/classes/YooKassa-Model-ReceiptCustomer.md +++ b/docs/classes/YooKassa-Model-ReceiptCustomer.md @@ -608,6 +608,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-ReceiptCustomerInterface.md b/docs/classes/YooKassa-Model-ReceiptCustomerInterface.md index ef4536ff..81e29c7d 100644 --- a/docs/classes/YooKassa-Model-ReceiptCustomerInterface.md +++ b/docs/classes/YooKassa-Model-ReceiptCustomerInterface.md @@ -140,6 +140,6 @@ public jsonSerialize() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-ReceiptInterface.md b/docs/classes/YooKassa-Model-ReceiptInterface.md index da670282..dc652595 100644 --- a/docs/classes/YooKassa-Model-ReceiptInterface.md +++ b/docs/classes/YooKassa-Model-ReceiptInterface.md @@ -181,6 +181,6 @@ public normalize(\YooKassa\Model\AmountInterface $orderAmount, bool $withShippin --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-ReceiptItem.md b/docs/classes/YooKassa-Model-ReceiptItem.md index acd058b6..68476c53 100644 --- a/docs/classes/YooKassa-Model-ReceiptItem.md +++ b/docs/classes/YooKassa-Model-ReceiptItem.md @@ -1707,6 +1707,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-ReceiptItemInterface.md b/docs/classes/YooKassa-Model-ReceiptItemInterface.md index 4b1bf3a9..013a4088 100644 --- a/docs/classes/YooKassa-Model-ReceiptItemInterface.md +++ b/docs/classes/YooKassa-Model-ReceiptItemInterface.md @@ -436,6 +436,6 @@ public isShipping() : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-ReceiptRegistrationStatus.md b/docs/classes/YooKassa-Model-ReceiptRegistrationStatus.md index 121fd9e5..b9d900ef 100644 --- a/docs/classes/YooKassa-Model-ReceiptRegistrationStatus.md +++ b/docs/classes/YooKassa-Model-ReceiptRegistrationStatus.md @@ -159,6 +159,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-ReceiptType.md b/docs/classes/YooKassa-Model-ReceiptType.md index 15f2d9ed..1e46ab2f 100644 --- a/docs/classes/YooKassa-Model-ReceiptType.md +++ b/docs/classes/YooKassa-Model-ReceiptType.md @@ -159,6 +159,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Recipient.md b/docs/classes/YooKassa-Model-Recipient.md index 821806bf..8c066181 100644 --- a/docs/classes/YooKassa-Model-Recipient.md +++ b/docs/classes/YooKassa-Model-Recipient.md @@ -494,6 +494,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-RecipientInterface.md b/docs/classes/YooKassa-Model-RecipientInterface.md index f4325991..6241a292 100644 --- a/docs/classes/YooKassa-Model-RecipientInterface.md +++ b/docs/classes/YooKassa-Model-RecipientInterface.md @@ -94,6 +94,6 @@ public getGatewayId() : string --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Refund.md b/docs/classes/YooKassa-Model-Refund.md index 7bd7b265..20b1cfba 100644 --- a/docs/classes/YooKassa-Model-Refund.md +++ b/docs/classes/YooKassa-Model-Refund.md @@ -1015,6 +1015,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-RefundCancellationDetails.md b/docs/classes/YooKassa-Model-RefundCancellationDetails.md index 85d5d556..5c7b4f43 100644 --- a/docs/classes/YooKassa-Model-RefundCancellationDetails.md +++ b/docs/classes/YooKassa-Model-RefundCancellationDetails.md @@ -462,6 +462,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-RefundCancellationDetailsPartyCode.md b/docs/classes/YooKassa-Model-RefundCancellationDetailsPartyCode.md index 1f0dc655..e2506d6f 100644 --- a/docs/classes/YooKassa-Model-RefundCancellationDetailsPartyCode.md +++ b/docs/classes/YooKassa-Model-RefundCancellationDetailsPartyCode.md @@ -168,6 +168,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-RefundCancellationDetailsReasonCode.md b/docs/classes/YooKassa-Model-RefundCancellationDetailsReasonCode.md index 216a70cc..06c5da9b 100644 --- a/docs/classes/YooKassa-Model-RefundCancellationDetailsReasonCode.md +++ b/docs/classes/YooKassa-Model-RefundCancellationDetailsReasonCode.md @@ -236,6 +236,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-RefundInterface.md b/docs/classes/YooKassa-Model-RefundInterface.md index dfc6d08c..d42b15fc 100644 --- a/docs/classes/YooKassa-Model-RefundInterface.md +++ b/docs/classes/YooKassa-Model-RefundInterface.md @@ -218,6 +218,6 @@ public getDeal() : \YooKassa\Model\Deal\RefundDealInfo --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-RefundStatus.md b/docs/classes/YooKassa-Model-RefundStatus.md index f7d274cd..4940bd84 100644 --- a/docs/classes/YooKassa-Model-RefundStatus.md +++ b/docs/classes/YooKassa-Model-RefundStatus.md @@ -153,6 +153,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Requestor.md b/docs/classes/YooKassa-Model-Requestor.md index d4a79a42..ad728f64 100644 --- a/docs/classes/YooKassa-Model-Requestor.md +++ b/docs/classes/YooKassa-Model-Requestor.md @@ -637,6 +637,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-RequestorInterface.md b/docs/classes/YooKassa-Model-RequestorInterface.md index 079ef9bd..664cc71c 100644 --- a/docs/classes/YooKassa-Model-RequestorInterface.md +++ b/docs/classes/YooKassa-Model-RequestorInterface.md @@ -217,6 +217,6 @@ public setClientName(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-SafeDeal.md b/docs/classes/YooKassa-Model-SafeDeal.md index f3cea758..eac267fd 100644 --- a/docs/classes/YooKassa-Model-SafeDeal.md +++ b/docs/classes/YooKassa-Model-SafeDeal.md @@ -858,6 +858,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployed.md b/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployed.md index d7aa5809..b5027714 100644 --- a/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployed.md +++ b/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployed.md @@ -747,6 +747,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmation.md b/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmation.md index 9df044be..0a23428e 100644 --- a/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmation.md +++ b/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmation.md @@ -398,6 +398,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationFactory.md b/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationFactory.md index 0c3f5f63..3e3c98c8 100644 --- a/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationFactory.md +++ b/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationFactory.md @@ -89,6 +89,6 @@ public factoryFromArray(array $data, string|null $type = null) : \YooKassa\Model --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationRedirect.md b/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationRedirect.md index 32bb125e..a61b1b0e 100644 --- a/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationRedirect.md +++ b/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationRedirect.md @@ -461,6 +461,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationType.md b/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationType.md index ddc69fdf..4b4b7cc9 100644 --- a/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationType.md +++ b/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationType.md @@ -142,6 +142,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md b/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md index 282d602f..1b32e424 100644 --- a/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md +++ b/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md @@ -372,6 +372,6 @@ public setTest(bool $test) : $this --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedStatus.md b/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedStatus.md index 0ef87ee9..f6d9fc1b 100644 --- a/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedStatus.md +++ b/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedStatus.md @@ -167,6 +167,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Settlement.md b/docs/classes/YooKassa-Model-Settlement.md index 8404ba6f..97e79f25 100644 --- a/docs/classes/YooKassa-Model-Settlement.md +++ b/docs/classes/YooKassa-Model-Settlement.md @@ -448,6 +448,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-SettlementInterface.md b/docs/classes/YooKassa-Model-SettlementInterface.md index 99e97a0b..aa43b732 100644 --- a/docs/classes/YooKassa-Model-SettlementInterface.md +++ b/docs/classes/YooKassa-Model-SettlementInterface.md @@ -83,6 +83,6 @@ public getAmount() : \YooKassa\Model\AmountInterface --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Source.md b/docs/classes/YooKassa-Model-Source.md index efbc5516..90f4d6b3 100644 --- a/docs/classes/YooKassa-Model-Source.md +++ b/docs/classes/YooKassa-Model-Source.md @@ -570,6 +570,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-SourceInterface.md b/docs/classes/YooKassa-Model-SourceInterface.md index 08b66844..9eb4df38 100644 --- a/docs/classes/YooKassa-Model-SourceInterface.md +++ b/docs/classes/YooKassa-Model-SourceInterface.md @@ -207,6 +207,6 @@ public setPlatformFeeAmount(\YooKassa\Model\AmountInterface|array $value) : mixe --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Supplier.md b/docs/classes/YooKassa-Model-Supplier.md index c266e77d..f30f432f 100644 --- a/docs/classes/YooKassa-Model-Supplier.md +++ b/docs/classes/YooKassa-Model-Supplier.md @@ -505,6 +505,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-SupplierInterface.md b/docs/classes/YooKassa-Model-SupplierInterface.md index 0a326327..77b74723 100644 --- a/docs/classes/YooKassa-Model-SupplierInterface.md +++ b/docs/classes/YooKassa-Model-SupplierInterface.md @@ -177,6 +177,6 @@ public setInn(string|null $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-ThreeDSecure.md b/docs/classes/YooKassa-Model-ThreeDSecure.md index c3793ab3..b559cfe7 100644 --- a/docs/classes/YooKassa-Model-ThreeDSecure.md +++ b/docs/classes/YooKassa-Model-ThreeDSecure.md @@ -397,6 +397,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Transfer.md b/docs/classes/YooKassa-Model-Transfer.md index 24116262..8a7469be 100644 --- a/docs/classes/YooKassa-Model-Transfer.md +++ b/docs/classes/YooKassa-Model-Transfer.md @@ -814,6 +814,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-TransferInterface.md b/docs/classes/YooKassa-Model-TransferInterface.md index b40c340b..06830d2e 100644 --- a/docs/classes/YooKassa-Model-TransferInterface.md +++ b/docs/classes/YooKassa-Model-TransferInterface.md @@ -374,6 +374,6 @@ public hasMetadata() : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-TransferStatus.md b/docs/classes/YooKassa-Model-TransferStatus.md index 616e8220..ff87b69e 100644 --- a/docs/classes/YooKassa-Model-TransferStatus.md +++ b/docs/classes/YooKassa-Model-TransferStatus.md @@ -170,6 +170,6 @@ Static public valueExists(mixed $value) : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Model-Webhook-Webhook.md b/docs/classes/YooKassa-Model-Webhook-Webhook.md index 2886a1d4..e473206e 100644 --- a/docs/classes/YooKassa-Model-Webhook-Webhook.md +++ b/docs/classes/YooKassa-Model-Webhook-Webhook.md @@ -500,6 +500,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Deals-AbstractDealResponse.md b/docs/classes/YooKassa-Request-Deals-AbstractDealResponse.md index 86610582..d8a11256 100644 --- a/docs/classes/YooKassa-Request-Deals-AbstractDealResponse.md +++ b/docs/classes/YooKassa-Request-Deals-AbstractDealResponse.md @@ -861,6 +861,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Deals-CreateDealRequest.md b/docs/classes/YooKassa-Request-Deals-CreateDealRequest.md index 25509e20..98661d11 100644 --- a/docs/classes/YooKassa-Request-Deals-CreateDealRequest.md +++ b/docs/classes/YooKassa-Request-Deals-CreateDealRequest.md @@ -787,6 +787,6 @@ protected setValidationError(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Deals-CreateDealRequestBuilder.md b/docs/classes/YooKassa-Request-Deals-CreateDealRequestBuilder.md index ffb2a399..861d7ea8 100644 --- a/docs/classes/YooKassa-Request-Deals-CreateDealRequestBuilder.md +++ b/docs/classes/YooKassa-Request-Deals-CreateDealRequestBuilder.md @@ -353,6 +353,6 @@ protected initCurrentObject() : \YooKassa\Request\Deals\CreateDealRequest --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Deals-CreateDealRequestInterface.md b/docs/classes/YooKassa-Request-Deals-CreateDealRequestInterface.md index 1ae2c70b..8c7ab557 100644 --- a/docs/classes/YooKassa-Request-Deals-CreateDealRequestInterface.md +++ b/docs/classes/YooKassa-Request-Deals-CreateDealRequestInterface.md @@ -286,6 +286,6 @@ public setMetadata(\YooKassa\Model\Metadata|array|null $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Deals-CreateDealRequestSerializer.md b/docs/classes/YooKassa-Request-Deals-CreateDealRequestSerializer.md index eaac9991..e9525264 100644 --- a/docs/classes/YooKassa-Request-Deals-CreateDealRequestSerializer.md +++ b/docs/classes/YooKassa-Request-Deals-CreateDealRequestSerializer.md @@ -65,6 +65,6 @@ public serialize(\YooKassa\Request\Deals\CreateDealRequestInterface $request) : --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Deals-CreateDealResponse.md b/docs/classes/YooKassa-Request-Deals-CreateDealResponse.md index a38d9ecf..cfc03342 100644 --- a/docs/classes/YooKassa-Request-Deals-CreateDealResponse.md +++ b/docs/classes/YooKassa-Request-Deals-CreateDealResponse.md @@ -860,6 +860,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Deals-DealResponse.md b/docs/classes/YooKassa-Request-Deals-DealResponse.md index 6f672d7d..213dc38e 100644 --- a/docs/classes/YooKassa-Request-Deals-DealResponse.md +++ b/docs/classes/YooKassa-Request-Deals-DealResponse.md @@ -860,6 +860,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Deals-DealsRequest.md b/docs/classes/YooKassa-Request-Deals-DealsRequest.md index 167221fc..ae348796 100644 --- a/docs/classes/YooKassa-Request-Deals-DealsRequest.md +++ b/docs/classes/YooKassa-Request-Deals-DealsRequest.md @@ -1394,6 +1394,6 @@ protected setValidationError(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Deals-DealsRequestBuilder.md b/docs/classes/YooKassa-Request-Deals-DealsRequestBuilder.md index a1085359..8de39ad3 100644 --- a/docs/classes/YooKassa-Request-Deals-DealsRequestBuilder.md +++ b/docs/classes/YooKassa-Request-Deals-DealsRequestBuilder.md @@ -498,6 +498,6 @@ protected initCurrentObject() : \YooKassa\Request\Deals\DealsRequest --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Deals-DealsRequestInterface.md b/docs/classes/YooKassa-Request-Deals-DealsRequestInterface.md index f2aa86d1..e137bc42 100644 --- a/docs/classes/YooKassa-Request-Deals-DealsRequestInterface.md +++ b/docs/classes/YooKassa-Request-Deals-DealsRequestInterface.md @@ -765,6 +765,6 @@ public setFullTextSearch(string $value) : void --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Deals-DealsRequestSerializer.md b/docs/classes/YooKassa-Request-Deals-DealsRequestSerializer.md index f30c5637..0db39ee6 100644 --- a/docs/classes/YooKassa-Request-Deals-DealsRequestSerializer.md +++ b/docs/classes/YooKassa-Request-Deals-DealsRequestSerializer.md @@ -65,6 +65,6 @@ public serialize(\YooKassa\Request\Deals\DealsRequest|\YooKassa\Request\Deals\De --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Deals-DealsResponse.md b/docs/classes/YooKassa-Request-Deals-DealsResponse.md index 71e38a8a..d721a1c9 100644 --- a/docs/classes/YooKassa-Request-Deals-DealsResponse.md +++ b/docs/classes/YooKassa-Request-Deals-DealsResponse.md @@ -389,6 +389,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payments-AbstractPaymentResponse.md b/docs/classes/YooKassa-Request-Payments-AbstractPaymentResponse.md index dc15c4d3..95482d90 100644 --- a/docs/classes/YooKassa-Request-Payments-AbstractPaymentResponse.md +++ b/docs/classes/YooKassa-Request-Payments-AbstractPaymentResponse.md @@ -1850,6 +1850,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payments-CreatePaymentRequest.md b/docs/classes/YooKassa-Request-Payments-CreatePaymentRequest.md index 77ffc769..c37f1991 100644 --- a/docs/classes/YooKassa-Request-Payments-CreatePaymentRequest.md +++ b/docs/classes/YooKassa-Request-Payments-CreatePaymentRequest.md @@ -1965,6 +1965,6 @@ protected setValidationError(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md b/docs/classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md index f53618d7..e17ac809 100644 --- a/docs/classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md +++ b/docs/classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md @@ -1130,6 +1130,6 @@ protected initCurrentObject() : \YooKassa\Request\Payments\CreatePaymentRequest --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md b/docs/classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md index aea1c46d..ac74784a 100644 --- a/docs/classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md +++ b/docs/classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md @@ -1016,6 +1016,6 @@ public setMerchantCustomerId(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payments-CreatePaymentRequestSerializer.md b/docs/classes/YooKassa-Request-Payments-CreatePaymentRequestSerializer.md index 668cfcb1..a4fe5745 100644 --- a/docs/classes/YooKassa-Request-Payments-CreatePaymentRequestSerializer.md +++ b/docs/classes/YooKassa-Request-Payments-CreatePaymentRequestSerializer.md @@ -65,6 +65,6 @@ public serialize(\YooKassa\Request\Payments\CreatePaymentRequestInterface $reque --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payments-CreatePaymentResponse.md b/docs/classes/YooKassa-Request-Payments-CreatePaymentResponse.md index 0f2d3a07..0878bd9f 100644 --- a/docs/classes/YooKassa-Request-Payments-CreatePaymentResponse.md +++ b/docs/classes/YooKassa-Request-Payments-CreatePaymentResponse.md @@ -1844,6 +1844,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payments-Payment-CancelResponse.md b/docs/classes/YooKassa-Request-Payments-Payment-CancelResponse.md index d6d575b3..7fa52f15 100644 --- a/docs/classes/YooKassa-Request-Payments-Payment-CancelResponse.md +++ b/docs/classes/YooKassa-Request-Payments-Payment-CancelResponse.md @@ -1844,6 +1844,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payments-Payment-CreateCaptureRequest.md b/docs/classes/YooKassa-Request-Payments-Payment-CreateCaptureRequest.md index 34a36a41..7da2c894 100644 --- a/docs/classes/YooKassa-Request-Payments-Payment-CreateCaptureRequest.md +++ b/docs/classes/YooKassa-Request-Payments-Payment-CreateCaptureRequest.md @@ -860,6 +860,6 @@ protected setValidationError(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payments-Payment-CreateCaptureRequestBuilder.md b/docs/classes/YooKassa-Request-Payments-Payment-CreateCaptureRequestBuilder.md index 17713002..fab74d81 100644 --- a/docs/classes/YooKassa-Request-Payments-Payment-CreateCaptureRequestBuilder.md +++ b/docs/classes/YooKassa-Request-Payments-Payment-CreateCaptureRequestBuilder.md @@ -529,6 +529,6 @@ protected initCurrentObject() : \YooKassa\Request\Payments\Payment\CreateCapture --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payments-Payment-CreateCaptureRequestInterface.md b/docs/classes/YooKassa-Request-Payments-Payment-CreateCaptureRequestInterface.md index 4d41162b..be75d4f6 100644 --- a/docs/classes/YooKassa-Request-Payments-Payment-CreateCaptureRequestInterface.md +++ b/docs/classes/YooKassa-Request-Payments-Payment-CreateCaptureRequestInterface.md @@ -296,6 +296,6 @@ public setDeal(\YooKassa\Model\Deal\PaymentDealInfo|array|null $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payments-Payment-CreateCaptureRequestSerializer.md b/docs/classes/YooKassa-Request-Payments-Payment-CreateCaptureRequestSerializer.md index 3a935051..afb1587d 100644 --- a/docs/classes/YooKassa-Request-Payments-Payment-CreateCaptureRequestSerializer.md +++ b/docs/classes/YooKassa-Request-Payments-Payment-CreateCaptureRequestSerializer.md @@ -65,6 +65,6 @@ public serialize(\YooKassa\Request\Payments\Payment\CreateCaptureRequestInterfac --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payments-Payment-CreateCaptureResponse.md b/docs/classes/YooKassa-Request-Payments-Payment-CreateCaptureResponse.md index 0f0e1052..3dda8d46 100644 --- a/docs/classes/YooKassa-Request-Payments-Payment-CreateCaptureResponse.md +++ b/docs/classes/YooKassa-Request-Payments-Payment-CreateCaptureResponse.md @@ -1844,6 +1844,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payments-PaymentResponse.md b/docs/classes/YooKassa-Request-Payments-PaymentResponse.md index 84aebd7d..c10db875 100644 --- a/docs/classes/YooKassa-Request-Payments-PaymentResponse.md +++ b/docs/classes/YooKassa-Request-Payments-PaymentResponse.md @@ -1844,6 +1844,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payments-PaymentsRequest.md b/docs/classes/YooKassa-Request-Payments-PaymentsRequest.md index 8a6ce520..132aff7e 100644 --- a/docs/classes/YooKassa-Request-Payments-PaymentsRequest.md +++ b/docs/classes/YooKassa-Request-Payments-PaymentsRequest.md @@ -1384,6 +1384,6 @@ protected setValidationError(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md b/docs/classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md index b77566fb..8b3de9d1 100644 --- a/docs/classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md +++ b/docs/classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md @@ -498,6 +498,6 @@ protected initCurrentObject() : \YooKassa\Request\Payments\PaymentsRequest --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payments-PaymentsRequestInterface.md b/docs/classes/YooKassa-Request-Payments-PaymentsRequestInterface.md index d9a36863..c5c52621 100644 --- a/docs/classes/YooKassa-Request-Payments-PaymentsRequestInterface.md +++ b/docs/classes/YooKassa-Request-Payments-PaymentsRequestInterface.md @@ -765,6 +765,6 @@ public setPaymentMethod(string $value) : void --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payments-PaymentsRequestSerializer.md b/docs/classes/YooKassa-Request-Payments-PaymentsRequestSerializer.md index 40fd7e62..3e1370a6 100644 --- a/docs/classes/YooKassa-Request-Payments-PaymentsRequestSerializer.md +++ b/docs/classes/YooKassa-Request-Payments-PaymentsRequestSerializer.md @@ -65,6 +65,6 @@ public serialize(\YooKassa\Request\Payments\PaymentsRequestInterface $request) : --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payments-PaymentsResponse.md b/docs/classes/YooKassa-Request-Payments-PaymentsResponse.md index b1b45c41..67612ec8 100644 --- a/docs/classes/YooKassa-Request-Payments-PaymentsResponse.md +++ b/docs/classes/YooKassa-Request-Payments-PaymentsResponse.md @@ -389,6 +389,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payouts-AbstractPayoutResponse.md b/docs/classes/YooKassa-Request-Payouts-AbstractPayoutResponse.md index 9a08cd6b..13b29972 100644 --- a/docs/classes/YooKassa-Request-Payouts-AbstractPayoutResponse.md +++ b/docs/classes/YooKassa-Request-Payouts-AbstractPayoutResponse.md @@ -1100,6 +1100,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payouts-CreatePayoutRequest.md b/docs/classes/YooKassa-Request-Payouts-CreatePayoutRequest.md index cbc1df62..13f9fd2e 100644 --- a/docs/classes/YooKassa-Request-Payouts-CreatePayoutRequest.md +++ b/docs/classes/YooKassa-Request-Payouts-CreatePayoutRequest.md @@ -1289,6 +1289,6 @@ protected setValidationError(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md b/docs/classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md index c84eb13c..cf0e7a68 100644 --- a/docs/classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md +++ b/docs/classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md @@ -519,6 +519,6 @@ protected initCurrentObject() : \YooKassa\Request\Payouts\CreatePayoutRequest --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md b/docs/classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md index d72b9d9b..0a125c64 100644 --- a/docs/classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md +++ b/docs/classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md @@ -655,6 +655,6 @@ public setMetadata(\YooKassa\Model\Metadata|array|null $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payouts-CreatePayoutRequestSerializer.md b/docs/classes/YooKassa-Request-Payouts-CreatePayoutRequestSerializer.md index 1fa29a1e..8120ed80 100644 --- a/docs/classes/YooKassa-Request-Payouts-CreatePayoutRequestSerializer.md +++ b/docs/classes/YooKassa-Request-Payouts-CreatePayoutRequestSerializer.md @@ -65,6 +65,6 @@ public serialize(\YooKassa\Request\Payouts\CreatePayoutRequestInterface $request --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payouts-CreatePayoutResponse.md b/docs/classes/YooKassa-Request-Payouts-CreatePayoutResponse.md index da3fd37b..79468158 100644 --- a/docs/classes/YooKassa-Request-Payouts-CreatePayoutResponse.md +++ b/docs/classes/YooKassa-Request-Payouts-CreatePayoutResponse.md @@ -1101,6 +1101,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payouts-IncomeReceiptData.md b/docs/classes/YooKassa-Request-Payouts-IncomeReceiptData.md index 1a2aa924..c6cbfb1b 100644 --- a/docs/classes/YooKassa-Request-Payouts-IncomeReceiptData.md +++ b/docs/classes/YooKassa-Request-Payouts-IncomeReceiptData.md @@ -468,6 +468,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payouts-PayoutDestinationData-AbstractPayoutDestinationData.md b/docs/classes/YooKassa-Request-Payouts-PayoutDestinationData-AbstractPayoutDestinationData.md index fde0906d..f9d4ca68 100644 --- a/docs/classes/YooKassa-Request-Payouts-PayoutDestinationData-AbstractPayoutDestinationData.md +++ b/docs/classes/YooKassa-Request-Payouts-PayoutDestinationData-AbstractPayoutDestinationData.md @@ -407,6 +407,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataBankCard.md b/docs/classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataBankCard.md index 2a1605d4..81d588b3 100644 --- a/docs/classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataBankCard.md +++ b/docs/classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataBankCard.md @@ -455,6 +455,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataBankCardCard.md b/docs/classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataBankCardCard.md index 9aa2619b..a192f35d 100644 --- a/docs/classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataBankCardCard.md +++ b/docs/classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataBankCardCard.md @@ -395,6 +395,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataFactory.md b/docs/classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataFactory.md index 88df9f61..c46bd5ff 100644 --- a/docs/classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataFactory.md +++ b/docs/classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataFactory.md @@ -92,6 +92,6 @@ public factoryFromArray(array $data, string|null $type = null) : \YooKassa\Reque --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataSbp.md b/docs/classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataSbp.md index c242f804..9a0d28f1 100644 --- a/docs/classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataSbp.md +++ b/docs/classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataSbp.md @@ -537,6 +537,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataYooMoney.md b/docs/classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataYooMoney.md index f066e45d..21902bd2 100644 --- a/docs/classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataYooMoney.md +++ b/docs/classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataYooMoney.md @@ -483,6 +483,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payouts-PayoutPersonalData.md b/docs/classes/YooKassa-Request-Payouts-PayoutPersonalData.md index 9b827b83..7719cb1b 100644 --- a/docs/classes/YooKassa-Request-Payouts-PayoutPersonalData.md +++ b/docs/classes/YooKassa-Request-Payouts-PayoutPersonalData.md @@ -380,6 +380,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payouts-PayoutResponse.md b/docs/classes/YooKassa-Request-Payouts-PayoutResponse.md index abec1ba5..de23aba1 100644 --- a/docs/classes/YooKassa-Request-Payouts-PayoutResponse.md +++ b/docs/classes/YooKassa-Request-Payouts-PayoutResponse.md @@ -1101,6 +1101,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payouts-PayoutSelfEmployedInfo.md b/docs/classes/YooKassa-Request-Payouts-PayoutSelfEmployedInfo.md index 39bb7b82..ab320159 100644 --- a/docs/classes/YooKassa-Request-Payouts-PayoutSelfEmployedInfo.md +++ b/docs/classes/YooKassa-Request-Payouts-PayoutSelfEmployedInfo.md @@ -401,6 +401,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Payouts-SbpBanksResponse.md b/docs/classes/YooKassa-Request-Payouts-SbpBanksResponse.md index 4647d78f..609c2236 100644 --- a/docs/classes/YooKassa-Request-Payouts-SbpBanksResponse.md +++ b/docs/classes/YooKassa-Request-Payouts-SbpBanksResponse.md @@ -403,6 +403,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md b/docs/classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md index f10f21c4..9924acd1 100644 --- a/docs/classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md +++ b/docs/classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md @@ -865,6 +865,6 @@ protected setValidationError(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestBuilder.md b/docs/classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestBuilder.md index 72de6961..27890de6 100644 --- a/docs/classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestBuilder.md +++ b/docs/classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestBuilder.md @@ -363,6 +363,6 @@ protected initCurrentObject() : \YooKassa\Request\PersonalData\CreatePersonalDat --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md b/docs/classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md index 6aad4b50..796f0e25 100644 --- a/docs/classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md +++ b/docs/classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md @@ -377,6 +377,6 @@ public toArray() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestSerializer.md b/docs/classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestSerializer.md index 60f97b34..883b0fd2 100644 --- a/docs/classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestSerializer.md +++ b/docs/classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestSerializer.md @@ -65,6 +65,6 @@ public serialize(\YooKassa\Request\PersonalData\CreatePersonalDataRequestInterfa --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-PersonalData-PersonalDataResponse.md b/docs/classes/YooKassa-Request-PersonalData-PersonalDataResponse.md index 0ca1a8f0..c9fd929a 100644 --- a/docs/classes/YooKassa-Request-PersonalData-PersonalDataResponse.md +++ b/docs/classes/YooKassa-Request-PersonalData-PersonalDataResponse.md @@ -785,6 +785,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md b/docs/classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md index d2c5988c..3f5fcfdc 100644 --- a/docs/classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md +++ b/docs/classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md @@ -1461,6 +1461,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md b/docs/classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md index 54509f0d..709b7056 100644 --- a/docs/classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md +++ b/docs/classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md @@ -1094,6 +1094,6 @@ protected setValidationError(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md b/docs/classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md index 5a5ec463..11dfcda8 100644 --- a/docs/classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md +++ b/docs/classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md @@ -598,6 +598,6 @@ protected initCurrentObject() : \YooKassa\Request\Receipts\CreatePostReceiptRequ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md b/docs/classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md index b7b32b06..0a889ccb 100644 --- a/docs/classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md +++ b/docs/classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md @@ -618,6 +618,6 @@ public notEmpty() : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Receipts-CreatePostReceiptRequestSerializer.md b/docs/classes/YooKassa-Request-Receipts-CreatePostReceiptRequestSerializer.md index 1aa7567d..d33dbd4c 100644 --- a/docs/classes/YooKassa-Request-Receipts-CreatePostReceiptRequestSerializer.md +++ b/docs/classes/YooKassa-Request-Receipts-CreatePostReceiptRequestSerializer.md @@ -65,6 +65,6 @@ public serialize(\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface $r --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Receipts-PaymentReceiptResponse.md b/docs/classes/YooKassa-Request-Receipts-PaymentReceiptResponse.md index a10bb9e0..b5978498 100644 --- a/docs/classes/YooKassa-Request-Receipts-PaymentReceiptResponse.md +++ b/docs/classes/YooKassa-Request-Receipts-PaymentReceiptResponse.md @@ -1565,6 +1565,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Receipts-ReceiptResponseFactory.md b/docs/classes/YooKassa-Request-Receipts-ReceiptResponseFactory.md index 881f11c2..43da95a7 100644 --- a/docs/classes/YooKassa-Request-Receipts-ReceiptResponseFactory.md +++ b/docs/classes/YooKassa-Request-Receipts-ReceiptResponseFactory.md @@ -65,6 +65,6 @@ public factory(array $data) : \YooKassa\Request\Receipts\AbstractReceiptResponse --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Receipts-ReceiptResponseInterface.md b/docs/classes/YooKassa-Request-Receipts-ReceiptResponseInterface.md index 1cf1f3e5..f0399eb7 100644 --- a/docs/classes/YooKassa-Request-Receipts-ReceiptResponseInterface.md +++ b/docs/classes/YooKassa-Request-Receipts-ReceiptResponseInterface.md @@ -214,6 +214,6 @@ public notEmpty() : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Receipts-ReceiptResponseItem.md b/docs/classes/YooKassa-Request-Receipts-ReceiptResponseItem.md index 44b705c2..321d12d1 100644 --- a/docs/classes/YooKassa-Request-Receipts-ReceiptResponseItem.md +++ b/docs/classes/YooKassa-Request-Receipts-ReceiptResponseItem.md @@ -1513,6 +1513,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md b/docs/classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md index f29dd0ab..4fadd5b0 100644 --- a/docs/classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md +++ b/docs/classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md @@ -378,6 +378,6 @@ public getSupplier() : \YooKassa\Model\SupplierInterface --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Receipts-ReceiptsRequest.md b/docs/classes/YooKassa-Request-Receipts-ReceiptsRequest.md index 640ce849..f97221a2 100644 --- a/docs/classes/YooKassa-Request-Receipts-ReceiptsRequest.md +++ b/docs/classes/YooKassa-Request-Receipts-ReceiptsRequest.md @@ -1144,6 +1144,6 @@ protected setValidationError(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md b/docs/classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md index 035a3f58..aa22c793 100644 --- a/docs/classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md +++ b/docs/classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md @@ -411,6 +411,6 @@ protected initCurrentObject() : \YooKassa\Request\Receipts\ReceiptsRequest --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md b/docs/classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md index 76d36cef..838c28c1 100644 --- a/docs/classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md +++ b/docs/classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md @@ -378,6 +378,6 @@ public hasLimit() : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Receipts-ReceiptsRequestSerializer.md b/docs/classes/YooKassa-Request-Receipts-ReceiptsRequestSerializer.md index e765a0de..94a8f08d 100644 --- a/docs/classes/YooKassa-Request-Receipts-ReceiptsRequestSerializer.md +++ b/docs/classes/YooKassa-Request-Receipts-ReceiptsRequestSerializer.md @@ -65,6 +65,6 @@ public serialize(\YooKassa\Request\Receipts\ReceiptsRequestInterface $request) : --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Receipts-ReceiptsResponse.md b/docs/classes/YooKassa-Request-Receipts-ReceiptsResponse.md index 306d1e18..a143ab9a 100644 --- a/docs/classes/YooKassa-Request-Receipts-ReceiptsResponse.md +++ b/docs/classes/YooKassa-Request-Receipts-ReceiptsResponse.md @@ -142,6 +142,6 @@ public hasNextCursor() : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Receipts-RefundReceiptResponse.md b/docs/classes/YooKassa-Request-Receipts-RefundReceiptResponse.md index dd8f36f5..d139f414 100644 --- a/docs/classes/YooKassa-Request-Receipts-RefundReceiptResponse.md +++ b/docs/classes/YooKassa-Request-Receipts-RefundReceiptResponse.md @@ -1565,6 +1565,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Receipts-SimpleReceiptResponse.md b/docs/classes/YooKassa-Request-Receipts-SimpleReceiptResponse.md index e6b2d6c1..9ca8172e 100644 --- a/docs/classes/YooKassa-Request-Receipts-SimpleReceiptResponse.md +++ b/docs/classes/YooKassa-Request-Receipts-SimpleReceiptResponse.md @@ -1482,6 +1482,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Refunds-AbstractRefundResponse.md b/docs/classes/YooKassa-Request-Refunds-AbstractRefundResponse.md index a6695943..1c115c7b 100644 --- a/docs/classes/YooKassa-Request-Refunds-AbstractRefundResponse.md +++ b/docs/classes/YooKassa-Request-Refunds-AbstractRefundResponse.md @@ -1032,6 +1032,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Refunds-CreateRefundRequest.md b/docs/classes/YooKassa-Request-Refunds-CreateRefundRequest.md index 3e3a1923..8720f6bd 100644 --- a/docs/classes/YooKassa-Request-Refunds-CreateRefundRequest.md +++ b/docs/classes/YooKassa-Request-Refunds-CreateRefundRequest.md @@ -979,6 +979,6 @@ protected setValidationError(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Refunds-CreateRefundRequestBuilder.md b/docs/classes/YooKassa-Request-Refunds-CreateRefundRequestBuilder.md index 11c38b53..85baa8b5 100644 --- a/docs/classes/YooKassa-Request-Refunds-CreateRefundRequestBuilder.md +++ b/docs/classes/YooKassa-Request-Refunds-CreateRefundRequestBuilder.md @@ -623,6 +623,6 @@ protected initCurrentObject() : \YooKassa\Request\Refunds\CreateRefundRequest --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md b/docs/classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md index 86170aa4..0f3ad847 100644 --- a/docs/classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md +++ b/docs/classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md @@ -339,6 +339,6 @@ public hasDeal() : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Refunds-CreateRefundRequestSerializer.md b/docs/classes/YooKassa-Request-Refunds-CreateRefundRequestSerializer.md index 168acd06..77e451ab 100644 --- a/docs/classes/YooKassa-Request-Refunds-CreateRefundRequestSerializer.md +++ b/docs/classes/YooKassa-Request-Refunds-CreateRefundRequestSerializer.md @@ -65,6 +65,6 @@ public serialize(\YooKassa\Request\Refunds\CreateRefundRequestInterface $request --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Refunds-CreateRefundResponse.md b/docs/classes/YooKassa-Request-Refunds-CreateRefundResponse.md index 8e1bb89a..ffdca088 100644 --- a/docs/classes/YooKassa-Request-Refunds-CreateRefundResponse.md +++ b/docs/classes/YooKassa-Request-Refunds-CreateRefundResponse.md @@ -1028,6 +1028,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Refunds-RefundResponse.md b/docs/classes/YooKassa-Request-Refunds-RefundResponse.md index 3bd1c3e2..e011fd53 100644 --- a/docs/classes/YooKassa-Request-Refunds-RefundResponse.md +++ b/docs/classes/YooKassa-Request-Refunds-RefundResponse.md @@ -1028,6 +1028,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Refunds-RefundsRequest.md b/docs/classes/YooKassa-Request-Refunds-RefundsRequest.md index 41c0e1aa..1bb78a06 100644 --- a/docs/classes/YooKassa-Request-Refunds-RefundsRequest.md +++ b/docs/classes/YooKassa-Request-Refunds-RefundsRequest.md @@ -1072,6 +1072,6 @@ protected setValidationError(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md b/docs/classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md index 0e4bbd34..34b713fa 100644 --- a/docs/classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md +++ b/docs/classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md @@ -382,6 +382,6 @@ protected initCurrentObject() : \YooKassa\Request\Refunds\RefundsRequest --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Refunds-RefundsRequestInterface.md b/docs/classes/YooKassa-Request-Refunds-RefundsRequestInterface.md index 28e01c9f..b458c090 100644 --- a/docs/classes/YooKassa-Request-Refunds-RefundsRequestInterface.md +++ b/docs/classes/YooKassa-Request-Refunds-RefundsRequestInterface.md @@ -305,6 +305,6 @@ public hasCursor() : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Refunds-RefundsRequestSerializer.md b/docs/classes/YooKassa-Request-Refunds-RefundsRequestSerializer.md index cc3ad799..91a2926b 100644 --- a/docs/classes/YooKassa-Request-Refunds-RefundsRequestSerializer.md +++ b/docs/classes/YooKassa-Request-Refunds-RefundsRequestSerializer.md @@ -65,6 +65,6 @@ public serialize(\YooKassa\Request\Refunds\RefundsRequestInterface $request) : a --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Refunds-RefundsResponse.md b/docs/classes/YooKassa-Request-Refunds-RefundsResponse.md index 24a87b67..ada22e82 100644 --- a/docs/classes/YooKassa-Request-Refunds-RefundsResponse.md +++ b/docs/classes/YooKassa-Request-Refunds-RefundsResponse.md @@ -124,6 +124,6 @@ public hasNextCursor() : bool --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md b/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md index 87515f36..18e72756 100644 --- a/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md +++ b/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md @@ -659,6 +659,6 @@ protected setValidationError(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestBuilder.md b/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestBuilder.md index 7cb68037..df9c8244 100644 --- a/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestBuilder.md +++ b/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestBuilder.md @@ -252,6 +252,6 @@ protected initCurrentObject() : \YooKassa\Request\SelfEmployed\SelfEmployedReque --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmation.md b/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmation.md index f9405e4b..582b402d 100644 --- a/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmation.md +++ b/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmation.md @@ -377,6 +377,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmationFactory.md b/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmationFactory.md index cfd4a94d..0f132a0f 100644 --- a/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmationFactory.md +++ b/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmationFactory.md @@ -89,6 +89,6 @@ public factoryFromArray(array $data, string|null $type = null) : \YooKassa\Reque --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmationRedirect.md b/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmationRedirect.md index e1c4082e..9502555c 100644 --- a/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmationRedirect.md +++ b/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmationRedirect.md @@ -372,6 +372,6 @@ protected setType(string $value) : mixed --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestSerializer.md b/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestSerializer.md index b24894b1..49209224 100644 --- a/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestSerializer.md +++ b/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestSerializer.md @@ -65,6 +65,6 @@ public serialize(\YooKassa\Request\SelfEmployed\SelfEmployedRequest $request) : --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedResponse.md b/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedResponse.md index 23fecbfb..e783862c 100644 --- a/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedResponse.md +++ b/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedResponse.md @@ -754,6 +754,6 @@ protected getUnknownProperties() : array --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/classes/YooKassa-Request-Webhook-WebhookListResponse.md b/docs/classes/YooKassa-Request-Webhook-WebhookListResponse.md index 0741ee50..c7ba69de 100644 --- a/docs/classes/YooKassa-Request-Webhook-WebhookListResponse.md +++ b/docs/classes/YooKassa-Request-Webhook-WebhookListResponse.md @@ -101,6 +101,6 @@ public getType() : string --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/default.md b/docs/namespaces/default.md index 8e2bf011..29b789bb 100644 --- a/docs/namespaces/default.md +++ b/docs/namespaces/default.md @@ -52,6 +52,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-client.md b/docs/namespaces/yookassa-client.md index 4bf3d2e4..9eb7370a 100644 --- a/docs/namespaces/yookassa-client.md +++ b/docs/namespaces/yookassa-client.md @@ -33,6 +33,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-common-exceptions.md b/docs/namespaces/yookassa-common-exceptions.md index 7d506649..1049a770 100644 --- a/docs/namespaces/yookassa-common-exceptions.md +++ b/docs/namespaces/yookassa-common-exceptions.md @@ -41,6 +41,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-common.md b/docs/namespaces/yookassa-common.md index edf40cb2..91cda71c 100644 --- a/docs/namespaces/yookassa-common.md +++ b/docs/namespaces/yookassa-common.md @@ -38,6 +38,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-helpers-config.md b/docs/namespaces/yookassa-helpers-config.md index 6e14e4c1..0c33cbb7 100644 --- a/docs/namespaces/yookassa-helpers-config.md +++ b/docs/namespaces/yookassa-helpers-config.md @@ -31,6 +31,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-helpers.md b/docs/namespaces/yookassa-helpers.md index c283944f..40074eaa 100644 --- a/docs/namespaces/yookassa-helpers.md +++ b/docs/namespaces/yookassa-helpers.md @@ -36,6 +36,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-model-confirmation.md b/docs/namespaces/yookassa-model-confirmation.md index 21e21244..bee44169 100644 --- a/docs/namespaces/yookassa-model-confirmation.md +++ b/docs/namespaces/yookassa-model-confirmation.md @@ -32,6 +32,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-model-confirmationattributes.md b/docs/namespaces/yookassa-model-confirmationattributes.md index 65789580..efd0d183 100644 --- a/docs/namespaces/yookassa-model-confirmationattributes.md +++ b/docs/namespaces/yookassa-model-confirmationattributes.md @@ -32,6 +32,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-model-deal.md b/docs/namespaces/yookassa-model-deal.md index a1d1b5e4..f0e78204 100644 --- a/docs/namespaces/yookassa-model-deal.md +++ b/docs/namespaces/yookassa-model-deal.md @@ -36,6 +36,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-model-notification.md b/docs/namespaces/yookassa-model-notification.md index 7c75b34c..c6b28158 100644 --- a/docs/namespaces/yookassa-model-notification.md +++ b/docs/namespaces/yookassa-model-notification.md @@ -39,6 +39,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-model-paymentdata-b2b-sberbank.md b/docs/namespaces/yookassa-model-paymentdata-b2b-sberbank.md index e27de483..be988292 100644 --- a/docs/namespaces/yookassa-model-paymentdata-b2b-sberbank.md +++ b/docs/namespaces/yookassa-model-paymentdata-b2b-sberbank.md @@ -33,6 +33,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-model-paymentdata-b2b.md b/docs/namespaces/yookassa-model-paymentdata-b2b.md index be4b9208..6f34a7fd 100644 --- a/docs/namespaces/yookassa-model-paymentdata-b2b.md +++ b/docs/namespaces/yookassa-model-paymentdata-b2b.md @@ -23,6 +23,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-model-paymentdata-electroniccertificate.md b/docs/namespaces/yookassa-model-paymentdata-electroniccertificate.md index 1e2651a6..467dc466 100644 --- a/docs/namespaces/yookassa-model-paymentdata-electroniccertificate.md +++ b/docs/namespaces/yookassa-model-paymentdata-electroniccertificate.md @@ -25,6 +25,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-model-paymentdata.md b/docs/namespaces/yookassa-model-paymentdata.md index dc3d93e7..d97e6d36 100644 --- a/docs/namespaces/yookassa-model-paymentdata.md +++ b/docs/namespaces/yookassa-model-paymentdata.md @@ -51,6 +51,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-model-paymentmethod-b2b-sberbank.md b/docs/namespaces/yookassa-model-paymentmethod-b2b-sberbank.md index bb14ee08..c6158788 100644 --- a/docs/namespaces/yookassa-model-paymentmethod-b2b-sberbank.md +++ b/docs/namespaces/yookassa-model-paymentmethod-b2b-sberbank.md @@ -31,6 +31,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-model-paymentmethod-b2b.md b/docs/namespaces/yookassa-model-paymentmethod-b2b.md index d5b8f5d0..402de3b2 100644 --- a/docs/namespaces/yookassa-model-paymentmethod-b2b.md +++ b/docs/namespaces/yookassa-model-paymentmethod-b2b.md @@ -23,6 +23,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-model-paymentmethod-electroniccertificate.md b/docs/namespaces/yookassa-model-paymentmethod-electroniccertificate.md index a6966a31..4c071018 100644 --- a/docs/namespaces/yookassa-model-paymentmethod-electroniccertificate.md +++ b/docs/namespaces/yookassa-model-paymentmethod-electroniccertificate.md @@ -27,6 +27,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-model-paymentmethod.md b/docs/namespaces/yookassa-model-paymentmethod.md index ab191a36..cdd9a425 100644 --- a/docs/namespaces/yookassa-model-paymentmethod.md +++ b/docs/namespaces/yookassa-model-paymentmethod.md @@ -55,6 +55,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-model-payout.md b/docs/namespaces/yookassa-model-payout.md index a64b5fa2..95ee5597 100644 --- a/docs/namespaces/yookassa-model-payout.md +++ b/docs/namespaces/yookassa-model-payout.md @@ -37,6 +37,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-model-personaldata.md b/docs/namespaces/yookassa-model-personaldata.md index b20ed19b..62324519 100644 --- a/docs/namespaces/yookassa-model-personaldata.md +++ b/docs/namespaces/yookassa-model-personaldata.md @@ -36,6 +36,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-model-receipt.md b/docs/namespaces/yookassa-model-receipt.md index 214b052f..5ed2f9b6 100644 --- a/docs/namespaces/yookassa-model-receipt.md +++ b/docs/namespaces/yookassa-model-receipt.md @@ -35,6 +35,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-model-selfemployed.md b/docs/namespaces/yookassa-model-selfemployed.md index b72d7172..580f247d 100644 --- a/docs/namespaces/yookassa-model-selfemployed.md +++ b/docs/namespaces/yookassa-model-selfemployed.md @@ -36,6 +36,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-model-webhook.md b/docs/namespaces/yookassa-model-webhook.md index ee90581c..9ed9dca4 100644 --- a/docs/namespaces/yookassa-model-webhook.md +++ b/docs/namespaces/yookassa-model-webhook.md @@ -25,6 +25,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-model.md b/docs/namespaces/yookassa-model.md index 30f79d32..4ed8fed5 100644 --- a/docs/namespaces/yookassa-model.md +++ b/docs/namespaces/yookassa-model.md @@ -102,6 +102,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-request-deals.md b/docs/namespaces/yookassa-request-deals.md index 38f31472..7c9c7333 100644 --- a/docs/namespaces/yookassa-request-deals.md +++ b/docs/namespaces/yookassa-request-deals.md @@ -41,6 +41,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-request-payments-payment.md b/docs/namespaces/yookassa-request-payments-payment.md index 54afa7ed..9d993bda 100644 --- a/docs/namespaces/yookassa-request-payments-payment.md +++ b/docs/namespaces/yookassa-request-payments-payment.md @@ -35,6 +35,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-request-payments.md b/docs/namespaces/yookassa-request-payments.md index 10562301..8247d1de 100644 --- a/docs/namespaces/yookassa-request-payments.md +++ b/docs/namespaces/yookassa-request-payments.md @@ -45,6 +45,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-request-payouts-payoutdestinationdata.md b/docs/namespaces/yookassa-request-payouts-payoutdestinationdata.md index 7c41b4ff..33377bef 100644 --- a/docs/namespaces/yookassa-request-payouts-payoutdestinationdata.md +++ b/docs/namespaces/yookassa-request-payouts-payoutdestinationdata.md @@ -30,6 +30,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-request-payouts.md b/docs/namespaces/yookassa-request-payouts.md index 5547f578..6b9f6cd6 100644 --- a/docs/namespaces/yookassa-request-payouts.md +++ b/docs/namespaces/yookassa-request-payouts.md @@ -44,6 +44,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-request-personaldata.md b/docs/namespaces/yookassa-request-personaldata.md index 2b9d68d6..2b1869f6 100644 --- a/docs/namespaces/yookassa-request-personaldata.md +++ b/docs/namespaces/yookassa-request-personaldata.md @@ -34,6 +34,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-request-receipts.md b/docs/namespaces/yookassa-request-receipts.md index 2c13fe5a..9d3be1a5 100644 --- a/docs/namespaces/yookassa-request-receipts.md +++ b/docs/namespaces/yookassa-request-receipts.md @@ -46,6 +46,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-request-refunds.md b/docs/namespaces/yookassa-request-refunds.md index 04051a6f..30cd894e 100644 --- a/docs/namespaces/yookassa-request-refunds.md +++ b/docs/namespaces/yookassa-request-refunds.md @@ -41,6 +41,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-request-selfemployed.md b/docs/namespaces/yookassa-request-selfemployed.md index 0c1a9e1f..d5f63d8a 100644 --- a/docs/namespaces/yookassa-request-selfemployed.md +++ b/docs/namespaces/yookassa-request-selfemployed.md @@ -31,6 +31,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-request-webhook.md b/docs/namespaces/yookassa-request-webhook.md index ec71dca7..417d06ee 100644 --- a/docs/namespaces/yookassa-request-webhook.md +++ b/docs/namespaces/yookassa-request-webhook.md @@ -25,6 +25,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa-request.md b/docs/namespaces/yookassa-request.md index 8b07b685..fa625ccf 100644 --- a/docs/namespaces/yookassa-request.md +++ b/docs/namespaces/yookassa-request.md @@ -30,6 +30,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/namespaces/yookassa.md b/docs/namespaces/yookassa.md index 4cc07cb8..21cc6d86 100644 --- a/docs/namespaces/yookassa.md +++ b/docs/namespaces/yookassa.md @@ -33,6 +33,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/readme.md b/docs/readme.md index 19e8c4eb..1f3ae991 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -52,6 +52,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/reports/deprecated.md b/docs/reports/deprecated.md index 609674b3..7a71ceca 100644 --- a/docs/reports/deprecated.md +++ b/docs/reports/deprecated.md @@ -182,6 +182,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/reports/errors.md b/docs/reports/errors.md index b7d0822a..73042a77 100644 --- a/docs/reports/errors.md +++ b/docs/reports/errors.md @@ -18,6 +18,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/docs/reports/markers.md b/docs/reports/markers.md index ed9cabd9..fd82f56d 100644 --- a/docs/reports/markers.md +++ b/docs/reports/markers.md @@ -18,6 +18,6 @@ --- -This document was automatically generated from source code comments on 2026-07-06 using [phpDocumentor](http://www.phpdoc.org/) +This document was automatically generated from source code comments on 2026-07-07 using [phpDocumentor](http://www.phpdoc.org/) © 2026 YooMoney \ No newline at end of file diff --git a/lib/Client.php b/lib/Client.php index 427fbfef..06daf9c9 100644 --- a/lib/Client.php +++ b/lib/Client.php @@ -122,7 +122,7 @@ class Client extends BaseClient /** * Текущая версия библиотеки */ - const SDK_VERSION = '2.13.3'; + const SDK_VERSION = '2.14.0'; /** * Получить список платежей магазина diff --git a/lib/Common/AbstractPaymentRequestBuilder.php b/lib/Common/AbstractPaymentRequestBuilder.php index fe032a7d..78181be4 100644 --- a/lib/Common/AbstractPaymentRequestBuilder.php +++ b/lib/Common/AbstractPaymentRequestBuilder.php @@ -81,7 +81,7 @@ abstract class AbstractPaymentRequestBuilder extends AbstractRequestBuilder /** * {@inheritDoc} */ - public function build(array $options = null) + public function build($options = null) { return parent::build($options); } diff --git a/lib/Common/AbstractRequestBuilder.php b/lib/Common/AbstractRequestBuilder.php index 13e5b881..afbc373a 100644 --- a/lib/Common/AbstractRequestBuilder.php +++ b/lib/Common/AbstractRequestBuilder.php @@ -64,7 +64,7 @@ abstract class AbstractRequestBuilder * @throws InvalidRequestException Выбрасывается если при валидации запроса произошла ошибка * @throws InvalidPropertyException Выбрасывается если не удалось установить один из параметров, переданных в массиве настроек */ - public function build(array $options = null) + public function build($options = null) { if (!empty($options)) { $this->setOptions($options); diff --git a/lib/Common/Exceptions/BadApiRequestException.php b/lib/Common/Exceptions/BadApiRequestException.php index 7aab76a4..57d9e21b 100644 --- a/lib/Common/Exceptions/BadApiRequestException.php +++ b/lib/Common/Exceptions/BadApiRequestException.php @@ -41,7 +41,7 @@ class BadApiRequestException extends ApiException public function __construct($responseHeaders = array(), $responseBody = null) { - $errorData = json_decode($responseBody, true); + $errorData = json_decode($responseBody ?: '{}', true); $message = ''; if (isset($errorData['description'])) { diff --git a/lib/Common/Exceptions/ForbiddenException.php b/lib/Common/Exceptions/ForbiddenException.php index 7d49daf6..f0f8ed64 100644 --- a/lib/Common/Exceptions/ForbiddenException.php +++ b/lib/Common/Exceptions/ForbiddenException.php @@ -41,7 +41,7 @@ class ForbiddenException extends ApiException public function __construct($responseHeaders = array(), $responseBody = null) { - $errorData = json_decode($responseBody, true); + $errorData = json_decode($responseBody ?: '{}', true); $message = ''; if (isset($errorData['description'])) { diff --git a/lib/Common/Exceptions/InternalServerError.php b/lib/Common/Exceptions/InternalServerError.php index 6066197f..6398f1ab 100644 --- a/lib/Common/Exceptions/InternalServerError.php +++ b/lib/Common/Exceptions/InternalServerError.php @@ -43,7 +43,7 @@ class InternalServerError extends ApiException public function __construct($responseHeaders = array(), $responseBody = null) { - $errorData = json_decode($responseBody, true); + $errorData = json_decode($responseBody ?: '{}', true); $message = ''; if (isset($errorData['description'])) { diff --git a/lib/Common/Exceptions/NotFoundException.php b/lib/Common/Exceptions/NotFoundException.php index 1af105ed..d69b88d9 100644 --- a/lib/Common/Exceptions/NotFoundException.php +++ b/lib/Common/Exceptions/NotFoundException.php @@ -41,7 +41,7 @@ class NotFoundException extends ApiException public function __construct($responseHeaders = array(), $responseBody = null) { - $errorData = json_decode($responseBody, true); + $errorData = json_decode($responseBody ?: '{}', true); $message = ''; if (isset($errorData['description'])) { diff --git a/lib/Common/Exceptions/ResponseProcessingException.php b/lib/Common/Exceptions/ResponseProcessingException.php index 2f05d7f4..13833e73 100644 --- a/lib/Common/Exceptions/ResponseProcessingException.php +++ b/lib/Common/Exceptions/ResponseProcessingException.php @@ -41,7 +41,7 @@ class ResponseProcessingException extends ApiException public function __construct($responseHeaders = array(), $responseBody = null) { - $errorData = json_decode($responseBody, true); + $errorData = json_decode($responseBody ?: '{}', true); $message = ''; if (isset($errorData['description'])) { diff --git a/lib/Common/Exceptions/TooManyRequestsException.php b/lib/Common/Exceptions/TooManyRequestsException.php index 74655e7b..bdd77cf6 100644 --- a/lib/Common/Exceptions/TooManyRequestsException.php +++ b/lib/Common/Exceptions/TooManyRequestsException.php @@ -41,7 +41,7 @@ class TooManyRequestsException extends ApiException public function __construct($responseHeaders = array(), $responseBody = null) { - $errorData = json_decode($responseBody, true); + $errorData = json_decode($responseBody ?: '{}', true); $message = ''; if (isset($errorData['description'])) { diff --git a/lib/Common/Exceptions/UnauthorizedException.php b/lib/Common/Exceptions/UnauthorizedException.php index a179b8cf..306f6118 100644 --- a/lib/Common/Exceptions/UnauthorizedException.php +++ b/lib/Common/Exceptions/UnauthorizedException.php @@ -42,7 +42,7 @@ class UnauthorizedException extends ApiException public function __construct($responseHeaders = array(), $responseBody = null) { - $errorData = json_decode($responseBody, true); + $errorData = json_decode($responseBody ?: '{}', true); $message = ''; if (isset($errorData['description'])) { diff --git a/lib/Request/Deals/CreateDealRequestBuilder.php b/lib/Request/Deals/CreateDealRequestBuilder.php index 26248472..0cbf824b 100644 --- a/lib/Request/Deals/CreateDealRequestBuilder.php +++ b/lib/Request/Deals/CreateDealRequestBuilder.php @@ -117,7 +117,7 @@ class CreateDealRequestBuilder extends AbstractRequestBuilder * @param array|null $options * @return CreateDealRequest|AbstractRequest */ - public function build(array $options = null) + public function build($options = null) { return parent::build($options); } diff --git a/lib/Request/Deals/DealsRequestBuilder.php b/lib/Request/Deals/DealsRequestBuilder.php index fe4cf6cc..d5c27c5b 100644 --- a/lib/Request/Deals/DealsRequestBuilder.php +++ b/lib/Request/Deals/DealsRequestBuilder.php @@ -241,7 +241,7 @@ class DealsRequestBuilder extends AbstractRequestBuilder * @param array|null $options Массив с настройками запроса * @return AbstractRequest|DealsRequest Инстанс объекта запроса к API для получения списка сделок магазина */ - public function build(array $options = null) + public function build($options = null) { return parent::build($options); } diff --git a/lib/Request/Payments/CreatePaymentRequestBuilder.php b/lib/Request/Payments/CreatePaymentRequestBuilder.php index 17457032..7dddf016 100644 --- a/lib/Request/Payments/CreatePaymentRequestBuilder.php +++ b/lib/Request/Payments/CreatePaymentRequestBuilder.php @@ -213,7 +213,7 @@ class CreatePaymentRequestBuilder extends AbstractPaymentRequestBuilder * * @throws InvalidPropertyValueTypeException Выбрасывается если был передан объект невалидного типа */ - public function setPaymentMethodData($value, array $options = null) + public function setPaymentMethodData($value, $options = null) { if (is_string($value) && $value !== '') { if (empty($options)) { @@ -237,7 +237,7 @@ class CreatePaymentRequestBuilder extends AbstractPaymentRequestBuilder * @throws InvalidPropertyValueTypeException Выбрасывается если переданное значение не является объектом типа * AbstractConfirmationAttributes или null */ - public function setConfirmation($value, array $options = null) + public function setConfirmation($value, $options = null) { if (is_string($value) && $value !== '') { if (empty($options)) { @@ -433,7 +433,7 @@ class CreatePaymentRequestBuilder extends AbstractPaymentRequestBuilder * * @throws InvalidRequestException Выбрасывается если собрать объект запроса не удалось */ - public function build(array $options = null) + public function build($options = null) { if (!empty($options)) { $this->setOptions($options); diff --git a/lib/Request/Payments/CreatePaymentRequestSerializer.php b/lib/Request/Payments/CreatePaymentRequestSerializer.php index 03f2db29..afd06876 100644 --- a/lib/Request/Payments/CreatePaymentRequestSerializer.php +++ b/lib/Request/Payments/CreatePaymentRequestSerializer.php @@ -77,6 +77,7 @@ class CreatePaymentRequestSerializer PaymentMethodType::WECHAT => 'serializePaymentData', PaymentMethodType::SBP => 'serializePaymentData', PaymentMethodType::SBER_LOAN => 'serializePaymentData', + PaymentMethodType::SBER_BNPL => 'serializePaymentData', PaymentMethodType::ELECTRONIC_CERTIFICATE => 'serializePaymentDataElectronicCertificate', ); diff --git a/lib/Request/Payments/Payment/CreateCaptureRequestBuilder.php b/lib/Request/Payments/Payment/CreateCaptureRequestBuilder.php index aba2fd93..113a6bb0 100644 --- a/lib/Request/Payments/Payment/CreateCaptureRequestBuilder.php +++ b/lib/Request/Payments/Payment/CreateCaptureRequestBuilder.php @@ -66,7 +66,7 @@ class CreateCaptureRequestBuilder extends AbstractPaymentRequestBuilder * @throws InvalidRequestException Выбрасывается если при валидации запроса произошла ошибка * @throws InvalidPropertyException Выбрасывается если не удалось установить один из параметров, переданных в массиве настроек */ - public function build(array $options = null) + public function build($options = null) { if (!empty($options)) { $this->setOptions($options); diff --git a/lib/Request/Payments/PaymentsRequestBuilder.php b/lib/Request/Payments/PaymentsRequestBuilder.php index df15202d..5f830040 100644 --- a/lib/Request/Payments/PaymentsRequestBuilder.php +++ b/lib/Request/Payments/PaymentsRequestBuilder.php @@ -241,7 +241,7 @@ class PaymentsRequestBuilder extends AbstractRequestBuilder * @param array|null $options Массив с настройками запроса * @return AbstractRequest Инстанс объекта запроса к API для получения списка платежей магазина */ - public function build(array $options = null) + public function build($options = null) { return parent::build($options); } diff --git a/lib/Request/Payouts/CreatePayoutRequestBuilder.php b/lib/Request/Payouts/CreatePayoutRequestBuilder.php index cfc4846a..e972df77 100644 --- a/lib/Request/Payouts/CreatePayoutRequestBuilder.php +++ b/lib/Request/Payouts/CreatePayoutRequestBuilder.php @@ -199,7 +199,7 @@ class CreatePayoutRequestBuilder extends AbstractRequestBuilder * * @throws InvalidRequestException Выбрасывается если собрать объект запроса не удалось */ - public function build(array $options = null) + public function build($options = null) { return parent::build($options); } diff --git a/lib/Request/PersonalData/CreatePersonalDataRequestBuilder.php b/lib/Request/PersonalData/CreatePersonalDataRequestBuilder.php index d32b22d6..c9c6a7ec 100644 --- a/lib/Request/PersonalData/CreatePersonalDataRequestBuilder.php +++ b/lib/Request/PersonalData/CreatePersonalDataRequestBuilder.php @@ -138,7 +138,7 @@ class CreatePersonalDataRequestBuilder extends AbstractRequestBuilder * * @throws InvalidRequestException Выбрасывается если собрать объект запроса не удалось */ - public function build(array $options = null) + public function build($options = null) { return parent::build($options); } diff --git a/lib/Request/Receipts/CreatePostReceiptRequestBuilder.php b/lib/Request/Receipts/CreatePostReceiptRequestBuilder.php index 79ac082f..56f6728f 100644 --- a/lib/Request/Receipts/CreatePostReceiptRequestBuilder.php +++ b/lib/Request/Receipts/CreatePostReceiptRequestBuilder.php @@ -293,7 +293,7 @@ class CreatePostReceiptRequestBuilder extends AbstractRequestBuilder * * @throws InvalidRequestException Выбрасывается если собрать объект запроса не удалось */ - public function build(array $options = null) + public function build($options = null) { if (!empty($options)) { $this->setOptions($options); diff --git a/lib/Request/Receipts/ReceiptsRequestBuilder.php b/lib/Request/Receipts/ReceiptsRequestBuilder.php index 27ef8b61..5738b762 100644 --- a/lib/Request/Receipts/ReceiptsRequestBuilder.php +++ b/lib/Request/Receipts/ReceiptsRequestBuilder.php @@ -189,7 +189,7 @@ class ReceiptsRequestBuilder extends AbstractRequestBuilder * @param array|null $options Массив с настройками запроса * @return ReceiptsRequestInterface|AbstractRequest Инстанс объекта запроса к API для получения списка чеков магазина */ - public function build(array $options = null) + public function build($options = null) { return parent::build($options); } diff --git a/lib/Request/Refunds/CreateRefundRequestBuilder.php b/lib/Request/Refunds/CreateRefundRequestBuilder.php index ba003372..ef9bb264 100644 --- a/lib/Request/Refunds/CreateRefundRequestBuilder.php +++ b/lib/Request/Refunds/CreateRefundRequestBuilder.php @@ -139,7 +139,7 @@ class CreateRefundRequestBuilder extends AbstractPaymentRequestBuilder * @param array|null $options Устанавливаемые параметры запроса * @return CreateRefundRequestInterface|AbstractRequest Инстанс сгенерированного объекта запроса к API */ - public function build(array $options = null) + public function build($options = null) { if (!empty($options)) { $this->setOptions($options); diff --git a/lib/Request/Refunds/RefundsRequestBuilder.php b/lib/Request/Refunds/RefundsRequestBuilder.php index 9956d46a..a18ca718 100644 --- a/lib/Request/Refunds/RefundsRequestBuilder.php +++ b/lib/Request/Refunds/RefundsRequestBuilder.php @@ -175,7 +175,7 @@ class RefundsRequestBuilder extends AbstractRequestBuilder * @param array|null $options Массив с настройками запроса * @return RefundsRequestInterface|AbstractRequest Инстанс объекта запроса к API для получения списка возвратов магазина */ - public function build(array $options = null) + public function build($options = null) { return parent::build($options); } diff --git a/lib/Request/SelfEmployed/SelfEmployedRequestBuilder.php b/lib/Request/SelfEmployed/SelfEmployedRequestBuilder.php index ecf35a36..3a6cf44f 100644 --- a/lib/Request/SelfEmployed/SelfEmployedRequestBuilder.php +++ b/lib/Request/SelfEmployed/SelfEmployedRequestBuilder.php @@ -104,7 +104,7 @@ class SelfEmployedRequestBuilder extends AbstractRequestBuilder * * @throws InvalidRequestException Выбрасывается если собрать объект запроса не удалось */ - public function build(array $options = null) + public function build($options = null) { return parent::build($options); } diff --git a/phpdoc.xml b/phpdoc.xml index 4550efe7..b3acb6ae 100644 --- a/phpdoc.xml +++ b/phpdoc.xml @@ -9,7 +9,7 @@ .phpdoc - + latest diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 0657c9dd..0fc4e977 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,28 +1,13 @@ - - - - - tests - - - - - - - - - - - ./lib - - - \ No newline at end of file + + + + ./lib + + + + + tests + + + diff --git a/tests/Client/BaseClientTest.php b/tests/Client/BaseClientTest.php index f013c452..1f29e17b 100644 --- a/tests/Client/BaseClientTest.php +++ b/tests/Client/BaseClientTest.php @@ -136,11 +136,11 @@ class BaseClientTest extends TestCase { return array( array( - 'apiClient' => null, + 'apiClient' => null, 'configLoader' => null ), array( - 'apiClient' => new CurlClient(), + 'apiClient' => new CurlClient(), 'configLoader' => new ConfigurationLoader() ) ); diff --git a/tests/Client/ClientTest.php b/tests/Client/ClientTest.php index 3a76f772..32bc4fc2 100644 --- a/tests/Client/ClientTest.php +++ b/tests/Client/ClientTest.php @@ -318,7 +318,7 @@ class ClientTest extends TestCase $apiClient = new Client(); if ($exceptionClassName !== null) { - $this->setExpectedException($exceptionClassName); + $this->expectException($exceptionClassName); } $response = $apiClient @@ -509,7 +509,7 @@ class ClientTest extends TestCase ); if ($exceptionClassName !== null) { - $this->setExpectedException($exceptionClassName); + $this->expectException($exceptionClassName); } $apiClient = new Client(); @@ -540,7 +540,7 @@ class ClientTest extends TestCase )); if ($invalid) { - $this->setExpectedException($exceptionClassName); + $this->expectException($exceptionClassName); } $apiClient = new Client(); @@ -779,7 +779,7 @@ class ClientTest extends TestCase )); if ($exceptionClassName !== null) { - $this->setExpectedException($exceptionClassName); + $this->expectException($exceptionClassName); } $apiClient = new Client(); @@ -845,7 +845,7 @@ class ClientTest extends TestCase 'unknown response here', array('http_code' => 444) )); - $this->setExpectedException('YooKassa\Common\Exceptions\ApiException'); + $this->expectException('YooKassa\Common\Exceptions\ApiException'); $apiClient = new Client(); $apiClient @@ -870,7 +870,7 @@ class ClientTest extends TestCase '{"description": "error_msg", "code": "error_code", "parameter_name": "parameter_name"}', array('http_code' => 400) )); - $this->setExpectedException('YooKassa\Common\Exceptions\BadApiRequestException'); + $this->expectException('YooKassa\Common\Exceptions\BadApiRequestException'); $apiClient = new Client(); $response = $apiClient @@ -895,7 +895,7 @@ class ClientTest extends TestCase '{"description": "error_msg", "code": "error_code"}', array('http_code' => 500) )); - $this->setExpectedException('YooKassa\Common\Exceptions\InternalServerError'); + $this->expectException('YooKassa\Common\Exceptions\InternalServerError'); $apiClient = new Client(); $response = $apiClient @@ -920,7 +920,7 @@ class ClientTest extends TestCase '{"description": "error_msg"}', array('http_code' => 401) )); - $this->setExpectedException('YooKassa\Common\Exceptions\UnauthorizedException'); + $this->expectException('YooKassa\Common\Exceptions\UnauthorizedException'); $apiClient = new Client(); $response = $apiClient @@ -945,7 +945,7 @@ class ClientTest extends TestCase '{"description": "error_msg","error_code": "error_code", "parameter_name": "parameter_name", "operation_name": "operation_name"}', array('http_code' => 403) )); - $this->setExpectedException('YooKassa\Common\Exceptions\ForbiddenException'); + $this->expectException('YooKassa\Common\Exceptions\ForbiddenException'); $apiClient = new Client(); $response = $apiClient @@ -965,7 +965,7 @@ class ClientTest extends TestCase '{"description": "error_msg","error_code": "error_code", "parameter_name": "parameter_name", "operation_name": "operation_name"}', array('http_code' => 404) )); - $this->setExpectedException('YooKassa\Common\Exceptions\NotFoundException'); + $this->expectException('YooKassa\Common\Exceptions\NotFoundException'); $apiClient = new Client(); $response = $apiClient @@ -985,7 +985,7 @@ class ClientTest extends TestCase '{"description": "error_msg","error_code": "error_code", "parameter_name": "parameter_name", "operation_name": "operation_name"}', array('http_code' => 429) )); - $this->setExpectedException('YooKassa\Common\Exceptions\TooManyRequestsException'); + $this->expectException('YooKassa\Common\Exceptions\TooManyRequestsException'); $apiClient = new Client(); $response = $apiClient @@ -1026,7 +1026,7 @@ class ClientTest extends TestCase $apiClient = new Client(); - $this->setExpectedException('YooKassa\Common\Exceptions\ApiException'); + $this->expectException('YooKassa\Common\Exceptions\ApiException'); $apiClient ->setApiClient($curlClientStub) @@ -1082,7 +1082,7 @@ class ClientTest extends TestCase '{"invalid":"json"', array('http_code' => 200) )); - $this->setExpectedException('YooKassa\Common\Exceptions\JsonException'); + $this->expectException('YooKassa\Common\Exceptions\JsonException'); $apiClient = new Client(); $response = $apiClient @@ -1476,7 +1476,7 @@ class ClientTest extends TestCase $apiClient = new Client(); if ($exceptionClassName !== null) { - $this->setExpectedException($exceptionClassName); + $this->expectException($exceptionClassName); } $response = $apiClient @@ -1727,7 +1727,7 @@ class ClientTest extends TestCase $apiClient = new Client(); if ($exceptionClassName !== null) { - $this->setExpectedException($exceptionClassName); + $this->expectException($exceptionClassName); } $response = $apiClient @@ -1938,7 +1938,7 @@ class ClientTest extends TestCase $apiClient = new Client(); if ($exceptionClassName !== null) { - $this->setExpectedException($exceptionClassName); + $this->expectException($exceptionClassName); } $response = $apiClient @@ -2200,7 +2200,7 @@ class ClientTest extends TestCase $apiClient = new Client(); if ($exceptionClassName !== null) { - $this->setExpectedException($exceptionClassName); + $this->expectException($exceptionClassName); } $response = $apiClient @@ -2304,7 +2304,9 @@ class TestClient extends Client public function encode($data) { $refl = new ReflectionMethod($this, 'encodeData'); - $refl->setAccessible(true); + if (PHP_VERSION_ID < 80100) { + $refl->setAccessible(true); + } return $refl->invoke($this, $data); } } diff --git a/tests/Client/CurlClientTest.php b/tests/Client/CurlClientTest.php index ecb7435b..be312df1 100644 --- a/tests/Client/CurlClientTest.php +++ b/tests/Client/CurlClientTest.php @@ -26,8 +26,10 @@ namespace Tests\YooKassa\Client; use PHPUnit\Framework\TestCase; +use ReflectionClass; use YooKassa\Client\CurlClient; use YooKassa\Common\HttpVerb; +use YooKassa\Common\LoggerWrapper; class CurlClientTest extends TestCase { @@ -54,14 +56,16 @@ class CurlClientTest extends TestCase /** * @dataProvider curlErrorCodeProvider - * @expectedException \YooKassa\Common\Exceptions\ApiConnectionException */ public function testHandleCurlError($error, $errn) { - $client = new CurlClient(); - $reflector = new \ReflectionClass('\YooKassa\Client\CurlClient'); - $method = $reflector->getMethod('handleCurlError'); - $method->setAccessible(true); + $this->expectException('YooKassa\Common\Exceptions\ApiConnectionException'); + $client = new CurlClient(); + $reflector = new ReflectionClass('\YooKassa\Client\CurlClient'); + $method = $reflector->getMethod('handleCurlError'); + if (PHP_VERSION_ID < 80100) { + $method->setAccessible(true); + } $method->invokeArgs($client, array($error, $errn)); } @@ -75,11 +79,11 @@ class CurlClientTest extends TestCase public function testCloseConnection() { - $wrapped = new \Tests\YooKassa\Client\ArrayLogger(); - $logger = new \YooKassa\Common\LoggerWrapper($wrapped); + $wrapped = new ArrayLogger(); + $logger = new LoggerWrapper($wrapped); $curlClientMock = $this->getMockBuilder('YooKassa\Client\CurlClient') - ->setMethods(array('closeCurlConnection', 'sendRequest')) - ->getMock(); + ->setMethods(array('closeCurlConnection', 'sendRequest')) + ->getMock(); $curlClientMock->setLogger($logger); $curlClientMock->setConfig(array('url' => 'test:url')); $curlClientMock->setKeepAlive(false); @@ -102,7 +106,7 @@ class CurlClientTest extends TestCase public function testAuthorizeException() { - $this->setExpectedException('YooKassa\Common\Exceptions\AuthorizeException'); + $this->expectException('YooKassa\Common\Exceptions\AuthorizeException'); $client = new CurlClient(); $client->call( '', diff --git a/tests/Client/UserAgentTest.php b/tests/Client/UserAgentTest.php index 1045cb55..f9de3f25 100644 --- a/tests/Client/UserAgentTest.php +++ b/tests/Client/UserAgentTest.php @@ -39,14 +39,20 @@ class UserAgentTest extends TestCase { $agent = new UserAgent(); $reflector = new ReflectionClass('\YooKassa\Client\UserAgent'); - $method = $reflector->getMethod('setOs'); - $method->setAccessible(true); + $method = $reflector->getMethod('setOs'); + if (PHP_VERSION_ID < 80100) { + $method->setAccessible(true); + } $method->invokeArgs($agent, array('name' => 'CentOS', 'version' => '6.7')); - $method = $reflector->getMethod('setPhp'); - $method->setAccessible(true); + $method = $reflector->getMethod('setPhp'); + if (PHP_VERSION_ID < 80100) { + $method->setAccessible(true); + } $method->invokeArgs($agent, array('name' => 'PHP', 'version' => '5.4.45')); - $method = $reflector->getMethod('setSdk'); - $method->setAccessible(true); + $method = $reflector->getMethod('setSdk'); + if (PHP_VERSION_ID < 80100) { + $method->setAccessible(true); + } $method->invokeArgs($agent, array('name' => 'YooKassa.PHP', 'version' => '1.4.1')); $agent->setCms('Wordpress', '2.0.4'); $agent->setModule('Woocommerce', '1.2.3'); @@ -60,8 +66,10 @@ class UserAgentTest extends TestCase { $agent = new UserAgent(); $reflector = new ReflectionClass('\YooKassa\Client\UserAgent'); - $method = $reflector->getMethod('setOs'); - $method->setAccessible(true); + $method = $reflector->getMethod('setOs'); + if (PHP_VERSION_ID < 80100) { + $method->setAccessible(true); + } $method->invokeArgs($agent, array('name' => 'CentOS', 'version' => '6.7')); $this->assertEquals('CentOS/6.7', $agent->getOs()); } @@ -73,8 +81,10 @@ class UserAgentTest extends TestCase { $agent = new UserAgent(); $reflector = new ReflectionClass('\YooKassa\Client\UserAgent'); - $method = $reflector->getMethod('setPhp'); - $method->setAccessible(true); + $method = $reflector->getMethod('setPhp'); + if (PHP_VERSION_ID < 80100) { + $method->setAccessible(true); + } $method->invokeArgs($agent, array('name' => 'PHP', 'version' => '5.4.45')); $this->assertEquals('PHP/5.4.45', $agent->getPhp()); } @@ -105,10 +115,12 @@ class UserAgentTest extends TestCase */ public function testSetGetSdk() { - $agent = new UserAgent(); + $agent = new UserAgent(); $reflector = new ReflectionClass('\YooKassa\Client\UserAgent'); - $method = $reflector->getMethod('setSdk'); - $method->setAccessible(true); + $method = $reflector->getMethod('setSdk'); + if (PHP_VERSION_ID < 80100) { + $method->setAccessible(true); + } $method->invokeArgs($agent, array('name' => 'YooKassa.PHP', 'version' => '1.4.1')); $this->assertEquals('YooKassa.PHP/1.4.1', $agent->getSdk()); } @@ -120,7 +132,7 @@ class UserAgentTest extends TestCase */ public function testCreateVersion($input, $output) { - $agent = new UserAgent(); + $agent = new UserAgent(); $this->assertEquals($agent->createVersion($input['name'], $input['version']), $output); } diff --git a/tests/Common/AbstractEnumTest.php b/tests/Common/AbstractEnumTest.php index b5762ba7..ae93618c 100644 --- a/tests/Common/AbstractEnumTest.php +++ b/tests/Common/AbstractEnumTest.php @@ -83,7 +83,7 @@ class TestAbstractEnum extends AbstractEnum protected static $validValues = array( self::ENUM_VALUE_1 => true, - self::ENUM_VALUE_2 => true, + self::ENUM_VALUE_2 => true, self::ENUM_DISABLED_VALUE_1 => false, self::ENUM_DISABLED_VALUE_2 => false, ); diff --git a/tests/Common/AbstractObjectTest.php b/tests/Common/AbstractObjectTest.php index f83c7000..9b8ed56c 100644 --- a/tests/Common/AbstractObjectTest.php +++ b/tests/Common/AbstractObjectTest.php @@ -25,7 +25,9 @@ namespace Tests\YooKassa\Common; +use DateTime; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Common\AbstractObject; class AbstractObjectTest extends TestCase @@ -172,7 +174,7 @@ class AbstractObjectTest extends TestCase ); self::assertEquals($expected, $data); - $date = new \DateTime(); + $date = new DateTime(); $instance->getPropertyCamelCase()->setPropertyCamelCase($date); $data = $instance->jsonSerialize(); $expected = array( @@ -211,14 +213,14 @@ class AbstractObjectTest extends TestCase $expected['unknown_date'] = $date->format(YOOKASSA_DATE); self::assertEquals($expected, $data); - $obj = new \stdClass(); + $obj = new stdClass(); $obj->test = 'test1'; $instance->unknown_obj = $obj; $data = $instance->jsonSerialize(); $expected['unknown_obj'] = $obj; self::assertEquals($expected, $data); - $obj = new \stdClass(); + $obj = new stdClass(); $obj->test = 'test2'; $instance->property_camel_case = $obj; $data = $instance->jsonSerialize(); diff --git a/tests/Common/AbstractRequestBuilderTest.php b/tests/Common/AbstractRequestBuilderTest.php index ed30c939..4ac85062 100644 --- a/tests/Common/AbstractRequestBuilderTest.php +++ b/tests/Common/AbstractRequestBuilderTest.php @@ -25,6 +25,8 @@ namespace Tests\YooKassa\Common; +use Exception; +use InvalidArgumentException; use PHPUnit\Framework\TestCase; use YooKassa\Common\AbstractRequest; use YooKassa\Common\AbstractRequestBuilder; @@ -46,9 +48,9 @@ class AbstractRequestBuilderTest extends TestCase $mess = 'test message'; try { $builder->build(array( - 'throwException' => new \Exception($mess), + 'throwException' => new Exception($mess), )); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertEquals($mess, $e->getPrevious()->getMessage()); return; } @@ -73,8 +75,8 @@ class AbstractRequestBuilderTest extends TestCase try { $builder->setOptions('test'); - } catch (\Exception $e) { - self::assertTrue($e instanceof \InvalidArgumentException); + } catch (Exception $e) { + self::assertTrue($e instanceof InvalidArgumentException); return; } self::fail('Exception not thrown in setOptions method'); @@ -102,11 +104,11 @@ class TestAbstractRequestBuilder extends AbstractRequestBuilder } /** - * @param \Exception $e + * @param Exception $e * @return TestAbstractRequestBuilder - * @throws \Exception + * @throws Exception */ - public function setThrowException(\Exception $e) + public function setThrowException(Exception $e) { $this->currentObject->setThrowException($e); return $this; @@ -118,15 +120,15 @@ class TestAbstractRequestClass extends AbstractRequest private $valid = false; /** - * @var \Exception|null + * @var Exception|null */ private $exception = null; /** - * @param \Exception $e - * @throws \Exception + * @param Exception $e + * @throws Exception */ - public function setThrowException(\Exception $e) + public function setThrowException(Exception $e) { $this->exception = $e; } diff --git a/tests/Common/Exceptions/AbstractApiRequestExceptionTest.php b/tests/Common/Exceptions/AbstractApiRequestExceptionTestCase.php similarity index 98% rename from tests/Common/Exceptions/AbstractApiRequestExceptionTest.php rename to tests/Common/Exceptions/AbstractApiRequestExceptionTestCase.php index d80b05e4..d14fae22 100644 --- a/tests/Common/Exceptions/AbstractApiRequestExceptionTest.php +++ b/tests/Common/Exceptions/AbstractApiRequestExceptionTestCase.php @@ -25,7 +25,7 @@ namespace Tests\YooKassa\Common\Exceptions; -abstract class AbstractApiRequestExceptionTest extends ApiExceptionTest +abstract class AbstractApiRequestExceptionTestCase extends ApiExceptionTest { /** * @dataProvider descriptionDataProvider diff --git a/tests/Common/Exceptions/BadApiRequestExceptionTest.php b/tests/Common/Exceptions/BadApiRequestExceptionTest.php index aa674749..3182f13c 100644 --- a/tests/Common/Exceptions/BadApiRequestExceptionTest.php +++ b/tests/Common/Exceptions/BadApiRequestExceptionTest.php @@ -27,7 +27,7 @@ namespace Tests\YooKassa\Common\Exceptions; use YooKassa\Common\Exceptions\BadApiRequestException; -class BadApiRequestExceptionTest extends AbstractApiRequestExceptionTest +class BadApiRequestExceptionTest extends AbstractApiRequestExceptionTestCase { public function getTestInstance($message = '', $code = 0, $responseHeaders = array(), $responseBody = null) { diff --git a/tests/Common/Exceptions/ExtensionNotFoundExceptionTest.php b/tests/Common/Exceptions/ExtensionNotFoundExceptionTest.php index 4dc18146..fe3b678f 100644 --- a/tests/Common/Exceptions/ExtensionNotFoundExceptionTest.php +++ b/tests/Common/Exceptions/ExtensionNotFoundExceptionTest.php @@ -57,7 +57,7 @@ class ExtensionNotFoundExceptionTest extends TestCase return array( array("json", "json extension is not loaded!"), array("curl", "curl extension is not loaded!"), - array("gd", "gd extension is not loaded!"), + array("gd", "gd extension is not loaded!"), ); } } diff --git a/tests/Common/Exceptions/ForbiddenExceptionTest.php b/tests/Common/Exceptions/ForbiddenExceptionTest.php index 06c3fcbe..24059478 100644 --- a/tests/Common/Exceptions/ForbiddenExceptionTest.php +++ b/tests/Common/Exceptions/ForbiddenExceptionTest.php @@ -27,7 +27,7 @@ namespace Tests\YooKassa\Common\Exceptions; use YooKassa\Common\Exceptions\ForbiddenException; -class ForbiddenExceptionTest extends AbstractApiRequestExceptionTest +class ForbiddenExceptionTest extends AbstractApiRequestExceptionTestCase { public function getTestInstance($message = '', $code = 0, $responseHeaders = array(), $responseBody = null) { diff --git a/tests/Common/Exceptions/InternalServerErrorTest.php b/tests/Common/Exceptions/InternalServerErrorTest.php index 1c0b9fbe..16e7c97e 100644 --- a/tests/Common/Exceptions/InternalServerErrorTest.php +++ b/tests/Common/Exceptions/InternalServerErrorTest.php @@ -27,7 +27,7 @@ namespace Tests\YooKassa\Common\Exceptions; use YooKassa\Common\Exceptions\InternalServerError; -class InternalServerErrorTest extends AbstractApiRequestExceptionTest +class InternalServerErrorTest extends AbstractApiRequestExceptionTestCase { public function getTestInstance($message = '', $code = 0, $responseHeaders = array(), $responseBody = null) { diff --git a/tests/Common/Exceptions/InvalidPropertyValueExceptionTest.php b/tests/Common/Exceptions/InvalidPropertyValueExceptionTest.php index 6a4e0f21..b3d846a8 100644 --- a/tests/Common/Exceptions/InvalidPropertyValueExceptionTest.php +++ b/tests/Common/Exceptions/InvalidPropertyValueExceptionTest.php @@ -25,6 +25,8 @@ namespace Tests\YooKassa\Common\Exceptions; +use DateTime; +use stdClass; use YooKassa\Common\Exceptions\InvalidPropertyValueException; class InvalidPropertyValueExceptionTest extends InvalidPropertyExceptionTest @@ -55,8 +57,8 @@ class InvalidPropertyValueExceptionTest extends InvalidPropertyExceptionTest array(''), array('value'), array(array('test')), - array(new \stdClass()), - array(new \DateTime()), + array(new stdClass()), + array(new DateTime()), ); } } diff --git a/tests/Common/Exceptions/InvalidPropertyValueTypeExceptionTest.php b/tests/Common/Exceptions/InvalidPropertyValueTypeExceptionTest.php index b4263239..050b4464 100644 --- a/tests/Common/Exceptions/InvalidPropertyValueTypeExceptionTest.php +++ b/tests/Common/Exceptions/InvalidPropertyValueTypeExceptionTest.php @@ -25,6 +25,8 @@ namespace Tests\YooKassa\Common\Exceptions; +use DateTime; +use stdClass; use YooKassa\Common\Exceptions\InvalidPropertyException; use YooKassa\Common\Exceptions\InvalidPropertyValueTypeException; @@ -59,8 +61,8 @@ class InvalidPropertyValueTypeExceptionTest extends InvalidPropertyExceptionTest array('', 'string'), array('value', 'string'), array(array('test'), 'array'), - array(new \stdClass(), 'stdClass'), - array(new \DateTime(), 'DateTime'), + array(new stdClass(), 'stdClass'), + array(new DateTime(), 'DateTime'), array(new InvalidPropertyException(), 'YooKassa\\Common\\Exceptions\\InvalidPropertyException'), array(fopen(__FILE__, 'r'), 'resource'), array(true, 'boolean'), diff --git a/tests/Common/Exceptions/NotFoundExceptionTest.php b/tests/Common/Exceptions/NotFoundExceptionTest.php index 5a8be821..09296984 100644 --- a/tests/Common/Exceptions/NotFoundExceptionTest.php +++ b/tests/Common/Exceptions/NotFoundExceptionTest.php @@ -27,7 +27,7 @@ namespace Tests\YooKassa\Common\Exceptions; use YooKassa\Common\Exceptions\NotFoundException; -class NotFoundExceptionTest extends AbstractApiRequestExceptionTest +class NotFoundExceptionTest extends AbstractApiRequestExceptionTestCase { public function getTestInstance($message = '', $code = 0, $responseHeaders = array(), $responseBody = null) { diff --git a/tests/Common/Exceptions/TooManyRequestsExceptionTest.php b/tests/Common/Exceptions/TooManyRequestsExceptionTest.php index 3f507253..8f134992 100644 --- a/tests/Common/Exceptions/TooManyRequestsExceptionTest.php +++ b/tests/Common/Exceptions/TooManyRequestsExceptionTest.php @@ -27,7 +27,7 @@ namespace Tests\YooKassa\Common\Exceptions; use YooKassa\Common\Exceptions\TooManyRequestsException; -class TooManyRequestsExceptionTest extends AbstractApiRequestExceptionTest +class TooManyRequestsExceptionTest extends AbstractApiRequestExceptionTestCase { public function getTestInstance($message = '', $code = 0, $responseHeaders = array(), $responseBody = null) { diff --git a/tests/Common/Exceptions/UnauthorizedExceptionTest.php b/tests/Common/Exceptions/UnauthorizedExceptionTest.php index 854b715b..efb7b057 100644 --- a/tests/Common/Exceptions/UnauthorizedExceptionTest.php +++ b/tests/Common/Exceptions/UnauthorizedExceptionTest.php @@ -27,7 +27,7 @@ namespace Tests\YooKassa\Common\Exceptions; use YooKassa\Common\Exceptions\UnauthorizedException; -class UnauthorizedExceptionTest extends AbstractApiRequestExceptionTest +class UnauthorizedExceptionTest extends AbstractApiRequestExceptionTestCase { public function getTestInstance($message = '', $code = 0, $responseHeaders = array(), $responseBody = null) { diff --git a/tests/Common/LegacyJsonInterfaceTest.php b/tests/Common/LegacyJsonSerializableInterfaceTest.php similarity index 95% rename from tests/Common/LegacyJsonInterfaceTest.php rename to tests/Common/LegacyJsonSerializableInterfaceTest.php index 310f2158..b839728f 100644 --- a/tests/Common/LegacyJsonInterfaceTest.php +++ b/tests/Common/LegacyJsonSerializableInterfaceTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Common; use PHPUnit\Framework\TestCase; +use ReflectionClass; class LegacyJsonSerializableInterfaceTest extends TestCase { @@ -33,7 +34,7 @@ class LegacyJsonSerializableInterfaceTest extends TestCase { require_once __DIR__ . '/../../lib/Common/legacy_json_serializable.php'; - $reflection = new \ReflectionClass('JsonSerializable'); + $reflection = new ReflectionClass('JsonSerializable'); self::assertTrue($reflection->isInterface()); if (version_compare('5.4', PHP_VERSION) < 0) { self::assertTrue($reflection->isInternal()); diff --git a/tests/Common/LoggerWrapperTest.php b/tests/Common/LoggerWrapperTest.php index 715a4aaa..c6d53e0f 100644 --- a/tests/Common/LoggerWrapperTest.php +++ b/tests/Common/LoggerWrapperTest.php @@ -27,6 +27,7 @@ namespace Tests\YooKassa\Common; use PHPUnit\Framework\TestCase; use Psr\Log\LogLevel; +use stdClass; use YooKassa\Common\LoggerWrapper; use YooKassa\Helpers\Random; @@ -43,11 +44,11 @@ class LoggerWrapperTest extends TestCase /** * @dataProvider invalidLoggerDataProvider - * @expectedException \Psr\Log\InvalidArgumentException * @param mixed $source */ public function testInvalidConstruct($source) { + $this->expectException('Psr\Log\InvalidArgumentException'); new LoggerWrapper($source); } @@ -57,7 +58,7 @@ class LoggerWrapperTest extends TestCase public function invalidLoggerDataProvider() { return array( - array(new \stdClass()), + array(new stdClass()), array(true), array(false), array(array()), diff --git a/tests/Helpers/Config/test_config.json b/tests/Helpers/Config/test_config.json index ea338742..1fc72705 100644 --- a/tests/Helpers/Config/test_config.json +++ b/tests/Helpers/Config/test_config.json @@ -1,4 +1,9 @@ { - "test":"test", - "array":[1,2,3,4] -} \ No newline at end of file + "test": "test", + "array": [ + 1, + 2, + 3, + 4 + ] +} diff --git a/tests/Helpers/ProductCodeTest.php b/tests/Helpers/ProductCodeTest.php index 03fd923d..68327649 100644 --- a/tests/Helpers/ProductCodeTest.php +++ b/tests/Helpers/ProductCodeTest.php @@ -26,6 +26,8 @@ namespace Tests\YooKassa\Helpers; use PHPUnit\Framework\TestCase; +use ReflectionClass; +use ReflectionException; use YooKassa\Helpers\ProductCode; use YooKassa\Model\Receipt\MarkCodeInfo; @@ -148,20 +150,24 @@ class ProductCodeTest extends TestCase /** * @dataProvider dataStrProvider * @param mixed $data - * @throws \ReflectionException + * @throws ReflectionException */ public function testStrHex($data) { $instance = new ProductCode(); - $reflection = new \ReflectionClass(get_class($instance)); + $reflection = new ReflectionClass(get_class($instance)); $method = $reflection->getMethod('strToHex'); - $method->setAccessible(true); - $result1 = $method->invokeArgs($instance, array('string' => $data)); + if (PHP_VERSION_ID < 80100) { + $method->setAccessible(true); + } + $result1 = $method->invokeArgs($instance, array($data)); $method = $reflection->getMethod('hexToStr'); - $method->setAccessible(true); - $result2 = $method->invokeArgs($instance, array('string' => $result1)); + if (PHP_VERSION_ID < 80100) { + $method->setAccessible(true); + } + $result2 = $method->invokeArgs($instance, array($result1)); self::assertEquals($data, $result2); } @@ -169,22 +175,26 @@ class ProductCodeTest extends TestCase /** * @dataProvider dataNumProvider * @param mixed $data - * @throws \ReflectionException + * @throws ReflectionException */ public function testNumHex($data) { $instance = new ProductCode(); - $reflection = new \ReflectionClass(get_class($instance)); + $reflection = new ReflectionClass(get_class($instance)); $method = $reflection->getMethod('baseConvert'); - $method->setAccessible(true); - $result1 = $method->invokeArgs($instance, array('numString' => $data)); + if (PHP_VERSION_ID < 80100) { + $method->setAccessible(true); + } + $result1 = $method->invokeArgs($instance, array($data)); $method = $reflection->getMethod('baseConvert'); - $method->setAccessible(true); - $result2 = $method->invokeArgs($instance, array('numString' => $result1, 'fromBase' => 16, 'toBase' => 10)); + if (PHP_VERSION_ID < 80100) { + $method->setAccessible(true); + } + $result2 = $method->invokeArgs($instance, array($result1, 16, 10)); - self::assertEquals($data, $result2); + self::assertEquals(ltrim($data, '0'), ltrim($result2, '0')); } /** diff --git a/tests/Helpers/TypeCastTest.php b/tests/Helpers/TypeCastTest.php index 026df442..3104ea3b 100644 --- a/tests/Helpers/TypeCastTest.php +++ b/tests/Helpers/TypeCastTest.php @@ -25,7 +25,9 @@ namespace Tests\YooKassa\Helpers; +use DateTime; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\StringObject; use YooKassa\Helpers\TypeCast; @@ -83,7 +85,7 @@ class TypeCastTest extends TestCase { $instance = TypeCast::castToDateTime($value); if ($valid) { - if ($value instanceof \DateTime) { + if ($value instanceof DateTime) { self::assertEquals($value->getTimestamp(), $instance->getTimestamp()); self::assertNotSame($value, $instance); } else { @@ -109,7 +111,7 @@ class TypeCastTest extends TestCase array(false, false), array(null, false), array(array(), false), - array(new \stdClass(), false), + array(new stdClass(), false), array(fopen(__FILE__, 'r'), false), array(new StringObject('test'), true), ); @@ -130,7 +132,7 @@ class TypeCastTest extends TestCase array(false, false), array(null, false), array(array(), false), - array(new \stdClass(), false), + array(new stdClass(), false), array(fopen(__FILE__, 'r'), false), array(new StringObject('test'), true), ); @@ -151,10 +153,10 @@ class TypeCastTest extends TestCase array(false, false), array(null, false), array(array(), false), - array(new \stdClass(), false), + array(new stdClass(), false), array(fopen(__FILE__, 'r'), false), array(new StringObject('test'), true), - array(new \DateTime(), true), + array(new DateTime(), true), ); } @@ -165,8 +167,8 @@ class TypeCastTest extends TestCase $time = time(); $result[] = array($time, $time, true); $result[] = array(date(YOOKASSA_DATE, $time), $time, true); - $result[] = array(new \DateTime(date(YOOKASSA_DATE, $time)), $time, true); - $result[] = array('3234-234-23', $time, false); + $result[] = array(new DateTime(date(YOOKASSA_DATE, $time)), $time, true); + $result[] = array('not-a-real-date-string', $time, false); $result[] = array(array(), $time, false); return $result; diff --git a/tests/Helpers/UUIDTest.php b/tests/Helpers/UUIDTest.php index 6c72f2ad..4f199ce2 100644 --- a/tests/Helpers/UUIDTest.php +++ b/tests/Helpers/UUIDTest.php @@ -33,6 +33,6 @@ class UUIDTest extends TestCase public function testValidUuid() { $uuidPattern = '/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i'; - self::assertTrue(preg_match($uuidPattern, UUID::v4()) === 1); + self::assertTrue(preg_match($uuidPattern, UUID::v4()) === 1); } } diff --git a/tests/Model/AirlineTest.php b/tests/Model/AirlineTest.php index 226c045b..a3f08242 100644 --- a/tests/Model/AirlineTest.php +++ b/tests/Model/AirlineTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Model; +use stdClass; use YooKassa\Model\Airline; use PHPUnit\Framework\TestCase; use YooKassa\Model\Leg; @@ -100,7 +101,7 @@ class AirlineTest extends TestCase { $airline = new Airline(); - $this->setExpectedException($data['exception']); + $this->expectException($data['exception']); $airline->setPassengers($data['value']); } @@ -112,7 +113,7 @@ class AirlineTest extends TestCase { $airline = new Airline(); - $this->setExpectedException($data['exception']); + $this->expectException($data['exception']); $airline->setLegs($data['value']); } @@ -124,7 +125,7 @@ class AirlineTest extends TestCase { $airline = new Airline(); - $this->setExpectedException($data['exception']); + $this->expectException($data['exception']); $airline->setBookingReference($data['value']); } @@ -136,7 +137,7 @@ class AirlineTest extends TestCase { $airline = new Airline(); - $this->setExpectedException($data['exception']); + $this->expectException($data['exception']); $airline->setTicketNumber($data['value']); } @@ -156,18 +157,18 @@ class AirlineTest extends TestCase array( array( "booking_reference" => "IIIKRV", - "ticket_number" => '12342123413', - "passengers" => array( + "ticket_number" => '12342123413', + "passengers" => array( array( "first_name" => "SERGEI", - "last_name" => "IVANOV", + "last_name" => "IVANOV", ), ), - "legs" => array( + "legs" => array( array( - "departure_airport" => "LED", + "departure_airport" => "LED", "destination_airport" => "AMS", - "departure_date" => "2018-06-20", + "departure_date" => "2018-06-20", ), ), ), @@ -175,11 +176,11 @@ class AirlineTest extends TestCase array( array( "booking_reference" => "", - "ticket_number" => '', - "passengers" => array( + "ticket_number" => '', + "passengers" => array( $passenger, ), - "legs" => array( + "legs" => array( $leg, ), ), @@ -193,25 +194,25 @@ class AirlineTest extends TestCase array( array( "exception" => 'YooKassa\Common\Exceptions\EmptyPropertyValueException', - "value" => '', + "value" => '', ), ), array( array( "exception" => 'YooKassa\Common\Exceptions\EmptyPropertyValueException', - "value" => null, + "value" => null, ), ), array( array( "exception" => 'YooKassa\Common\Exceptions\InvalidPropertyValueTypeException', - "value" => new \stdClass(), + "value" => new stdClass(), ), ), array( array( "exception" => 'YooKassa\Common\Exceptions\InvalidPropertyValueTypeException', - "value" => array(1, 2, 3), + "value" => array(1, 2, 3), ), ), ); @@ -223,13 +224,13 @@ class AirlineTest extends TestCase array( array( "exception" => 'YooKassa\Common\Exceptions\InvalidPropertyValueTypeException', - "value" => array(), + "value" => array(), ), ), array( array( "exception" => 'YooKassa\Common\Exceptions\InvalidPropertyValueException', - "value" => 'stringThatGreaterThanNeededCharsLongAndActuallyNotValidAtAll123', + "value" => 'stringThatGreaterThanNeededCharsLongAndActuallyNotValidAtAll123', ), ), ); diff --git a/tests/Model/AuthorizationDetailsTest.php b/tests/Model/AuthorizationDetailsTest.php index aca02b5e..0070f4a8 100644 --- a/tests/Model/AuthorizationDetailsTest.php +++ b/tests/Model/AuthorizationDetailsTest.php @@ -25,7 +25,9 @@ namespace Tests\YooKassa\Model; +use Exception; use PHPUnit\Framework\TestCase; +use StdClass; use YooKassa\Helpers\Random; use YooKassa\Model\AuthorizationDetails; use YooKassa\Model\ThreeDSecure; @@ -123,7 +125,7 @@ class AuthorizationDetailsTest extends TestCase $instance = self::getInstance(); try { $instance->setRrn($value); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } @@ -138,7 +140,7 @@ class AuthorizationDetailsTest extends TestCase $instance = self::getInstance(); try { $instance->setAuthCode($value); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } @@ -153,21 +155,21 @@ class AuthorizationDetailsTest extends TestCase $instance = self::getInstance(); try { $instance->setThreeDSecure($value); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } /** * @return array - * @throws \Exception + * @throws Exception */ public function validDataProvider() { return array( array( 'authorizationDetails' => array( - 'rrn' => null, + 'rrn' => null, 'auth_code' => null, 'three_d_secure' => array( 'applied' => false @@ -176,7 +178,7 @@ class AuthorizationDetailsTest extends TestCase ), array( 'authorizationDetails' => array( - 'rrn' => '', + 'rrn' => '', 'auth_code' => '', 'three_d_secure' => array( 'applied' => false @@ -185,22 +187,22 @@ class AuthorizationDetailsTest extends TestCase ), array( 'authorizationDetails' => array( - 'rrn' => Random::str(32), + 'rrn' => Random::str(32), 'auth_code' => Random::str(32), 'three_d_secure' => array( 'applied' => true ) ) ), - array( - 'authorizationDetails' => array( - 'rrn' => Random::str(32), - 'auth_code' => Random::str(32), - 'three_d_secure' => new ThreeDSecure(array( - 'applied' => true - )) - ) - ) + array( + 'authorizationDetails' => array( + 'rrn' => Random::str(32), + 'auth_code' => Random::str(32), + 'three_d_secure' => new ThreeDSecure(array( + 'applied' => true + )) + ) + ) ); } @@ -215,7 +217,7 @@ class AuthorizationDetailsTest extends TestCase array(0.0, $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(new \StdClass(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(new StdClass(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), ); } @@ -229,7 +231,7 @@ class AuthorizationDetailsTest extends TestCase $instance = new AuthorizationDetails($authorizationDetails); $expected = array( - 'rrn' => $authorizationDetails['rrn'], + 'rrn' => $authorizationDetails['rrn'], 'auth_code' => $authorizationDetails['auth_code'], 'three_d_secure' => is_object($authorizationDetails['three_d_secure']) diff --git a/tests/Model/CancellationDetailsTest.php b/tests/Model/CancellationDetailsTest.php index fd6a24a9..6cfc97a6 100644 --- a/tests/Model/CancellationDetailsTest.php +++ b/tests/Model/CancellationDetailsTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Model; +use Exception; use PHPUnit\Framework\TestCase; use YooKassa\Model\CancellationDetails; use YooKassa\Model\CancellationDetailsPartyCode; @@ -100,7 +101,7 @@ class CancellationDetailsTest extends TestCase $instance = self::getInstance(); try { $instance->setParty($value); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } @@ -115,7 +116,7 @@ class CancellationDetailsTest extends TestCase $instance = self::getInstance(); try { $instance->reason = $value; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } @@ -125,14 +126,14 @@ class CancellationDetailsTest extends TestCase */ public function validDataProvider() { - $result = array(); - $cancellationDetailsParties = CancellationDetailsPartyCode::getValidValues(); + $result = array(); + $cancellationDetailsParties = CancellationDetailsPartyCode::getValidValues(); $countCancellationDetailsParties = count($cancellationDetailsParties); - $cancellationDetailsReasons = CancellationDetailsReasonCode::getValidValues(); + $cancellationDetailsReasons = CancellationDetailsReasonCode::getValidValues(); $countCancellationDetailsReasons = count($cancellationDetailsReasons); for ($i = 0; $i < 20; $i++) { $result[] = array( - 'party' => $cancellationDetailsParties[$i % $countCancellationDetailsParties], + 'party' => $cancellationDetailsParties[$i % $countCancellationDetailsParties], 'reason' => $cancellationDetailsReasons[$i % $countCancellationDetailsReasons] ); } @@ -162,7 +163,7 @@ class CancellationDetailsTest extends TestCase { $instance = new CancellationDetails($party, $reason); $expected = array( - 'party' => $party, + 'party' => $party, 'reason' => $reason, ); self::assertEquals($expected, $instance->jsonSerialize()); diff --git a/tests/Model/Confirmation/AbstractConfirmationTest.php b/tests/Model/Confirmation/AbstractConfirmationTestCase.php similarity index 91% rename from tests/Model/Confirmation/AbstractConfirmationTest.php rename to tests/Model/Confirmation/AbstractConfirmationTestCase.php index 37c95cbd..8569e455 100644 --- a/tests/Model/Confirmation/AbstractConfirmationTest.php +++ b/tests/Model/Confirmation/AbstractConfirmationTestCase.php @@ -25,11 +25,13 @@ namespace Tests\YooKassa\Model\Confirmation; +use Exception; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\Confirmation\AbstractConfirmation; -abstract class AbstractConfirmationTest extends TestCase +abstract class AbstractConfirmationTestCase extends TestCase { /** * @return AbstractConfirmation @@ -52,17 +54,17 @@ abstract class AbstractConfirmationTest extends TestCase /** * @dataProvider invalidTypeDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testInvalidType($value) { + $this->expectException('InvalidArgumentException'); new TestConfirmation($value); } /** * @return array - * @throws \Exception + * @throws Exception */ public function invalidTypeDataProvider() { @@ -72,7 +74,7 @@ abstract class AbstractConfirmationTest extends TestCase array(Random::str(40)), array(0), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } } diff --git a/tests/Model/Confirmation/ConfirmationCodeVerificationTest.php b/tests/Model/Confirmation/ConfirmationCodeVerificationTest.php index 81584149..5f5fb321 100644 --- a/tests/Model/Confirmation/ConfirmationCodeVerificationTest.php +++ b/tests/Model/Confirmation/ConfirmationCodeVerificationTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\Confirmation; use YooKassa\Model\Confirmation\ConfirmationCodeVerification; use YooKassa\Model\ConfirmationType; -class ConfirmationCodeVerificationTest extends AbstractConfirmationTest +class ConfirmationCodeVerificationTest extends AbstractConfirmationTestCase { /** * @return ConfirmationCodeVerification diff --git a/tests/Model/Confirmation/ConfirmationEmbeddedTest.php b/tests/Model/Confirmation/ConfirmationEmbeddedTest.php index 9fa42e64..b8cc46c5 100644 --- a/tests/Model/Confirmation/ConfirmationEmbeddedTest.php +++ b/tests/Model/Confirmation/ConfirmationEmbeddedTest.php @@ -25,12 +25,13 @@ namespace Model\Confirmation; -use Tests\YooKassa\Model\Confirmation\AbstractConfirmationTest; +use stdClass; +use Tests\YooKassa\Model\Confirmation\AbstractConfirmationTestCase; use YooKassa\Model\Confirmation\AbstractConfirmation; use YooKassa\Model\Confirmation\ConfirmationEmbedded; use YooKassa\Model\ConfirmationType; -class ConfirmationEmbeddedTest extends AbstractConfirmationTest +class ConfirmationEmbeddedTest extends AbstractConfirmationTestCase { /** * @return AbstractConfirmation @@ -70,7 +71,7 @@ class ConfirmationEmbeddedTest extends AbstractConfirmationTest self::assertEquals($value, $instance->confirmationToken); } - $instance = $this->getTestInstance(); + $instance = $this->getTestInstance(); $instance->confirmationToken = $value; if ($value === null || $value === '') { self::assertNull($instance->getConfirmationToken()); @@ -83,11 +84,11 @@ class ConfirmationEmbeddedTest extends AbstractConfirmationTest /** * @dataProvider invalidConfirmationTokenDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testIvalidSetConfirmationToken($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->setConfirmationToken($value); } @@ -104,7 +105,7 @@ class ConfirmationEmbeddedTest extends AbstractConfirmationTest public function invalidConfirmationTokenDataProvider() { return array( - array(new \stdClass()) + array(new stdClass()) ); } } diff --git a/tests/Model/Confirmation/ConfirmationExternalTest.php b/tests/Model/Confirmation/ConfirmationExternalTest.php index 9b7b50a1..2a7f4644 100644 --- a/tests/Model/Confirmation/ConfirmationExternalTest.php +++ b/tests/Model/Confirmation/ConfirmationExternalTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\Confirmation; use YooKassa\Model\Confirmation\ConfirmationExternal; use YooKassa\Model\ConfirmationType; -class ConfirmationExternalTest extends AbstractConfirmationTest +class ConfirmationExternalTest extends AbstractConfirmationTestCase { /** * @return ConfirmationExternal diff --git a/tests/Model/Confirmation/ConfirmationFactoryTest.php b/tests/Model/Confirmation/ConfirmationFactoryTest.php index 71844114..9cb374f6 100644 --- a/tests/Model/Confirmation/ConfirmationFactoryTest.php +++ b/tests/Model/Confirmation/ConfirmationFactoryTest.php @@ -26,6 +26,7 @@ namespace Model\Confirmation; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\Confirmation\AbstractConfirmation; use YooKassa\Model\Confirmation\ConfirmationFactory; @@ -56,11 +57,11 @@ class ConfirmationFactoryTest extends TestCase /** * @dataProvider invalidTypeDataProvider - * @expectedException \InvalidArgumentException * @param $type */ public function testInvalidFactory($type) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->factory($type); } @@ -94,11 +95,11 @@ class ConfirmationFactoryTest extends TestCase /** * @dataProvider invalidDataArrayDataProvider - * @expectedException \InvalidArgumentException * @param $options */ public function testInvalidFactoryFromArray($options) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->factoryFromArray($options); } @@ -122,7 +123,7 @@ class ConfirmationFactoryTest extends TestCase array(-1), array('5'), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(10)), ); } diff --git a/tests/Model/Confirmation/ConfirmationMobileApplicationTest.php b/tests/Model/Confirmation/ConfirmationMobileApplicationTest.php index c4a859aa..b3e127a6 100644 --- a/tests/Model/Confirmation/ConfirmationMobileApplicationTest.php +++ b/tests/Model/Confirmation/ConfirmationMobileApplicationTest.php @@ -25,10 +25,11 @@ namespace Tests\YooKassa\Model\Confirmation; +use stdClass; use YooKassa\Model\Confirmation\ConfirmationMobileApplication; use YooKassa\Model\ConfirmationType; -class ConfirmationMobileApplicationTest extends AbstractConfirmationTest +class ConfirmationMobileApplicationTest extends AbstractConfirmationTestCase { /** * @return ConfirmationMobileApplication @@ -99,33 +100,33 @@ class ConfirmationMobileApplicationTest extends AbstractConfirmationTest /** * @dataProvider invalidUrlDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidReturnUrl($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->setReturnUrl($value); } /** * @dataProvider invalidUrlDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidReturnUrl($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->returnUrl = $value; } /** * @dataProvider invalidUrlDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidReturn_url($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->return_url = $value; } @@ -183,33 +184,33 @@ class ConfirmationMobileApplicationTest extends AbstractConfirmationTest /** * @dataProvider invalidUrlDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidConfirmationUrl($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->setConfirmationUrl($value); } /** * @dataProvider invalidUrlDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidConfirmationUrl($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->confirmationUrl = $value; } /** * @dataProvider invalidUrlDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidConfirmation_url($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->confirmation_url = $value; } @@ -233,7 +234,7 @@ class ConfirmationMobileApplicationTest extends AbstractConfirmationTest array('true'), array('false'), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } @@ -252,7 +253,7 @@ class ConfirmationMobileApplicationTest extends AbstractConfirmationTest array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } } diff --git a/tests/Model/Confirmation/ConfirmationQrTest.php b/tests/Model/Confirmation/ConfirmationQrTest.php index 6e7f094f..445cdfd5 100644 --- a/tests/Model/Confirmation/ConfirmationQrTest.php +++ b/tests/Model/Confirmation/ConfirmationQrTest.php @@ -25,10 +25,11 @@ namespace Tests\YooKassa\Model\Confirmation; +use stdClass; use YooKassa\Model\Confirmation\ConfirmationQr; use YooKassa\Model\ConfirmationType; -class ConfirmationQrTest extends AbstractConfirmationTest +class ConfirmationQrTest extends AbstractConfirmationTestCase { /** * @return ConfirmationQr @@ -99,33 +100,33 @@ class ConfirmationQrTest extends AbstractConfirmationTest /** * @dataProvider invalidUrlDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidConfirmationData($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->setConfirmationData($value); } /** * @dataProvider invalidUrlDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidConfirmationData($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->confirmationData = $value; } /** * @dataProvider invalidUrlDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidConfirmation_data($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->confirmation_data = $value; } @@ -149,7 +150,7 @@ class ConfirmationQrTest extends AbstractConfirmationTest array('true'), array('false'), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } @@ -169,7 +170,7 @@ class ConfirmationQrTest extends AbstractConfirmationTest array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } } diff --git a/tests/Model/Confirmation/ConfirmationRedirectTest.php b/tests/Model/Confirmation/ConfirmationRedirectTest.php index 2c5ff089..317146b0 100644 --- a/tests/Model/Confirmation/ConfirmationRedirectTest.php +++ b/tests/Model/Confirmation/ConfirmationRedirectTest.php @@ -25,10 +25,11 @@ namespace Tests\YooKassa\Model\Confirmation; +use stdClass; use YooKassa\Model\Confirmation\ConfirmationRedirect; use YooKassa\Model\ConfirmationType; -class ConfirmationRedirectTest extends AbstractConfirmationTest +class ConfirmationRedirectTest extends AbstractConfirmationTestCase { /** * @return ConfirmationRedirect @@ -79,22 +80,22 @@ class ConfirmationRedirectTest extends AbstractConfirmationTest /** * @dataProvider invalidEnforceDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidEnforce($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->setEnforce($value); } /** * @dataProvider invalidEnforceDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidEnforce($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->enforce = $value; } @@ -152,33 +153,33 @@ class ConfirmationRedirectTest extends AbstractConfirmationTest /** * @dataProvider invalidUrlDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidReturnUrl($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->setReturnUrl($value); } /** * @dataProvider invalidUrlDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidReturnUrl($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->returnUrl = $value; } /** * @dataProvider invalidUrlDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidReturn_url($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->return_url = $value; } @@ -236,33 +237,33 @@ class ConfirmationRedirectTest extends AbstractConfirmationTest /** * @dataProvider invalidUrlDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidConfirmationUrl($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->setConfirmationUrl($value); } /** * @dataProvider invalidUrlDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidConfirmationUrl($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->confirmationUrl = $value; } /** * @dataProvider invalidUrlDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidConfirmation_url($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->confirmation_url = $value; } @@ -286,7 +287,7 @@ class ConfirmationRedirectTest extends AbstractConfirmationTest array('true'), array('false'), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } @@ -305,7 +306,7 @@ class ConfirmationRedirectTest extends AbstractConfirmationTest array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } } diff --git a/tests/Model/ConfirmationAttributes/AbstractConfirmationAttributesTest.php b/tests/Model/ConfirmationAttributes/AbstractConfirmationAttributesTestCase.php similarity index 90% rename from tests/Model/ConfirmationAttributes/AbstractConfirmationAttributesTest.php rename to tests/Model/ConfirmationAttributes/AbstractConfirmationAttributesTestCase.php index 601c172a..f3b690b9 100644 --- a/tests/Model/ConfirmationAttributes/AbstractConfirmationAttributesTest.php +++ b/tests/Model/ConfirmationAttributes/AbstractConfirmationAttributesTestCase.php @@ -25,11 +25,13 @@ namespace Tests\YooKassa\Model\ConfirmationAttributes; +use Exception; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\ConfirmationAttributes\AbstractConfirmationAttributes; -abstract class AbstractConfirmationAttributesTest extends TestCase +abstract class AbstractConfirmationAttributesTestCase extends TestCase { /** * @return AbstractConfirmationAttributes @@ -52,11 +54,11 @@ abstract class AbstractConfirmationAttributesTest extends TestCase /** * @dataProvider invalidTypeDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testInvalidType($value) { + $this->expectException('InvalidArgumentException'); new TestConfirmation($value); } @@ -68,7 +70,7 @@ abstract class AbstractConfirmationAttributesTest extends TestCase array(Random::str(40)), array(0), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } @@ -87,7 +89,7 @@ abstract class AbstractConfirmationAttributesTest extends TestCase /** * @return array - * @throws \Exception + * @throws Exception */ public function validLocaleDataProvider() { @@ -96,7 +98,7 @@ abstract class AbstractConfirmationAttributesTest extends TestCase array(null), array( Random::str(2, 2, 'abcdefghijklmnopqrtuvwxyz') - . '_' . + . '_' . Random::str(2, 2, 'ABCDEFGHIJKLMNOPQRTUVWXYZ') ), array('ru_RU'), @@ -106,18 +108,18 @@ abstract class AbstractConfirmationAttributesTest extends TestCase /** * @dataProvider invalidLocaleDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidLocale($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setLocale($value); } /** * @return array - * @throws \Exception + * @throws Exception */ public function invalidLocaleDataProvider() { @@ -126,10 +128,10 @@ abstract class AbstractConfirmationAttributesTest extends TestCase array(Random::str(6)), array(0), array(array()), - array(new \stdClass()), + array(new stdClass()), array( Random::str(2, 2, 'ABCDEFGHIJKLMNOPQRTUVWXYZ') - . '_' . + . '_' . Random::str(2, 2, 'abcdefghijklmnopqrtuvwxyz') ), ); diff --git a/tests/Model/ConfirmationAttributes/ConfirmationAttributesCodeVerificationTest.php b/tests/Model/ConfirmationAttributes/ConfirmationAttributesCodeVerificationTest.php index 3efae35f..129ec98a 100644 --- a/tests/Model/ConfirmationAttributes/ConfirmationAttributesCodeVerificationTest.php +++ b/tests/Model/ConfirmationAttributes/ConfirmationAttributesCodeVerificationTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\ConfirmationAttributes; use YooKassa\Model\ConfirmationAttributes\ConfirmationAttributesCodeVerification; use YooKassa\Model\ConfirmationType; -class ConfirmationAttributesCodeVerificationTest extends AbstractConfirmationAttributesTest +class ConfirmationAttributesCodeVerificationTest extends AbstractConfirmationAttributesTestCase { /** * @return ConfirmationAttributesCodeVerification diff --git a/tests/Model/ConfirmationAttributes/ConfirmationAttributesEmbeddedTest.php b/tests/Model/ConfirmationAttributes/ConfirmationAttributesEmbeddedTest.php index 9e4ffc4d..4d6b67b2 100644 --- a/tests/Model/ConfirmationAttributes/ConfirmationAttributesEmbeddedTest.php +++ b/tests/Model/ConfirmationAttributes/ConfirmationAttributesEmbeddedTest.php @@ -25,12 +25,12 @@ namespace Model\ConfirmationAttributes; -use Tests\YooKassa\Model\ConfirmationAttributes\AbstractConfirmationAttributesTest; +use Tests\YooKassa\Model\ConfirmationAttributes\AbstractConfirmationAttributesTestCase; use YooKassa\Model\ConfirmationAttributes\AbstractConfirmationAttributes; use YooKassa\Model\ConfirmationAttributes\ConfirmationAttributesEmbedded; use YooKassa\Model\ConfirmationType; -class ConfirmationAttributesEmbeddedTest extends AbstractConfirmationAttributesTest +class ConfirmationAttributesEmbeddedTest extends AbstractConfirmationAttributesTestCase { /** * @return AbstractConfirmationAttributes diff --git a/tests/Model/ConfirmationAttributes/ConfirmationAttributesExternalTest.php b/tests/Model/ConfirmationAttributes/ConfirmationAttributesExternalTest.php index f69a4dca..c10545c0 100644 --- a/tests/Model/ConfirmationAttributes/ConfirmationAttributesExternalTest.php +++ b/tests/Model/ConfirmationAttributes/ConfirmationAttributesExternalTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\ConfirmationAttributes; use YooKassa\Model\ConfirmationAttributes\ConfirmationAttributesExternal; use YooKassa\Model\ConfirmationType; -class ConfirmationAttributesExternalTest extends AbstractConfirmationAttributesTest +class ConfirmationAttributesExternalTest extends AbstractConfirmationAttributesTestCase { /** * @return ConfirmationAttributesExternal diff --git a/tests/Model/ConfirmationAttributes/ConfirmationAttributesFactoryTest.php b/tests/Model/ConfirmationAttributes/ConfirmationAttributesFactoryTest.php index 0b59a2ef..1e78d436 100644 --- a/tests/Model/ConfirmationAttributes/ConfirmationAttributesFactoryTest.php +++ b/tests/Model/ConfirmationAttributes/ConfirmationAttributesFactoryTest.php @@ -26,6 +26,7 @@ namespace Model\ConfirmationAttributes; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\ConfirmationAttributes\AbstractConfirmationAttributes; use YooKassa\Model\ConfirmationAttributes\ConfirmationAttributesFactory; @@ -56,11 +57,11 @@ class ConfirmationAttributesFactoryTest extends TestCase /** * @dataProvider invalidTypeDataProvider - * @expectedException \InvalidArgumentException * @param $type */ public function testInvalidFactory($type) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->factory($type); } @@ -94,11 +95,11 @@ class ConfirmationAttributesFactoryTest extends TestCase /** * @dataProvider invalidDataArrayDataProvider - * @expectedException \InvalidArgumentException * @param $options */ public function testInvalidFactoryFromArray($options) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->factoryFromArray($options); } @@ -122,7 +123,7 @@ class ConfirmationAttributesFactoryTest extends TestCase array(-1), array('5'), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(10)), ); } diff --git a/tests/Model/ConfirmationAttributes/ConfirmationAttributesMobileApplicationTest.php b/tests/Model/ConfirmationAttributes/ConfirmationAttributesMobileApplicationTest.php index cc3e4173..f9fd3343 100644 --- a/tests/Model/ConfirmationAttributes/ConfirmationAttributesMobileApplicationTest.php +++ b/tests/Model/ConfirmationAttributes/ConfirmationAttributesMobileApplicationTest.php @@ -25,10 +25,11 @@ namespace Tests\YooKassa\Model\ConfirmationAttributes; +use stdClass; use YooKassa\Model\ConfirmationAttributes\ConfirmationAttributesMobileApplication; use YooKassa\Model\ConfirmationType; -class ConfirmationAttributesMobileApplicationTest extends AbstractConfirmationAttributesTest +class ConfirmationAttributesMobileApplicationTest extends AbstractConfirmationAttributesTestCase { /** * @return ConfirmationAttributesMobileApplication @@ -104,33 +105,33 @@ class ConfirmationAttributesMobileApplicationTest extends AbstractConfirmationAt /** * @dataProvider invalidUrlDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidReturnUrl($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->setReturnUrl($value); } /** * @dataProvider invalidUrlDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidReturnUrl($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->returnUrl = $value; } /** * @dataProvider invalidUrlDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidReturn_url($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->return_url = $value; } @@ -154,7 +155,7 @@ class ConfirmationAttributesMobileApplicationTest extends AbstractConfirmationAt array('true'), array('false'), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } @@ -173,7 +174,7 @@ class ConfirmationAttributesMobileApplicationTest extends AbstractConfirmationAt array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } } diff --git a/tests/Model/ConfirmationAttributes/ConfirmationAttributesQrTest.php b/tests/Model/ConfirmationAttributes/ConfirmationAttributesQrTest.php index 5dfd3ed9..f6108c66 100644 --- a/tests/Model/ConfirmationAttributes/ConfirmationAttributesQrTest.php +++ b/tests/Model/ConfirmationAttributes/ConfirmationAttributesQrTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\ConfirmationAttributes; use YooKassa\Model\ConfirmationAttributes\ConfirmationAttributesQr; use YooKassa\Model\ConfirmationType; -class ConfirmationAttributesQrTest extends AbstractConfirmationAttributesTest +class ConfirmationAttributesQrTest extends AbstractConfirmationAttributesTestCase { /** * @return ConfirmationAttributesQr diff --git a/tests/Model/ConfirmationAttributes/ConfirmationAttributesRedirectTest.php b/tests/Model/ConfirmationAttributes/ConfirmationAttributesRedirectTest.php index bd63f638..e45a63c0 100644 --- a/tests/Model/ConfirmationAttributes/ConfirmationAttributesRedirectTest.php +++ b/tests/Model/ConfirmationAttributes/ConfirmationAttributesRedirectTest.php @@ -25,10 +25,11 @@ namespace Tests\YooKassa\Model\ConfirmationAttributes; +use stdClass; use YooKassa\Model\ConfirmationAttributes\ConfirmationAttributesRedirect; use YooKassa\Model\ConfirmationType; -class ConfirmationAttributesRedirectTest extends AbstractConfirmationAttributesTest +class ConfirmationAttributesRedirectTest extends AbstractConfirmationAttributesTestCase { /** * @return ConfirmationAttributesRedirect @@ -79,22 +80,22 @@ class ConfirmationAttributesRedirectTest extends AbstractConfirmationAttributesT /** * @dataProvider invalidEnforceDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidEnforce($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->setEnforce($value); } /** * @dataProvider invalidEnforceDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidEnforce($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->enforce = $value; } @@ -157,33 +158,33 @@ class ConfirmationAttributesRedirectTest extends AbstractConfirmationAttributesT /** * @dataProvider invalidUrlDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidReturnUrl($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->setReturnUrl($value); } /** * @dataProvider invalidUrlDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidReturnUrl($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->returnUrl = $value; } /** * @dataProvider invalidUrlDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidReturn_url($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->return_url = $value; } @@ -207,7 +208,7 @@ class ConfirmationAttributesRedirectTest extends AbstractConfirmationAttributesT array('true'), array('false'), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } @@ -226,7 +227,7 @@ class ConfirmationAttributesRedirectTest extends AbstractConfirmationAttributesT array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } } diff --git a/tests/Model/Deal/CaptureDealDataTest.php b/tests/Model/Deal/CaptureDealDataTest.php index d560860c..819a2bdf 100644 --- a/tests/Model/Deal/CaptureDealDataTest.php +++ b/tests/Model/Deal/CaptureDealDataTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Model\Deal; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\Deal\CaptureDealData; use YooKassa\Model\Deal\SettlementPayoutPayment; @@ -79,7 +80,7 @@ class CaptureDealDataTest extends TestCase $invalidData = array( array(null), array(''), - array(new \stdClass()), + array(new stdClass()), array('invalid_value'), array(0), array(3234), diff --git a/tests/Model/Deal/DealBalanceAmountTest.php b/tests/Model/Deal/DealBalanceAmountTest.php index be0b5d73..39e92517 100644 --- a/tests/Model/Deal/DealBalanceAmountTest.php +++ b/tests/Model/Deal/DealBalanceAmountTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Model\Deal; +use Exception; use PHPUnit\Framework\TestCase; use YooKassa\Helpers\Random; use YooKassa\Model\CurrencyCode; @@ -109,7 +110,7 @@ class DealBalanceAmountTest extends TestCase $instance = self::getInstance(); try { $instance->setValue($value); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } @@ -124,7 +125,7 @@ class DealBalanceAmountTest extends TestCase $instance = self::getInstance(); try { $instance->value = $value; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } @@ -154,7 +155,7 @@ class DealBalanceAmountTest extends TestCase $instance = self::getInstance(); try { $instance->setCurrency($currency); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } @@ -169,7 +170,7 @@ class DealBalanceAmountTest extends TestCase $instance = self::getInstance(); try { $instance->currency = $currency; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } @@ -237,14 +238,14 @@ class DealBalanceAmountTest extends TestCase { $exceptionNamespace = 'YooKassa\\Common\\Exceptions\\'; return array( - array(null, $exceptionNamespace . 'EmptyPropertyValueException'), - array('', $exceptionNamespace . 'EmptyPropertyValueException'), - array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(null, $exceptionNamespace . 'EmptyPropertyValueException'), + array('', $exceptionNamespace . 'EmptyPropertyValueException'), + array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(fopen(__FILE__, 'r'), $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array('invalid_value', $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), - array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array('invalid_value', $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), + array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), ); } @@ -252,18 +253,18 @@ class DealBalanceAmountTest extends TestCase { $exceptionNamespace = 'YooKassa\\Common\\Exceptions\\'; return array( - array(null, $exceptionNamespace . 'EmptyPropertyValueException'), - array('', $exceptionNamespace . 'EmptyPropertyValueException'), - array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(null, $exceptionNamespace . 'EmptyPropertyValueException'), + array('', $exceptionNamespace . 'EmptyPropertyValueException'), + array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(fopen(__FILE__, 'r'), $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array('invalid_value', $exceptionNamespace . 'InvalidPropertyValueException'), - array('III', $exceptionNamespace . 'InvalidPropertyValueException'), - array(-0.01, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(0.0, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(0, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(0.01, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array('invalid_value', $exceptionNamespace . 'InvalidPropertyValueException'), + array('III', $exceptionNamespace . 'InvalidPropertyValueException'), + array(-0.01, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(0.0, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(0, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(0.01, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), ); } diff --git a/tests/Model/Deal/PaymentDealInfoTest.php b/tests/Model/Deal/PaymentDealInfoTest.php index 31b9c778..06938dc4 100644 --- a/tests/Model/Deal/PaymentDealInfoTest.php +++ b/tests/Model/Deal/PaymentDealInfoTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Model\Deal; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\Deal\PaymentDealInfo; use YooKassa\Model\Deal\SettlementPayoutPayment; @@ -103,7 +104,7 @@ class PaymentDealInfoTest extends TestCase $invalidData = array( array(null), array(''), - array(new \stdClass()), + array(new stdClass()), array('invalid_value'), array(0), array(3234), diff --git a/tests/Model/Deal/RefundDealDataTest.php b/tests/Model/Deal/RefundDealDataTest.php index 547739fa..c320f56f 100644 --- a/tests/Model/Deal/RefundDealDataTest.php +++ b/tests/Model/Deal/RefundDealDataTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Model\Deal; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\Deal\RefundDealData; use YooKassa\Model\Deal\SettlementPayoutPayment; @@ -79,7 +80,7 @@ class RefundDealDataTest extends TestCase $invalidData = array( array(null), array(''), - array(new \stdClass()), + array(new stdClass()), array('invalid_value'), array(0), array(3234), diff --git a/tests/Model/Deal/RefundDealInfoTest.php b/tests/Model/Deal/RefundDealInfoTest.php index b90fd1b9..5a7f9eae 100644 --- a/tests/Model/Deal/RefundDealInfoTest.php +++ b/tests/Model/Deal/RefundDealInfoTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Model\Deal; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\Deal\RefundDealInfo; use YooKassa\Model\Deal\SettlementPayoutPayment; @@ -103,7 +104,7 @@ class RefundDealInfoTest extends TestCase $invalidData = array( array(null), array(''), - array(new \stdClass()), + array(new stdClass()), array('invalid_value'), array(0), array(3234), diff --git a/tests/Model/Deal/SettlementPayoutPaymentTest.php b/tests/Model/Deal/SettlementPayoutPaymentTest.php index 352f39ac..833dfff0 100644 --- a/tests/Model/Deal/SettlementPayoutPaymentTest.php +++ b/tests/Model/Deal/SettlementPayoutPaymentTest.php @@ -25,7 +25,9 @@ namespace Tests\YooKassa\Model; +use Exception; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Common\Exceptions\EmptyPropertyValueException; use YooKassa\Helpers\Random; use YooKassa\Model\AmountInterface; @@ -84,19 +86,18 @@ class SettlementPayoutPaymentTest extends TestCase /** * @dataProvider invalidTypeDataProvider * - * @expectedException \InvalidArgumentException - * @expectedException EmptyPropertyValueException * * @param $value */ public function testSetInvalidType($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setType($value); } /** * @return array - * @throws \Exception + * @throws Exception */ public function validDataProvider() { @@ -160,26 +161,24 @@ class SettlementPayoutPaymentTest extends TestCase /** * @dataProvider invalidAmountDataProvider * - * @expectedException \InvalidArgumentException - * @expectedException EmptyPropertyValueException * * @param $value */ public function testSetInvalidAmount($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setAmount($value); } /** * @dataProvider invalidAmountDataProvider * - * @expectedException \InvalidArgumentException - * @expectedException EmptyPropertyValueException * * @param $value */ public function testSetterInvalidAmount($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->amount = $value; } @@ -192,7 +191,7 @@ class SettlementPayoutPaymentTest extends TestCase array(1), array(true), array(false), - array(new \stdClass()), + array(new stdClass()), ); return $result; @@ -208,7 +207,7 @@ class SettlementPayoutPaymentTest extends TestCase array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(1, 10)), ); diff --git a/tests/Model/FraudDataTest.php b/tests/Model/FraudDataTest.php index 3042e7a2..6ea1a4b4 100644 --- a/tests/Model/FraudDataTest.php +++ b/tests/Model/FraudDataTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Model; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\FraudData; @@ -54,10 +55,10 @@ class FraudDataTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException */ public function testSetInvalidToppedUpPhone($value) { + $this->expectException('InvalidArgumentException'); $instance = new FraudData(); $instance->setToppedUpPhone($value); } @@ -79,7 +80,7 @@ class FraudDataTest extends TestCase public function invalidDataProvider() { return array( - array(new \stdClass()), + array(new stdClass()), array(true), array(false), array(array(123)), diff --git a/tests/Model/LegTest.php b/tests/Model/LegTest.php index a1b87d1b..4f492bd7 100644 --- a/tests/Model/LegTest.php +++ b/tests/Model/LegTest.php @@ -56,7 +56,7 @@ class LegTest extends TestCase { $leg = new Leg(); - $this->setExpectedException($data['exception']); + $this->expectException($data['exception']); $leg->setDepartureAirport($data['value']); } @@ -70,7 +70,7 @@ class LegTest extends TestCase { $leg = new Leg(); - $this->setExpectedException($data['exception']); + $this->expectException($data['exception']); $leg->setDestinationAirport($data['value']); } @@ -84,7 +84,7 @@ class LegTest extends TestCase { $leg = new Leg(); - $this->setExpectedException($data['exception']); + $this->expectException($data['exception']); $leg->setDepartureDate($data['value']); } @@ -94,16 +94,16 @@ class LegTest extends TestCase return array( array( array( - "departure_airport" => "LED", + "departure_airport" => "LED", "destination_airport" => "AMS", - "departure_date" => "2018-06-20", + "departure_date" => "2018-06-20", ), ), array( array( - "departure_airport" => "UGR", + "departure_airport" => "UGR", "destination_airport" => "IVA", - "departure_date" => "2018-06-21", + "departure_date" => "2018-06-21", ), ), ); @@ -115,13 +115,13 @@ class LegTest extends TestCase array( array( "exception" => 'YooKassa\Common\Exceptions\InvalidPropertyValueTypeException', - "value" => array(), + "value" => array(), ), ), array( array( "exception" => 'YooKassa\Common\Exceptions\InvalidPropertyValueException', - "value" => 'stringThatGreaterThanNeededCharsLongAndActuallyNotValidAtAll123', + "value" => 'stringThatGreaterThanNeededCharsLongAndActuallyNotValidAtAll123', ), ), ); diff --git a/tests/Model/MonetaryAmountTest.php b/tests/Model/MonetaryAmountTest.php index 7d0d97a7..b206c9fe 100644 --- a/tests/Model/MonetaryAmountTest.php +++ b/tests/Model/MonetaryAmountTest.php @@ -25,7 +25,9 @@ namespace Tests\YooKassa\Model; +use Exception; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\CurrencyCode; use YooKassa\Model\MonetaryAmount; @@ -109,7 +111,7 @@ class MonetaryAmountTest extends TestCase $instance = self::getInstance(); try { $instance->setValue($value); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } @@ -124,7 +126,7 @@ class MonetaryAmountTest extends TestCase $instance = self::getInstance(); try { $instance->value = $value; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } @@ -154,7 +156,7 @@ class MonetaryAmountTest extends TestCase $instance = self::getInstance(); try { $instance->setCurrency($currency); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } @@ -169,7 +171,7 @@ class MonetaryAmountTest extends TestCase $instance = self::getInstance(); try { $instance->currency = $currency; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } @@ -234,18 +236,18 @@ class MonetaryAmountTest extends TestCase { $exceptionNamespace = 'YooKassa\\Common\\Exceptions\\'; return array( - array(null, $exceptionNamespace . 'EmptyPropertyValueException'), - array('', $exceptionNamespace . 'EmptyPropertyValueException'), - array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(null, $exceptionNamespace . 'EmptyPropertyValueException'), + array('', $exceptionNamespace . 'EmptyPropertyValueException'), + array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(fopen(__FILE__, 'r'), $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array('invalid_value', $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(-1, $exceptionNamespace . 'InvalidPropertyValueException'), - array(-0.01, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0.0, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), - array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array('invalid_value', $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(-1, $exceptionNamespace . 'InvalidPropertyValueException'), + array(-0.01, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0.0, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), + array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), ); } @@ -253,18 +255,18 @@ class MonetaryAmountTest extends TestCase { $exceptionNamespace = 'YooKassa\\Common\\Exceptions\\'; return array( - array(null, $exceptionNamespace . 'EmptyPropertyValueException'), - array('', $exceptionNamespace . 'EmptyPropertyValueException'), - array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(null, $exceptionNamespace . 'EmptyPropertyValueException'), + array('', $exceptionNamespace . 'EmptyPropertyValueException'), + array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(fopen(__FILE__, 'r'), $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array('invalid_value', $exceptionNamespace . 'InvalidPropertyValueException'), - array('III', $exceptionNamespace . 'InvalidPropertyValueException'), - array(-0.01, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(0.0, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(0, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(0.01, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array('invalid_value', $exceptionNamespace . 'InvalidPropertyValueException'), + array('III', $exceptionNamespace . 'InvalidPropertyValueException'), + array(-0.01, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(0.0, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(0, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(0.01, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), ); } @@ -293,12 +295,12 @@ class MonetaryAmountTest extends TestCase /** * @dataProvider invalidMultiplyDataProvider - * @expectedException \InvalidArgumentException * @param $source * @param $coefficient */ public function testInvalidMultiply($source, $coefficient) { + $this->expectException('InvalidArgumentException'); $instance = new MonetaryAmount($source); $instance->multiply($coefficient); } @@ -311,7 +313,7 @@ class MonetaryAmountTest extends TestCase array(1.00, true), array(0.99, false), array(0.99, array()), - array(0.99, new \stdClass()), + array(0.99, new stdClass()), array(0.99, 'test'), array(0.99, -1.0), array(0.99, -0.0), @@ -345,12 +347,12 @@ class MonetaryAmountTest extends TestCase /** * @dataProvider invalidIncreaseDataProvider - * @expectedException \InvalidArgumentException * @param $source * @param $amount */ public function testInvalidIncrease($source, $amount) { + $this->expectException('InvalidArgumentException'); $instance = new MonetaryAmount($source); $instance->increase($amount); } @@ -363,7 +365,7 @@ class MonetaryAmountTest extends TestCase array(1.00, true), array(0.99, false), array(0.99, array()), - array(0.99, new \stdClass()), + array(0.99, new stdClass()), array(0.99, 'test'), array(0.99, -1.0), array(0.99, -0.99), diff --git a/tests/Model/Notification/AbstractNotificationTest.php b/tests/Model/Notification/AbstractNotificationTestCase.php similarity index 92% rename from tests/Model/Notification/AbstractNotificationTest.php rename to tests/Model/Notification/AbstractNotificationTestCase.php index 016c5372..01d70edc 100644 --- a/tests/Model/Notification/AbstractNotificationTest.php +++ b/tests/Model/Notification/AbstractNotificationTestCase.php @@ -26,10 +26,11 @@ namespace Tests\YooKassa\Model\Notification; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\Notification\AbstractNotification; -abstract class AbstractNotificationTest extends TestCase +abstract class AbstractNotificationTestCase extends TestCase { /** * @param array $source @@ -64,11 +65,11 @@ abstract class AbstractNotificationTest extends TestCase /** * @dataProvider invalidConstructorTypeDataProvider - * @expectedException \InvalidArgumentException * @param array $source */ public function testInvalidTypeInConstructor(array $source) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance($source); } @@ -84,31 +85,31 @@ abstract class AbstractNotificationTest extends TestCase /** * @dataProvider invalidConstructorEventDataProvider - * @expectedException \InvalidArgumentException * @param array $source */ public function testInvalidEventInConstructor(array $source) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance($source); } /** * @dataProvider invalidTypeDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testInvalidType($value) { + $this->expectException('InvalidArgumentException'); new TestNotification($value, $this->getExpectedEvent()); } /** * @dataProvider invalidEventDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testInvalidEvent($value) { + $this->expectException('InvalidArgumentException'); new TestNotification($this->getExpectedType(), $value); } @@ -142,7 +143,7 @@ abstract class AbstractNotificationTest extends TestCase array(Random::str(40)), array(0), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } @@ -154,7 +155,7 @@ abstract class AbstractNotificationTest extends TestCase array(Random::str(40)), array(0), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } } diff --git a/tests/Model/Notification/NotificationCanceledTest.php b/tests/Model/Notification/NotificationCanceledTest.php index 946e3793..1dca1642 100644 --- a/tests/Model/Notification/NotificationCanceledTest.php +++ b/tests/Model/Notification/NotificationCanceledTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Model\Notification; +use Exception; use PHPUnit\Framework\TestCase; use YooKassa\Helpers\Random; use YooKassa\Model\ConfirmationType; @@ -79,16 +80,16 @@ class NotificationCanceledTest extends TestCase /** * @dataProvider invalidDataProvider * @param array $options - * @expectedException \InvalidArgumentException */ public function testInvalidFromArray($options) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance($options); } /** * @return array - * @throws \Exception + * @throws Exception */ public function validDataProvider() { diff --git a/tests/Model/Notification/NotificationDealClosedTest.php b/tests/Model/Notification/NotificationDealClosedTest.php index 2addfe23..da284091 100644 --- a/tests/Model/Notification/NotificationDealClosedTest.php +++ b/tests/Model/Notification/NotificationDealClosedTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Model\Notification; +use Exception; use YooKassa\Helpers\Random; use YooKassa\Model\CurrencyCode; use YooKassa\Model\Deal\DealStatus; @@ -35,12 +36,12 @@ use YooKassa\Model\NotificationEventType; use YooKassa\Model\NotificationType; use YooKassa\Model\DealInterface; -class NotificationDealClosedTest extends AbstractNotificationTest +class NotificationDealClosedTest extends AbstractNotificationTestCase { /** * @param array $source * @return NotificationDealClosed - * @throws \Exception + * @throws Exception */ protected function getTestInstance(array $source) { @@ -76,7 +77,7 @@ class NotificationDealClosedTest extends AbstractNotificationTest /** * @return array - * @throws \Exception + * @throws Exception */ public function validDataProvider() { @@ -121,7 +122,7 @@ class NotificationDealClosedTest extends AbstractNotificationTest array( 'type' => $this->getExpectedType(), 'event' => $this->getExpectedEvent(), - 'object' => array( + 'object' => array( 'id' => Random::str(36), 'type' => Random::value($types), 'status' => Random::value($statuses), diff --git a/tests/Model/Notification/NotificationFactoryTest.php b/tests/Model/Notification/NotificationFactoryTest.php index 3918136f..61fd0cdd 100644 --- a/tests/Model/Notification/NotificationFactoryTest.php +++ b/tests/Model/Notification/NotificationFactoryTest.php @@ -25,7 +25,9 @@ namespace Tests\YooKassa\Model\Notification; +use Exception; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\ConfirmationType; use YooKassa\Model\CurrencyCode; @@ -61,11 +63,11 @@ class NotificationFactoryTest extends TestCase /** * @dataProvider invalidDataArrayDataProvider - * @expectedException \InvalidArgumentException * @param $options */ public function testInvalidFactory($options) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->factory($options); } @@ -94,7 +96,7 @@ class NotificationFactoryTest extends TestCase /** * @return array - * @throws \Exception + * @throws Exception */ public function validArrayDataProvider() { @@ -129,32 +131,32 @@ class NotificationFactoryTest extends TestCase array(array()), array(array('type' => 'test')), array(array('event' => 'test')), - array(array('event' => new \stdClass())), + array(array('event' => new stdClass())), ); } private function getRefundNotification() { - $statuses = RefundStatus::getValidValues(); + $statuses = RefundStatus::getValidValues(); $receiptRegistrations = ReceiptRegistrationStatus::getValidValues(); $refund = array( - 'id' => Random::str(36), - 'payment_id' => Random::str(36), - 'status' => Random::value($statuses), - 'amount' => array( - 'value' => Random::float(0.01, 1000000.0), + 'id' => Random::str(36), + 'payment_id' => Random::str(36), + 'status' => Random::value($statuses), + 'amount' => array( + 'value' => Random::float(0.01, 1000000.0), 'currency' => Random::value(CurrencyCode::getValidValues()), ), - 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), + 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'receipt_registration' => Random::value($receiptRegistrations), - 'description' => Random::str(1, 128), + 'description' => Random::str(1, 128), ); return array( array( - 'type' => $this->getExpectedType(), - 'event' => NotificationEventType::REFUND_SUCCEEDED, + 'type' => $this->getExpectedType(), + 'event' => NotificationEventType::REFUND_SUCCEEDED, 'object' => $refund, ), ); @@ -239,7 +241,7 @@ class NotificationFactoryTest extends TestCase 'status' => Random::value(PayoutStatus::getValidValues()), 'amount' => array('value' => Random::int(1, 10000), 'currency' => 'RUB'), 'description' => Random::str(1, Payout::MAX_LENGTH_DESCRIPTION), - 'payout_destination' => $payoutDestinations[Random::value(array(PaymentMethodType::YOO_MONEY,PaymentMethodType::BANK_CARD))], + 'payout_destination' => $payoutDestinations[Random::value(array(PaymentMethodType::YOO_MONEY, PaymentMethodType::BANK_CARD))], 'created_at' => date(YOOKASSA_DATE, mt_rand(111111111, time())), 'test' => true, 'deal' => array('id' => Random::str(36, 50)), @@ -304,7 +306,7 @@ class NotificationFactoryTest extends TestCase /** * @return mixed - * @throws \Exception + * @throws Exception */ protected function getExpectedEvent() { @@ -312,7 +314,7 @@ class NotificationFactoryTest extends TestCase } /** - * @throws \Exception + * @throws Exception */ private function assertObject($event, $object, $value) { diff --git a/tests/Model/Notification/NotificationPayoutCanceledTest.php b/tests/Model/Notification/NotificationPayoutCanceledTest.php index 1fe81078..cb5f4d74 100644 --- a/tests/Model/Notification/NotificationPayoutCanceledTest.php +++ b/tests/Model/Notification/NotificationPayoutCanceledTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Model\Notification; +use Exception; use YooKassa\Helpers\Random; use YooKassa\Model\Notification\NotificationPayoutCanceled; use YooKassa\Model\NotificationEventType; @@ -36,12 +37,12 @@ use YooKassa\Model\Payout\PayoutCancellationDetailsPartyCode; use YooKassa\Model\Payout\PayoutCancellationDetailsReasonCode; use YooKassa\Model\PayoutStatus; -class NotificationPayoutCanceledTest extends AbstractNotificationTest +class NotificationPayoutCanceledTest extends AbstractNotificationTestCase { /** * @param array $source * @return NotificationPayoutCanceled - * @throws \Exception + * @throws Exception */ protected function getTestInstance(array $source) { @@ -77,7 +78,7 @@ class NotificationPayoutCanceledTest extends AbstractNotificationTest /** * @return array - * @throws \Exception + * @throws Exception */ public function validDataProvider() { @@ -103,12 +104,12 @@ class NotificationPayoutCanceledTest extends AbstractNotificationTest array( 'type' => $this->getExpectedType(), 'event' => $this->getExpectedEvent(), - 'object' => array( + 'object' => array( 'id' => Random::str(36, 50), 'status' => Random::value(PayoutStatus::getValidValues()), 'amount' => array('value' => Random::int(1, 10000), 'currency' => 'RUB'), 'description' => Random::str(1, Payout::MAX_LENGTH_DESCRIPTION), - 'payout_destination' => $payoutDestinations[Random::value(array(PaymentMethodType::YOO_MONEY,PaymentMethodType::BANK_CARD))], + 'payout_destination' => $payoutDestinations[Random::value(array(PaymentMethodType::YOO_MONEY, PaymentMethodType::BANK_CARD))], 'created_at' => date(YOOKASSA_DATE, mt_rand(111111111, time())), 'test' => true, 'deal' => array('id' => Random::str(36, 50)), @@ -125,10 +126,10 @@ class NotificationPayoutCanceledTest extends AbstractNotificationTest $object = array( 'id' => Random::str(36, 50), 'status' => Random::value(PayoutStatus::getValidValues()), - 'amount' => array('value' => Random::int(1, 10000), 'currency' => 'RUB'), + 'amount' => array('value' => Random::int(1, 10000), 'currency' => 'RUB'), 'description' => ($i == 0 ? null : ($i == 1 ? '' : ($i == 2 ? Random::str(Payout::MAX_LENGTH_DESCRIPTION) : Random::str(1, Payout::MAX_LENGTH_DESCRIPTION)))), - 'payout_destination' => $payoutDestinations[Random::value(array(PaymentMethodType::YOO_MONEY,PaymentMethodType::BANK_CARD))], + 'payout_destination' => $payoutDestinations[Random::value(array(PaymentMethodType::YOO_MONEY, PaymentMethodType::BANK_CARD))], 'created_at' => date(YOOKASSA_DATE, mt_rand(1, time())), 'test' => (bool)($i % 2), 'metadata' => array(Random::str(3, 128, 'abcdefghijklmnopqrstuvwxyz') => Random::str(1, 512)), diff --git a/tests/Model/Notification/NotificationPayoutSucceededTest.php b/tests/Model/Notification/NotificationPayoutSucceededTest.php index 9940eba1..1678aed1 100644 --- a/tests/Model/Notification/NotificationPayoutSucceededTest.php +++ b/tests/Model/Notification/NotificationPayoutSucceededTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Model\Notification; +use Exception; use YooKassa\Helpers\Random; use YooKassa\Model\Notification\NotificationPayoutSucceeded; use YooKassa\Model\NotificationEventType; @@ -34,12 +35,12 @@ use YooKassa\Model\PaymentMethodType; use YooKassa\Model\Payout; use YooKassa\Model\PayoutStatus; -class NotificationPayoutSucceededTest extends AbstractNotificationTest +class NotificationPayoutSucceededTest extends AbstractNotificationTestCase { /** * @param array $source * @return NotificationPayoutSucceeded - * @throws \Exception + * @throws Exception */ protected function getTestInstance(array $source) { @@ -75,7 +76,7 @@ class NotificationPayoutSucceededTest extends AbstractNotificationTest /** * @return array - * @throws \Exception + * @throws Exception */ public function validDataProvider() { @@ -102,7 +103,7 @@ class NotificationPayoutSucceededTest extends AbstractNotificationTest 'status' => Random::value(PayoutStatus::getValidValues()), 'amount' => array('value' => Random::int(1, 10000), 'currency' => 'RUB'), 'description' => Random::str(1, Payout::MAX_LENGTH_DESCRIPTION), - 'payout_destination' => $payoutDestinations[Random::value(array(PaymentMethodType::YOO_MONEY,PaymentMethodType::BANK_CARD))], + 'payout_destination' => $payoutDestinations[Random::value(array(PaymentMethodType::YOO_MONEY, PaymentMethodType::BANK_CARD))], 'created_at' => date(YOOKASSA_DATE, mt_rand(111111111, time())), 'test' => true, 'deal' => array('id' => Random::str(36, 50)), @@ -115,10 +116,10 @@ class NotificationPayoutSucceededTest extends AbstractNotificationTest $object = array( 'id' => Random::str(36, 50), 'status' => Random::value(PayoutStatus::getValidValues()), - 'amount' => array('value' => Random::int(1, 10000), 'currency' => 'RUB'), + 'amount' => array('value' => Random::int(1, 10000), 'currency' => 'RUB'), 'description' => ($i == 0 ? null : ($i == 1 ? '' : ($i == 2 ? Random::str(Payout::MAX_LENGTH_DESCRIPTION) : Random::str(1, Payout::MAX_LENGTH_DESCRIPTION)))), - 'payout_destination' => $payoutDestinations[Random::value(array(PaymentMethodType::YOO_MONEY,PaymentMethodType::BANK_CARD))], + 'payout_destination' => $payoutDestinations[Random::value(array(PaymentMethodType::YOO_MONEY, PaymentMethodType::BANK_CARD))], 'created_at' => date(YOOKASSA_DATE, mt_rand(1, time())), 'test' => (bool)($i % 2), 'metadata' => array(Random::str(3, 128, 'abcdefghijklmnopqrstuvwxyz') => Random::str(1, 512)), diff --git a/tests/Model/Notification/NotificationRefundSucceededTest.php b/tests/Model/Notification/NotificationRefundSucceededTest.php index 4bfa5f4c..9e7be6cc 100644 --- a/tests/Model/Notification/NotificationRefundSucceededTest.php +++ b/tests/Model/Notification/NotificationRefundSucceededTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Model\Notification; +use Exception; use YooKassa\Helpers\Random; use YooKassa\Model\CurrencyCode; use YooKassa\Model\Notification\NotificationRefundSucceeded; @@ -34,7 +35,7 @@ use YooKassa\Model\ReceiptRegistrationStatus; use YooKassa\Model\RefundInterface; use YooKassa\Model\RefundStatus; -class NotificationRefundSucceededTest extends AbstractNotificationTest +class NotificationRefundSucceededTest extends AbstractNotificationTestCase { /** * @param array $source @@ -76,31 +77,31 @@ class NotificationRefundSucceededTest extends AbstractNotificationTest /** * @return array - * @throws \Exception + * @throws Exception */ public function validDataProvider() { - $result = array(); - $statuses = RefundStatus::getValidValues(); + $result = array(); + $statuses = RefundStatus::getValidValues(); $receiptRegistrations = ReceiptRegistrationStatus::getValidValues(); for ($i = 0; $i < 10; $i++) { - $refund = array( - 'id' => Random::str(36), - 'payment_id' => Random::str(36), - 'status' => Random::value($statuses), - 'amount' => array( - 'value' => Random::float(0.01, 1000000.0), + $refund = array( + 'id' => Random::str(36), + 'payment_id' => Random::str(36), + 'status' => Random::value($statuses), + 'amount' => array( + 'value' => Random::float(0.01, 1000000.0), 'currency' => Random::value(CurrencyCode::getValidValues()), ), - 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), + 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'receipt_registration' => Random::value($receiptRegistrations), - 'description' => Random::str(1, 128), + 'description' => Random::str(1, 128), ); $result[] = array( array( - 'type' => $this->getExpectedType(), - 'event' => $this->getExpectedEvent(), + 'type' => $this->getExpectedType(), + 'event' => $this->getExpectedEvent(), 'object' => $refund, ), ); diff --git a/tests/Model/Notification/NotificationSucceededTest.php b/tests/Model/Notification/NotificationSucceededTest.php index b1493ad5..ff97bfa7 100644 --- a/tests/Model/Notification/NotificationSucceededTest.php +++ b/tests/Model/Notification/NotificationSucceededTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Model\Notification; +use Exception; use YooKassa\Helpers\Random; use YooKassa\Model\ConfirmationType; use YooKassa\Model\CurrencyCode; @@ -36,7 +37,7 @@ use YooKassa\Model\PaymentMethodType; use YooKassa\Model\PaymentStatus; use YooKassa\Model\ReceiptRegistrationStatus; -class NotificationSucceededTest extends AbstractNotificationTest +class NotificationSucceededTest extends AbstractNotificationTestCase { /** * @param array $source @@ -76,7 +77,7 @@ class NotificationSucceededTest extends AbstractNotificationTest /** * @return array - * @throws \Exception + * @throws Exception */ public function validDataProvider() { diff --git a/tests/Model/Notification/NotificationWaitingForCaptureTest.php b/tests/Model/Notification/NotificationWaitingForCaptureTest.php index e64a8085..67c940e4 100644 --- a/tests/Model/Notification/NotificationWaitingForCaptureTest.php +++ b/tests/Model/Notification/NotificationWaitingForCaptureTest.php @@ -36,7 +36,7 @@ use YooKassa\Model\PaymentMethodType; use YooKassa\Model\ReceiptRegistrationStatus; use YooKassa\Model\PaymentStatus; -class NotificationWaitingForCaptureTest extends AbstractNotificationTest +class NotificationWaitingForCaptureTest extends AbstractNotificationTestCase { /** * @param array $source diff --git a/tests/Model/PassengerTest.php b/tests/Model/PassengerTest.php index e8d221b1..f1f00a0b 100644 --- a/tests/Model/PassengerTest.php +++ b/tests/Model/PassengerTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Model; +use Exception; use PHPUnit\Framework\TestCase; use YooKassa\Helpers\Random; use YooKassa\Model\Passenger; @@ -76,7 +77,7 @@ class PassengerTest extends TestCase $instance = self::getInstance(); try { $instance->setFirstName($value); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } @@ -91,14 +92,14 @@ class PassengerTest extends TestCase $instance = self::getInstance(); try { $instance->setLastName($value); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } /** * @return array - * @throws \Exception + * @throws Exception */ public function validDataProvider() { @@ -106,18 +107,18 @@ class PassengerTest extends TestCase return array( array( 'firstName' => Random::str(1, null, $alphabet), - 'lastName' => Random::str(1, null, $alphabet), + 'lastName' => Random::str(1, null, $alphabet), ), array( 'firstName' => Random::str(64, null, $alphabet), - 'lastName' => Random::str(64, null, $alphabet), + 'lastName' => Random::str(64, null, $alphabet), ) ); } /** * @return array - * @throws \Exception + * @throws Exception */ public function invalidValueDataProvider() { @@ -150,7 +151,7 @@ class PassengerTest extends TestCase $expected = array( 'first_name' => $firstName, - 'last_name' => $lastName, + 'last_name' => $lastName, ); self::assertEquals($expected, $instance->jsonSerialize()); } diff --git a/tests/Model/PaymentData/AbstractPaymentDataApplePayTest.php b/tests/Model/PaymentData/AbstractPaymentDataApplePayTestCase.php similarity index 93% rename from tests/Model/PaymentData/AbstractPaymentDataApplePayTest.php rename to tests/Model/PaymentData/AbstractPaymentDataApplePayTestCase.php index 36955902..1cf18def 100644 --- a/tests/Model/PaymentData/AbstractPaymentDataApplePayTest.php +++ b/tests/Model/PaymentData/AbstractPaymentDataApplePayTestCase.php @@ -25,10 +25,11 @@ namespace Tests\YooKassa\Model\PaymentData; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\PaymentData\PaymentDataApplePay; -abstract class AbstractPaymentDataApplePayTest extends AbstractPaymentDataTest +abstract class AbstractPaymentDataApplePayTestCase extends AbstractPaymentDataTestCase { /** * @dataProvider validPaymentDataDataProvider @@ -81,11 +82,11 @@ abstract class AbstractPaymentDataApplePayTest extends AbstractPaymentDataTest /** * @dataProvider invalidPaymentDataDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidPaymentData($value) { + $this->expectException('InvalidArgumentException'); /** @var PaymentDataApplePay $instance */ $instance = $this->getTestInstance(); $instance->setPaymentData($value); @@ -93,11 +94,11 @@ abstract class AbstractPaymentDataApplePayTest extends AbstractPaymentDataTest /** * @dataProvider invalidPaymentDataDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidPaymentData($value) { + $this->expectException('InvalidArgumentException'); /** @var PaymentDataApplePay $instance */ $instance = $this->getTestInstance(); $instance->paymentData = $value; @@ -105,11 +106,11 @@ abstract class AbstractPaymentDataApplePayTest extends AbstractPaymentDataTest /** * @dataProvider invalidPaymentDataDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidPayment_data($value) { + $this->expectException('InvalidArgumentException'); /** @var PaymentDataApplePay $instance */ $instance = $this->getTestInstance(); $instance->payment_data = $value; @@ -132,7 +133,7 @@ abstract class AbstractPaymentDataApplePayTest extends AbstractPaymentDataTest array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } } diff --git a/tests/Model/PaymentData/AbstractPaymentDataGooglePayTest.php b/tests/Model/PaymentData/AbstractPaymentDataGooglePayTestCase.php similarity index 90% rename from tests/Model/PaymentData/AbstractPaymentDataGooglePayTest.php rename to tests/Model/PaymentData/AbstractPaymentDataGooglePayTestCase.php index 82a94a86..30715164 100644 --- a/tests/Model/PaymentData/AbstractPaymentDataGooglePayTest.php +++ b/tests/Model/PaymentData/AbstractPaymentDataGooglePayTestCase.php @@ -25,10 +25,11 @@ namespace Tests\YooKassa\Model\PaymentData; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\PaymentData\PaymentDataGooglePay; -abstract class AbstractPaymentDataGooglePayTest extends AbstractPaymentDataTest +abstract class AbstractPaymentDataGooglePayTestCase extends AbstractPaymentDataTestCase { /** * @dataProvider validPaymentDataDataProvider @@ -45,7 +46,7 @@ abstract class AbstractPaymentDataGooglePayTest extends AbstractPaymentDataTest self::assertEquals($data, $instance->getPaymentMethodToken()); - $instance = $this->getTestInstance(); + $instance = $this->getTestInstance(); $instance->paymentMethodToken = $data; self::assertEquals($data, $instance->getPaymentMethodToken()); } @@ -64,18 +65,18 @@ abstract class AbstractPaymentDataGooglePayTest extends AbstractPaymentDataTest $instance->setGoogleTransactionId($data); self::assertEquals($data, $instance->getGoogleTransactionId()); - $instance = $this->getTestInstance(); + $instance = $this->getTestInstance(); $instance->googleTransactionId = $data; self::assertEquals($data, $instance->getGoogleTransactionId()); } /** * @dataProvider invalidPaymentDataDataProvider - * @expectedException \InvalidArgumentException * @param mixed $data */ public function testSetPaymentMethodToken($data) { + $this->expectException('InvalidArgumentException'); /** @var PaymentDataGooglePay $instance */ $instance = $this->getTestInstance(); $instance->setPaymentMethodToken($data); @@ -84,11 +85,11 @@ abstract class AbstractPaymentDataGooglePayTest extends AbstractPaymentDataTest /** * @dataProvider invalidPaymentDataDataProvider - * @expectedException \InvalidArgumentException * @param mixed $data */ public function testSetGoogleTransactionId($data) { + $this->expectException('InvalidArgumentException'); /** @var PaymentDataGooglePay $instance */ $instance = $this->getTestInstance(); $instance->setGoogleTransactionId($data); @@ -110,7 +111,7 @@ abstract class AbstractPaymentDataGooglePayTest extends AbstractPaymentDataTest array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } } diff --git a/tests/Model/PaymentData/AbstractPaymentDataPhoneTest.php b/tests/Model/PaymentData/AbstractPaymentDataPhoneTestCase.php similarity index 92% rename from tests/Model/PaymentData/AbstractPaymentDataPhoneTest.php rename to tests/Model/PaymentData/AbstractPaymentDataPhoneTestCase.php index 1d7dbdd1..261ff0b7 100644 --- a/tests/Model/PaymentData/AbstractPaymentDataPhoneTest.php +++ b/tests/Model/PaymentData/AbstractPaymentDataPhoneTestCase.php @@ -25,9 +25,10 @@ namespace Tests\YooKassa\Model\PaymentData; +use stdClass; use YooKassa\Model\PaymentData\PaymentDataMobileBalance; -abstract class AbstractPaymentDataPhoneTest extends AbstractPaymentDataTest +abstract class AbstractPaymentDataPhoneTestCase extends AbstractPaymentDataTestCase { /** * @dataProvider validPhoneDataProvider @@ -53,11 +54,11 @@ abstract class AbstractPaymentDataPhoneTest extends AbstractPaymentDataTest /** * @dataProvider invalidPhoneDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidPhone($value) { + $this->expectException('InvalidArgumentException'); /** @var PaymentDataMobileBalance $instance */ $instance = $this->getTestInstance(); $instance->setPhone($value); @@ -65,11 +66,11 @@ abstract class AbstractPaymentDataPhoneTest extends AbstractPaymentDataTest /** * @dataProvider invalidPhoneDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidPhone($value) { + $this->expectException('InvalidArgumentException'); /** @var PaymentDataMobileBalance $instance */ $instance = $this->getTestInstance(); $instance->phone = $value; @@ -101,7 +102,7 @@ abstract class AbstractPaymentDataPhoneTest extends AbstractPaymentDataTest array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), array('2345678901234567'), ); } diff --git a/tests/Model/PaymentData/AbstractPaymentDataTest.php b/tests/Model/PaymentData/AbstractPaymentDataTestCase.php similarity index 92% rename from tests/Model/PaymentData/AbstractPaymentDataTest.php rename to tests/Model/PaymentData/AbstractPaymentDataTestCase.php index a963e240..a2fdf1d8 100644 --- a/tests/Model/PaymentData/AbstractPaymentDataTest.php +++ b/tests/Model/PaymentData/AbstractPaymentDataTestCase.php @@ -26,10 +26,11 @@ namespace Tests\YooKassa\Model\PaymentData; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\PaymentData\AbstractPaymentData; -abstract class AbstractPaymentDataTest extends TestCase +abstract class AbstractPaymentDataTestCase extends TestCase { /** * @return AbstractPaymentData @@ -52,11 +53,11 @@ abstract class AbstractPaymentDataTest extends TestCase /** * @dataProvider invalidTypeDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testInvalidType($value) { + $this->expectException('InvalidArgumentException'); new TestPaymentData($value); } @@ -68,7 +69,7 @@ abstract class AbstractPaymentDataTest extends TestCase array(Random::str(40)), array(0), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } } diff --git a/tests/Model/PaymentData/B2b/Sberbank/VatDataTest.php b/tests/Model/PaymentData/B2b/Sberbank/VatDataTest.php index a64b5bdd..e5394620 100644 --- a/tests/Model/PaymentData/B2b/Sberbank/VatDataTest.php +++ b/tests/Model/PaymentData/B2b/Sberbank/VatDataTest.php @@ -25,7 +25,9 @@ namespace Tests\YooKassa\Model\PaymentData; +use Exception; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\CurrencyCode; use YooKassa\Model\MonetaryAmount; @@ -67,25 +69,25 @@ class VatDataTest extends TestCase /** * @dataProvider invalidTypeDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidType($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setType($value); } /** * @return array - * @throws \Exception + * @throws Exception */ public function validConstructDataProvider() { $result = array( array( array( - 'type' => VatDataType::CALCULATED, - 'rate' => VatDataRate::RATE_5, + 'type' => VatDataType::CALCULATED, + 'rate' => VatDataRate::RATE_5, 'amount' => new MonetaryAmount(Random::int(1, 1000)) ), ), @@ -96,7 +98,7 @@ class VatDataTest extends TestCase /** * @return array - * @throws \Exception + * @throws Exception */ public function validTypeDataProvider() { @@ -110,7 +112,7 @@ class VatDataTest extends TestCase /** * @return array - * @throws \Exception + * @throws Exception */ public function invalidTypeDataProvider() { @@ -121,7 +123,7 @@ class VatDataTest extends TestCase array(1), array(-1), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(20)), ); } @@ -137,17 +139,17 @@ class VatDataTest extends TestCase /** * @dataProvider invalidRateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidRate($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setRate($value); } /** * @return array - * @throws \Exception + * @throws Exception */ public function validRateDataProvider() { @@ -165,7 +167,7 @@ class VatDataTest extends TestCase /** * @return array - * @throws \Exception + * @throws Exception */ public function invalidRateDataProvider() { @@ -176,7 +178,7 @@ class VatDataTest extends TestCase array(1), array(-1), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(20)), ); } @@ -215,19 +217,19 @@ class VatDataTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidAmount($value) { - self::setExpectedException('InvalidArgumentException'); + $this->expectException('InvalidArgumentException'); + self::expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->setAmount($value); } /** * @return array - * @throws \Exception + * @throws Exception */ public function validDataProvider() { @@ -235,7 +237,7 @@ class VatDataTest extends TestCase array(null), array( array( - 'value' => Random::int(1, 1000), + 'value' => Random::int(1, 1000), 'currency' => CurrencyCode::EUR, ) ), @@ -247,7 +249,7 @@ class VatDataTest extends TestCase /** * @return array - * @throws \Exception + * @throws Exception */ public function invalidDataProvider() { @@ -257,7 +259,7 @@ class VatDataTest extends TestCase array(1), array(-1), //array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(20)), ); } diff --git a/tests/Model/PaymentData/ElectronicCertificate/ElectronicCertificateArticleTest.php b/tests/Model/PaymentData/ElectronicCertificate/ElectronicCertificateArticleTest.php index 960d7958..c9b34baa 100644 --- a/tests/Model/PaymentData/ElectronicCertificate/ElectronicCertificateArticleTest.php +++ b/tests/Model/PaymentData/ElectronicCertificate/ElectronicCertificateArticleTest.php @@ -28,6 +28,7 @@ namespace Tests\YooKassa\Model\PaymentData\ElectronicCertificate; use InvalidArgumentException; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\CurrencyCode; use YooKassa\Model\Metadata; @@ -55,31 +56,31 @@ class ElectronicCertificateArticleTest extends TestCase /** * @dataProvider invalidArticleNumberDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetInvalidArticleNumber($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setArticleNumber($value); } /** * @dataProvider invalidArticleNumberDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidArticleNumber($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->articleNumber = $value; } /** * @dataProvider invalidArticleNumberDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidArticleNumberSnakeCase($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->article_number = $value; } @@ -94,31 +95,31 @@ class ElectronicCertificateArticleTest extends TestCase /** * @dataProvider invalidTruCodeDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetInvalidTruCode($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setTruCode($value); } /** * @dataProvider invalidTruCodeDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidTruCode($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->truCode = $value; } /** * @dataProvider invalidTruCodeDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidTruCodeSnakeCase($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->tru_code = $value; } @@ -133,21 +134,21 @@ class ElectronicCertificateArticleTest extends TestCase /** * @dataProvider invalidArticleCodeDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetInvalidArticleCode($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setArticleCode($value); } /** * @dataProvider invalidArticleCodeDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidArticleCode($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->articleCode = $value; } @@ -162,31 +163,31 @@ class ElectronicCertificateArticleTest extends TestCase /** * @dataProvider invalidArticleNameDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetInvalidArticleName($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setArticleName($value); } /** * @dataProvider invalidArticleNameDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidArticleName($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->articleName = $value; } /** * @dataProvider invalidArticleNameDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidArticleNameSnakeCase($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->article_name = $value; } @@ -201,21 +202,21 @@ class ElectronicCertificateArticleTest extends TestCase /** * @dataProvider invalidQuantityDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetInvalidQuantity($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setQuantity($value); } /** * @dataProvider invalidQuantityDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidQuantity($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->quantity = $value; } @@ -252,21 +253,21 @@ class ElectronicCertificateArticleTest extends TestCase /** * @dataProvider invalidPriceDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetInvalidPrice($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setPrice($value); } /** * @dataProvider invalidPriceDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidPrice($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->price = $value; } @@ -307,11 +308,11 @@ class ElectronicCertificateArticleTest extends TestCase /** * @dataProvider invalidMetadataDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetInvalidMetadata($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setMetadata($value); } @@ -340,7 +341,7 @@ class ElectronicCertificateArticleTest extends TestCase array(-1), array('5'), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(1, '0123456789')), ); } @@ -369,7 +370,7 @@ class ElectronicCertificateArticleTest extends TestCase array(1), array(-1), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(29, '0123456789.')), array(Random::str(31, '0123456789.')), ); @@ -397,7 +398,7 @@ class ElectronicCertificateArticleTest extends TestCase { return array( array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(129)), ); } @@ -423,7 +424,7 @@ class ElectronicCertificateArticleTest extends TestCase array(''), array(null), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(129)), ); } @@ -452,7 +453,7 @@ class ElectronicCertificateArticleTest extends TestCase array(-1), array('5'), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(1, '0123456789')), ); } @@ -494,7 +495,7 @@ class ElectronicCertificateArticleTest extends TestCase array(1), array(true), array(false), - array(new \stdClass()), + array(new stdClass()), ); } @@ -522,7 +523,7 @@ class ElectronicCertificateArticleTest extends TestCase array(0), array(1), array('string'), - array(new \stdClass()), + array(new stdClass()), ); } diff --git a/tests/Model/PaymentData/PaymentDataAlfaPayTest.php b/tests/Model/PaymentData/PaymentDataAlfaPayTest.php index 10c26b12..51dd1d43 100644 --- a/tests/Model/PaymentData/PaymentDataAlfaPayTest.php +++ b/tests/Model/PaymentData/PaymentDataAlfaPayTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\PaymentData; use YooKassa\Model\PaymentData\PaymentDataAlfaPay; use YooKassa\Model\PaymentMethodType; -class PaymentDataAlfaPayTest extends AbstractPaymentDataTest +class PaymentDataAlfaPayTest extends AbstractPaymentDataTestCase { /** * @return PaymentDataAlfaPay diff --git a/tests/Model/PaymentData/PaymentDataAlfabankTest.php b/tests/Model/PaymentData/PaymentDataAlfabankTest.php index 906a1029..725a31b7 100644 --- a/tests/Model/PaymentData/PaymentDataAlfabankTest.php +++ b/tests/Model/PaymentData/PaymentDataAlfabankTest.php @@ -25,11 +25,12 @@ namespace Tests\YooKassa\Model\PaymentData; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\PaymentData\PaymentDataAlfabank; use YooKassa\Model\PaymentMethodType; -class PaymentDataAlfabankTest extends AbstractPaymentDataTest +class PaymentDataAlfabankTest extends AbstractPaymentDataTestCase { /** * @return PaymentDataAlfabank @@ -70,22 +71,22 @@ class PaymentDataAlfabankTest extends AbstractPaymentDataTest /** * @dataProvider invalidLoginDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidLogin($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->setLogin($value); } /** * @dataProvider invalidLoginDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidLogin($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->login = $value; } @@ -107,7 +108,7 @@ class PaymentDataAlfabankTest extends AbstractPaymentDataTest array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } } diff --git a/tests/Model/PaymentData/PaymentDataApplePayTest.php b/tests/Model/PaymentData/PaymentDataApplePayTest.php index f9a7e24a..dff09ab6 100644 --- a/tests/Model/PaymentData/PaymentDataApplePayTest.php +++ b/tests/Model/PaymentData/PaymentDataApplePayTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\PaymentData; use YooKassa\Model\PaymentData\PaymentDataApplePay; use YooKassa\Model\PaymentMethodType; -class PaymentDataApplePayTest extends AbstractPaymentDataApplePayTest +class PaymentDataApplePayTest extends AbstractPaymentDataApplePayTestCase { /** * @return PaymentDataApplePay diff --git a/tests/Model/PaymentData/PaymentDataB2bSberbankTest.php b/tests/Model/PaymentData/PaymentDataB2bSberbankTest.php index 8d2aeef4..85d559a3 100644 --- a/tests/Model/PaymentData/PaymentDataB2bSberbankTest.php +++ b/tests/Model/PaymentData/PaymentDataB2bSberbankTest.php @@ -25,6 +25,8 @@ namespace Tests\YooKassa\Model\PaymentData; +use Exception; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\CurrencyCode; use YooKassa\Model\MonetaryAmount; @@ -34,7 +36,7 @@ use YooKassa\Model\PaymentData\B2b\Sberbank\VatDataType; use YooKassa\Model\PaymentData\PaymentDataB2bSberbank; use YooKassa\Model\PaymentMethodType; -class PaymentDataB2bSberbankTest extends AbstractPaymentDataTest +class PaymentDataB2bSberbankTest extends AbstractPaymentDataTestCase { /** * @return PaymentDataB2bSberbank @@ -71,17 +73,17 @@ class PaymentDataB2bSberbankTest extends AbstractPaymentDataTest /** * @dataProvider invalidPaymentPurposeDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidPaymentPurpose($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setPaymentPurpose($value); } /** * @return array - * @throws \Exception + * @throws Exception */ public function validPaymentPurposeDataProvider() { @@ -92,14 +94,14 @@ class PaymentDataB2bSberbankTest extends AbstractPaymentDataTest /** * @return array - * @throws \Exception + * @throws Exception */ public function invalidPaymentPurposeDataProvider() { return array( array(''), array(true), - array(new \stdClass()), + array(new stdClass()), array(Random::str(211)), ); } @@ -145,17 +147,17 @@ class PaymentDataB2bSberbankTest extends AbstractPaymentDataTest /** * @dataProvider invalidVatDataDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidVatData($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setVatData($value); } /** * @return array - * @throws \Exception + * @throws Exception */ public function validVatDataDataProvider() { @@ -170,37 +172,37 @@ class PaymentDataB2bSberbankTest extends AbstractPaymentDataTest ), array( array( - 'type' => VatDataType::CALCULATED, - 'rate' => VatDataRate::RATE_5, + 'type' => VatDataType::CALCULATED, + 'rate' => VatDataRate::RATE_5, 'amount' => new MonetaryAmount(Random::int(1, 10000), CurrencyCode::EUR), ) ), array( array( - 'type' => VatDataType::CALCULATED, - 'rate' => VatDataRate::RATE_7, + 'type' => VatDataType::CALCULATED, + 'rate' => VatDataRate::RATE_7, 'amount' => new MonetaryAmount(Random::int(1, 10000), CurrencyCode::EUR), ) ), array( array( - 'type' => VatDataType::CALCULATED, - 'rate' => VatDataRate::RATE_10, + 'type' => VatDataType::CALCULATED, + 'rate' => VatDataRate::RATE_10, 'amount' => new MonetaryAmount(Random::int(1, 10000), CurrencyCode::EUR), ) ), array( array( - 'type' => VatDataType::MIXED, + 'type' => VatDataType::MIXED, 'amount' => new MonetaryAmount(Random::int(1, 10000), CurrencyCode::EUR), ) ), array( array( - 'type' => VatDataType::CALCULATED, - 'rate' => VatDataRate::RATE_20, + 'type' => VatDataType::CALCULATED, + 'rate' => VatDataRate::RATE_20, 'amount' => array( - 'value' => Random::int(1, 10000), + 'value' => Random::int(1, 10000), 'currency' => CurrencyCode::USD, ), ) @@ -210,7 +212,7 @@ class PaymentDataB2bSberbankTest extends AbstractPaymentDataTest /** * @return array - * @throws \Exception + * @throws Exception */ public function invalidVatDataDataProvider() { @@ -220,11 +222,11 @@ class PaymentDataB2bSberbankTest extends AbstractPaymentDataTest array(-1), array(''), array(true), - array(new \stdClass()), + array(new stdClass()), array( array( - 'type' => VatDataType::CALCULATED, - 'rate' => VatDataRate::RATE_10, + 'type' => VatDataType::CALCULATED, + 'rate' => VatDataRate::RATE_10, 'amount' => Random::str(10), ) ), diff --git a/tests/Model/PaymentData/PaymentDataBankCardCardTest.php b/tests/Model/PaymentData/PaymentDataBankCardCardTest.php index 5b4def5e..3912adc2 100644 --- a/tests/Model/PaymentData/PaymentDataBankCardCardTest.php +++ b/tests/Model/PaymentData/PaymentDataBankCardCardTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Model\PaymentData; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\PaymentData\PaymentDataBankCardCard; @@ -47,21 +48,21 @@ class PaymentDataBankCardCardTest extends TestCase /** * @dataProvider invalidNumberDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidNumber($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setNumber($value); } /** * @dataProvider invalidNumberDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidNumber($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->number = $value; } @@ -76,51 +77,51 @@ class PaymentDataBankCardCardTest extends TestCase /** * @dataProvider invalidYearDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidYear($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setExpiryYear($value); } /** * @dataProvider invalidYearDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidYear($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->expiryYear = $value; } /** * @dataProvider invalidYearDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalid_year($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->expiry_year = $value; } /** * @dataProvider invalidMonthDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidMonth($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->expiryMonth = $value; } /** * @dataProvider invalidMonthDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalid_month($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->expiry_month = $value; } @@ -135,11 +136,11 @@ class PaymentDataBankCardCardTest extends TestCase /** * @dataProvider invalidMonthDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidMonth($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setExpiryMonth($value); } @@ -154,21 +155,21 @@ class PaymentDataBankCardCardTest extends TestCase /** * @dataProvider invalidCscDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidCsc($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCsc($value); } /** * @dataProvider invalidCscDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidCsc($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->csc = $value; } @@ -183,21 +184,21 @@ class PaymentDataBankCardCardTest extends TestCase /** * @dataProvider invalidCardholderDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidCardholder($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCardholder($value); } /** * @dataProvider invalidCardholderDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidCardholder($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->cardholder = $value; } @@ -281,7 +282,7 @@ class PaymentDataBankCardCardTest extends TestCase array(1), array(-1), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(15, '0123456789')), array(Random::str(20, '0123456789')), ); @@ -297,7 +298,7 @@ class PaymentDataBankCardCardTest extends TestCase array(-1), array('5'), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(1, '0123456789')), array(Random::str(2, '0123456789')), array(Random::str(3, '0123456789')), @@ -315,7 +316,7 @@ class PaymentDataBankCardCardTest extends TestCase array(-1), array('5'), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(1, '0123456789')), array(Random::str(3, '0123456789')), array('13'), @@ -333,7 +334,7 @@ class PaymentDataBankCardCardTest extends TestCase array(-1), array('5'), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(1, '0123456789')), array(Random::str(2, '0123456789')), array(Random::str(5, '0123456789')), @@ -353,7 +354,7 @@ class PaymentDataBankCardCardTest extends TestCase array(-1), array('5'), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(1, '0123456789')), array(Random::str(2, '0123456789')), array(Random::str(5, '0123456789')), diff --git a/tests/Model/PaymentData/PaymentDataBankCardTest.php b/tests/Model/PaymentData/PaymentDataBankCardTest.php index 344cb64f..2b9d62b7 100644 --- a/tests/Model/PaymentData/PaymentDataBankCardTest.php +++ b/tests/Model/PaymentData/PaymentDataBankCardTest.php @@ -25,12 +25,13 @@ namespace Tests\YooKassa\Model\PaymentData; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\PaymentData\PaymentDataBankCard; use YooKassa\Model\PaymentData\PaymentDataBankCardCard; use YooKassa\Model\PaymentMethodType; -class PaymentDataBankCardTest extends AbstractPaymentDataTest +class PaymentDataBankCardTest extends AbstractPaymentDataTestCase { /** * @return PaymentDataBankCard @@ -97,21 +98,21 @@ class PaymentDataBankCardTest extends AbstractPaymentDataTest /** * @dataProvider invalidCardDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidCard($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCard($value); } /** * @dataProvider invalidCardDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidCard($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->card = $value; } @@ -136,7 +137,7 @@ class PaymentDataBankCardTest extends AbstractPaymentDataTest array(-1), array('5'), array(true), - array(new \stdClass()), + array(new stdClass()), ); } } diff --git a/tests/Model/PaymentData/PaymentDataCashTest.php b/tests/Model/PaymentData/PaymentDataCashTest.php index 2788e7d0..50894251 100644 --- a/tests/Model/PaymentData/PaymentDataCashTest.php +++ b/tests/Model/PaymentData/PaymentDataCashTest.php @@ -25,10 +25,11 @@ namespace Tests\YooKassa\Model\PaymentData; +use stdClass; use YooKassa\Model\PaymentData\PaymentDataCash; use YooKassa\Model\PaymentMethodType; -class PaymentDataCashTest extends AbstractPaymentDataPhoneTest +class PaymentDataCashTest extends AbstractPaymentDataPhoneTestCase { /** * @return PaymentDataCash @@ -72,7 +73,7 @@ class PaymentDataCashTest extends AbstractPaymentDataPhoneTest array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), array('2345678901234567'), ); } diff --git a/tests/Model/PaymentData/PaymentDataElectronicCertificateTest.php b/tests/Model/PaymentData/PaymentDataElectronicCertificateTest.php index 2ec517f2..d7c0f99f 100644 --- a/tests/Model/PaymentData/PaymentDataElectronicCertificateTest.php +++ b/tests/Model/PaymentData/PaymentDataElectronicCertificateTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Model\PaymentData; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\CurrencyCode; use YooKassa\Model\PaymentData\ElectronicCertificate\ElectronicCertificateArticle; @@ -33,7 +34,7 @@ use YooKassa\Model\PaymentData\PaymentDataElectronicCertificate; use YooKassa\Model\PaymentMethod\ElectronicCertificate\ElectronicCertificatePaymentData; use YooKassa\Model\PaymentMethodType; -class PaymentDataElectronicCertificateTest extends AbstractPaymentDataTest +class PaymentDataElectronicCertificateTest extends AbstractPaymentDataTestCase { /** * @return PaymentDataElectronicCertificate @@ -62,21 +63,21 @@ class PaymentDataElectronicCertificateTest extends AbstractPaymentDataTest /** * @dataProvider invalidCardDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidCard($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCard($value); } /** * @dataProvider invalidCardDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidCard($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->card = $value; } @@ -91,31 +92,31 @@ class PaymentDataElectronicCertificateTest extends AbstractPaymentDataTest /** * @dataProvider invalidElectronicCertificateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidElectronicCertificate($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setElectronicCertificate($value); } /** * @dataProvider invalidElectronicCertificateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidElectronicCertificate($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->electronicCertificate = $value; } /** * @dataProvider invalidElectronicCertificateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidElectronicCertificateSnakeCase($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->electronic_certificate = $value; } @@ -130,21 +131,21 @@ class PaymentDataElectronicCertificateTest extends AbstractPaymentDataTest /** * @dataProvider invalidArticlesDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidArticles($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setArticles($value); } /** * @dataProvider invalidArticlesDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidArticles($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->articles = $value; } @@ -183,7 +184,7 @@ class PaymentDataElectronicCertificateTest extends AbstractPaymentDataTest array(1), array(-1), array('5'), - array(new \stdClass()), + array(new stdClass()), array(Random::str(20)), ); } @@ -227,7 +228,7 @@ class PaymentDataElectronicCertificateTest extends AbstractPaymentDataTest array(1), array(-1), array('string'), - array(new \stdClass()), + array(new stdClass()), array(Random::str(20)), ); } @@ -301,10 +302,10 @@ class PaymentDataElectronicCertificateTest extends AbstractPaymentDataTest array(1), array(-1), array('string'), - array(new \stdClass()), + array(new stdClass()), array(Random::str(20)), array(array('invalid_element')), - array(array(new \stdClass())), + array(array(new stdClass())), ); } diff --git a/tests/Model/PaymentData/PaymentDataFactoryTest.php b/tests/Model/PaymentData/PaymentDataFactoryTest.php index b5299273..44ec8e4a 100644 --- a/tests/Model/PaymentData/PaymentDataFactoryTest.php +++ b/tests/Model/PaymentData/PaymentDataFactoryTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Model\PaymentData; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\PaymentData\AbstractPaymentData; use YooKassa\Model\PaymentData\PaymentDataBankCardCard; @@ -54,11 +55,11 @@ class PaymentDataFactoryTest extends TestCase /** * @dataProvider invalidTypeDataProvider - * @expectedException \InvalidArgumentException * @param $type */ public function testInvalidFactory($type) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->factory($type); } @@ -92,11 +93,11 @@ class PaymentDataFactoryTest extends TestCase /** * @dataProvider invalidDataArrayDataProvider - * @expectedException \InvalidArgumentException * @param $options */ public function testInvalidFactoryFromArray($options) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->factoryFromArray($options); } @@ -120,7 +121,7 @@ class PaymentDataFactoryTest extends TestCase array(-1), array('5'), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(10)), ); } diff --git a/tests/Model/PaymentData/PaymentDataGooglePayTest.php b/tests/Model/PaymentData/PaymentDataGooglePayTest.php index ba3fba54..681d69fd 100644 --- a/tests/Model/PaymentData/PaymentDataGooglePayTest.php +++ b/tests/Model/PaymentData/PaymentDataGooglePayTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\PaymentData; use YooKassa\Model\PaymentData\PaymentDataGooglePay; use YooKassa\Model\PaymentMethodType; -class PaymentDataGooglePayTest extends AbstractPaymentDataGooglePayTest +class PaymentDataGooglePayTest extends AbstractPaymentDataGooglePayTestCase { /** * @return PaymentDataGooglePay diff --git a/tests/Model/PaymentData/PaymentDataInstallmentsTest.php b/tests/Model/PaymentData/PaymentDataInstallmentsTest.php index f7081a23..133cd713 100644 --- a/tests/Model/PaymentData/PaymentDataInstallmentsTest.php +++ b/tests/Model/PaymentData/PaymentDataInstallmentsTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\PaymentData; use YooKassa\Model\PaymentData\PaymentDataInstallments; use YooKassa\Model\PaymentMethodType; -class PaymentDataInstallmentsTest extends AbstractPaymentDataTest +class PaymentDataInstallmentsTest extends AbstractPaymentDataTestCase { /** * @return PaymentDataInstallments diff --git a/tests/Model/PaymentData/PaymentDataMobileBalanceTest.php b/tests/Model/PaymentData/PaymentDataMobileBalanceTest.php index 75d43662..bf3f09ff 100644 --- a/tests/Model/PaymentData/PaymentDataMobileBalanceTest.php +++ b/tests/Model/PaymentData/PaymentDataMobileBalanceTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\PaymentData; use YooKassa\Model\PaymentData\PaymentDataMobileBalance; use YooKassa\Model\PaymentMethodType; -class PaymentDataMobileBalanceTest extends AbstractPaymentDataPhoneTest +class PaymentDataMobileBalanceTest extends AbstractPaymentDataPhoneTestCase { /** * @return PaymentDataMobileBalance diff --git a/tests/Model/PaymentData/PaymentDataQiwiTest.php b/tests/Model/PaymentData/PaymentDataQiwiTest.php index 166dbff3..49854682 100644 --- a/tests/Model/PaymentData/PaymentDataQiwiTest.php +++ b/tests/Model/PaymentData/PaymentDataQiwiTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\PaymentData; use YooKassa\Model\PaymentData\PaymentDataQiwi; use YooKassa\Model\PaymentMethodType; -class PaymentDataQiwiTest extends AbstractPaymentDataPhoneTest +class PaymentDataQiwiTest extends AbstractPaymentDataPhoneTestCase { /** * @return PaymentDataQiwi diff --git a/tests/Model/PaymentData/PaymentDataSberBnplTest.php b/tests/Model/PaymentData/PaymentDataSberBnplTest.php index b8327998..aca35f3d 100644 --- a/tests/Model/PaymentData/PaymentDataSberBnplTest.php +++ b/tests/Model/PaymentData/PaymentDataSberBnplTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\PaymentData; use YooKassa\Model\PaymentData\PaymentDataSberBnpl; use YooKassa\Model\PaymentMethodType; -class PaymentDataSberBnplTest extends AbstractPaymentDataPhoneTest +class PaymentDataSberBnplTest extends AbstractPaymentDataPhoneTestCase { /** * @return PaymentDataSberBnpl diff --git a/tests/Model/PaymentData/PaymentDataSberLoanTest.php b/tests/Model/PaymentData/PaymentDataSberLoanTest.php index 9dd5dd8d..a0bf2435 100644 --- a/tests/Model/PaymentData/PaymentDataSberLoanTest.php +++ b/tests/Model/PaymentData/PaymentDataSberLoanTest.php @@ -29,7 +29,7 @@ use YooKassa\Model\PaymentData\AbstractPaymentData; use YooKassa\Model\PaymentData\PaymentDataSberLoan; use YooKassa\Model\PaymentMethodType; -class PaymentDataSberLoanTest extends AbstractPaymentDataTest +class PaymentDataSberLoanTest extends AbstractPaymentDataTestCase { /** * @return AbstractPaymentData diff --git a/tests/Model/PaymentData/PaymentDataSberbankTest.php b/tests/Model/PaymentData/PaymentDataSberbankTest.php index c16d91bf..7627d462 100644 --- a/tests/Model/PaymentData/PaymentDataSberbankTest.php +++ b/tests/Model/PaymentData/PaymentDataSberbankTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\PaymentData; use YooKassa\Model\PaymentData\PaymentDataSberbank; use YooKassa\Model\PaymentMethodType; -class PaymentDataSberbankTest extends AbstractPaymentDataPhoneTest +class PaymentDataSberbankTest extends AbstractPaymentDataPhoneTestCase { /** * @return PaymentDataSberbank diff --git a/tests/Model/PaymentData/PaymentDataSbpTest.php b/tests/Model/PaymentData/PaymentDataSbpTest.php index bf2e7ad5..7b159e36 100644 --- a/tests/Model/PaymentData/PaymentDataSbpTest.php +++ b/tests/Model/PaymentData/PaymentDataSbpTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\PaymentData; use YooKassa\Model\PaymentData\PaymentDataSbp; use YooKassa\Model\PaymentMethodType; -class PaymentDataSbpTest extends AbstractPaymentDataTest +class PaymentDataSbpTest extends AbstractPaymentDataTestCase { /** * @return PaymentDataSbp diff --git a/tests/Model/PaymentData/PaymentDataTinkoffBankTest.php b/tests/Model/PaymentData/PaymentDataTinkoffBankTest.php index f5fd7c89..77172052 100644 --- a/tests/Model/PaymentData/PaymentDataTinkoffBankTest.php +++ b/tests/Model/PaymentData/PaymentDataTinkoffBankTest.php @@ -29,7 +29,7 @@ use YooKassa\Model\PaymentData\AbstractPaymentData; use YooKassa\Model\PaymentData\PaymentDataTinkoffBank; use YooKassa\Model\PaymentMethodType; -class PaymentDataTinkoffBankTest extends AbstractPaymentDataTest +class PaymentDataTinkoffBankTest extends AbstractPaymentDataTestCase { /** * @return AbstractPaymentData diff --git a/tests/Model/PaymentData/PaymentDataWebmoneyTest.php b/tests/Model/PaymentData/PaymentDataWebmoneyTest.php index 6ebcddd3..3aad196f 100644 --- a/tests/Model/PaymentData/PaymentDataWebmoneyTest.php +++ b/tests/Model/PaymentData/PaymentDataWebmoneyTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\PaymentData; use YooKassa\Model\PaymentData\PaymentDataWebmoney; use YooKassa\Model\PaymentMethodType; -class PaymentDataWebmoneyTest extends AbstractPaymentDataTest +class PaymentDataWebmoneyTest extends AbstractPaymentDataTestCase { /** * @return PaymentDataWebmoney diff --git a/tests/Model/PaymentData/PaymentDataWechatTest.php b/tests/Model/PaymentData/PaymentDataWechatTest.php index e1f90331..cbb33ebe 100644 --- a/tests/Model/PaymentData/PaymentDataWechatTest.php +++ b/tests/Model/PaymentData/PaymentDataWechatTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\PaymentData; use YooKassa\Model\PaymentData\PaymentDataWechat; use YooKassa\Model\PaymentMethodType; -class PaymentDataWechatTest extends AbstractPaymentDataTest +class PaymentDataWechatTest extends AbstractPaymentDataTestCase { /** * @return PaymentDataWechat diff --git a/tests/Model/PaymentData/PaymentDataYooMoneyTest.php b/tests/Model/PaymentData/PaymentDataYooMoneyTest.php index 12698a18..e31c7332 100644 --- a/tests/Model/PaymentData/PaymentDataYooMoneyTest.php +++ b/tests/Model/PaymentData/PaymentDataYooMoneyTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\PaymentData; use YooKassa\Model\PaymentData\PaymentDataYooMoney; use YooKassa\Model\PaymentMethodType; -class PaymentDataYooMoneyTest extends AbstractPaymentDataTest +class PaymentDataYooMoneyTest extends AbstractPaymentDataTestCase { /** * @return PaymentDataYooMoney diff --git a/tests/Model/PaymentMethod/AbstractPaymentMethodPhoneTest.php b/tests/Model/PaymentMethod/AbstractPaymentMethodPhoneTestCase.php similarity index 92% rename from tests/Model/PaymentMethod/AbstractPaymentMethodPhoneTest.php rename to tests/Model/PaymentMethod/AbstractPaymentMethodPhoneTestCase.php index 852e48d6..b59571cc 100644 --- a/tests/Model/PaymentMethod/AbstractPaymentMethodPhoneTest.php +++ b/tests/Model/PaymentMethod/AbstractPaymentMethodPhoneTestCase.php @@ -25,9 +25,10 @@ namespace Tests\YooKassa\Model\PaymentMethod; +use stdClass; use YooKassa\Model\PaymentMethod\PaymentMethodMobileBalance; -abstract class AbstractPaymentMethodPhoneTest extends AbstractPaymentMethodTest +abstract class AbstractPaymentMethodPhoneTestCase extends AbstractPaymentMethodTestCase { /** * @dataProvider validPhoneDataProvider @@ -53,11 +54,11 @@ abstract class AbstractPaymentMethodPhoneTest extends AbstractPaymentMethodTest /** * @dataProvider invalidPhoneDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidPhone($value) { + $this->expectException('InvalidArgumentException'); /** @var PaymentMethodMobileBalance $instance */ $instance = $this->getTestInstance(); $instance->setPhone($value); @@ -65,11 +66,11 @@ abstract class AbstractPaymentMethodPhoneTest extends AbstractPaymentMethodTest /** * @dataProvider invalidPhoneDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidPhone($value) { + $this->expectException('InvalidArgumentException'); /** @var PaymentMethodMobileBalance $instance */ $instance = $this->getTestInstance(); $instance->phone = $value; @@ -101,7 +102,7 @@ abstract class AbstractPaymentMethodPhoneTest extends AbstractPaymentMethodTest array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), array('2345678901234567'), ); } diff --git a/tests/Model/PaymentMethod/AbstractPaymentMethodTest.php b/tests/Model/PaymentMethod/AbstractPaymentMethodTestCase.php similarity index 92% rename from tests/Model/PaymentMethod/AbstractPaymentMethodTest.php rename to tests/Model/PaymentMethod/AbstractPaymentMethodTestCase.php index 6b77341a..bfa3e391 100644 --- a/tests/Model/PaymentMethod/AbstractPaymentMethodTest.php +++ b/tests/Model/PaymentMethod/AbstractPaymentMethodTestCase.php @@ -26,10 +26,11 @@ namespace Tests\YooKassa\Model\PaymentMethod; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\PaymentMethod\AbstractPaymentMethod; -abstract class AbstractPaymentMethodTest extends TestCase +abstract class AbstractPaymentMethodTestCase extends TestCase { /** * @return AbstractPaymentMethod @@ -52,11 +53,11 @@ abstract class AbstractPaymentMethodTest extends TestCase /** * @dataProvider invalidTypeDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testInvalidType($value) { + $this->expectException('InvalidArgumentException'); new TestPaymentData($value); } @@ -93,21 +94,21 @@ abstract class AbstractPaymentMethodTest extends TestCase /** * @dataProvider invalidSavedDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidSaved($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setSaved($value); } /** * @dataProvider invalidSavedDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidSaved($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->saved = $value; } @@ -144,21 +145,21 @@ abstract class AbstractPaymentMethodTest extends TestCase /** * @dataProvider invalidIdDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidId($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setId($value); } /** * @dataProvider invalidIdDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidId($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->id = $value; } @@ -195,21 +196,21 @@ abstract class AbstractPaymentMethodTest extends TestCase /** * @dataProvider invalidTitleDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidTitle($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setTitle($value); } /** * @dataProvider invalidIdDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidTitle($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->title = $value; } @@ -221,7 +222,7 @@ abstract class AbstractPaymentMethodTest extends TestCase array(Random::str(40)), array(0), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } @@ -241,7 +242,7 @@ abstract class AbstractPaymentMethodTest extends TestCase array(null), array(''), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } @@ -261,7 +262,7 @@ abstract class AbstractPaymentMethodTest extends TestCase { return array( array(array()), - array(new \stdClass()), + array(new stdClass()), array(true), array(false), ); @@ -283,7 +284,7 @@ abstract class AbstractPaymentMethodTest extends TestCase { return array( array(array()), - array(new \stdClass()), + array(new stdClass()), array(true), array(false), ); diff --git a/tests/Model/PaymentMethod/B2b/Sberbank/PayerBankDetailsTest.php b/tests/Model/PaymentMethod/B2b/Sberbank/PayerBankDetailsTest.php index ba03e14b..337a55dd 100644 --- a/tests/Model/PaymentMethod/B2b/Sberbank/PayerBankDetailsTest.php +++ b/tests/Model/PaymentMethod/B2b/Sberbank/PayerBankDetailsTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Model\PaymentData; +use Exception; use PHPUnit\Framework\TestCase; use YooKassa\Helpers\Random; use YooKassa\Model\PaymentMethod\B2b\Sberbank\PayerBankDetails; @@ -122,7 +123,7 @@ class PayerBankDetailsTest extends TestCase /** * @return array - * @throws \Exception + * @throws Exception */ public function validStringDataProvider() { diff --git a/tests/Model/PaymentMethod/BankCardTest.php b/tests/Model/PaymentMethod/BankCardTest.php index 833cfa30..c25a087f 100644 --- a/tests/Model/PaymentMethod/BankCardTest.php +++ b/tests/Model/PaymentMethod/BankCardTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Model\PaymentMethod; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\PaymentMethod\BankCard; use YooKassa\Model\PaymentMethod\BankCardSource; @@ -51,21 +52,21 @@ class BankCardTest extends TestCase /** * @dataProvider invalidLast4DataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidNumber($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setLast4($value); } /** * @dataProvider invalidLast4DataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidNumber($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->last4 = $value; } @@ -80,21 +81,21 @@ class BankCardTest extends TestCase /** * @dataProvider invalidFirst6DataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetFirst6InvalidNumber($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setFirst6($value); } /** * @dataProvider invalidFirst6DataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterFirst6InvalidNumber($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->first6 = $value; } @@ -109,51 +110,51 @@ class BankCardTest extends TestCase /** * @dataProvider invalidYearDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidYear($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setExpiryYear($value); } /** * @dataProvider invalidYearDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidYear($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->expiryYear = $value; } /** * @dataProvider invalidYearDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalid_year($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->expiry_year = $value; } /** * @dataProvider invalidMonthDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidMonth($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->expiryMonth = $value; } /** * @dataProvider invalidMonthDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalid_month($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->expiry_month = $value; } @@ -168,11 +169,11 @@ class BankCardTest extends TestCase /** * @dataProvider invalidMonthDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidMonth($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setExpiryMonth($value); } @@ -214,111 +215,111 @@ class BankCardTest extends TestCase /** * @dataProvider invalidCardTypeDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidCardType($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCardType($value); } /** * @dataProvider invalidCardTypeDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidCardType($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->cardType = $value; } /** * @dataProvider invalidCardTypeDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidCard_type($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->card_type = $value; } /** * @dataProvider invalidIssuerCountryDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidIssuerCountry($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setIssuerCountry($value); } /** * @dataProvider invalidIssuerCountryDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidIssuerCountry($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->issuerCountry = $value; } /** * @dataProvider invalidIssuerCountryDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidIssuer_country($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->issuer_country = $value; } /** * @dataProvider invalidIssuerNameDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidIssuerName($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setIssuerName($value); } /** * @dataProvider invalidIssuerNameDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidIssuerName($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->issuerName = $value; } /** * @dataProvider invalidIssuerNameDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidIssuer_name($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->issuer_name = $value; } /** * @dataProvider invalidSourceDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidSource($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setSource($value); } /** * @dataProvider invalidSourceDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidSource($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->source = $value; } @@ -434,7 +435,7 @@ class BankCardTest extends TestCase array(1), array(-1), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(3, '0123456789')), array(Random::str(5, '0123456789')), ); @@ -449,7 +450,7 @@ class BankCardTest extends TestCase array(1), array(-1), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(3, '0123456789')), array(Random::str(5, '0123456789')), ); @@ -465,7 +466,7 @@ class BankCardTest extends TestCase array(-1), array('5'), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(1, '0123456789')), array(Random::str(2, '0123456789')), array(Random::str(3, '0123456789')), @@ -482,7 +483,7 @@ class BankCardTest extends TestCase array(-1), array('5'), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(1, '0123456789')), array(Random::str(3, '0123456789')), array('13'), @@ -498,7 +499,7 @@ class BankCardTest extends TestCase array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } @@ -509,7 +510,7 @@ class BankCardTest extends TestCase array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } @@ -519,7 +520,7 @@ class BankCardTest extends TestCase array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } @@ -531,7 +532,7 @@ class BankCardTest extends TestCase array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } diff --git a/tests/Model/PaymentMethod/ElectronicCertificate/ElectronicCertificateApprovedPaymentArticleTest.php b/tests/Model/PaymentMethod/ElectronicCertificate/ElectronicCertificateApprovedPaymentArticleTest.php index 68c0ba4e..4510b226 100644 --- a/tests/Model/PaymentMethod/ElectronicCertificate/ElectronicCertificateApprovedPaymentArticleTest.php +++ b/tests/Model/PaymentMethod/ElectronicCertificate/ElectronicCertificateApprovedPaymentArticleTest.php @@ -28,6 +28,7 @@ namespace Tests\YooKassa\Model\PaymentMethod\ElectronicCertificate; use InvalidArgumentException; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\CurrencyCode; use YooKassa\Model\PaymentMethod\ElectronicCertificate\ElectronicCertificate; @@ -54,31 +55,31 @@ class ElectronicCertificateApprovedPaymentArticleTest extends TestCase /** * @dataProvider invalidArticleNumberDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetInvalidArticleNumber($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setArticleNumber($value); } /** * @dataProvider invalidArticleNumberDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidArticleNumber($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->articleNumber = $value; } /** * @dataProvider invalidArticleNumberDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidArticleNumberSnakeCase($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->article_number = $value; } @@ -93,31 +94,31 @@ class ElectronicCertificateApprovedPaymentArticleTest extends TestCase /** * @dataProvider invalidTruCodeDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetInvalidTruCode($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setTruCode($value); } /** * @dataProvider invalidTruCodeDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidTruCode($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->truCode = $value; } /** * @dataProvider invalidTruCodeDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidTruCodeSnakeCase($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->tru_code = $value; } @@ -132,21 +133,21 @@ class ElectronicCertificateApprovedPaymentArticleTest extends TestCase /** * @dataProvider invalidArticleCodeDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetInvalidArticleCode($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setArticleCode($value); } /** * @dataProvider invalidArticleCodeDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidArticleCode($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->articleCode = $value; } @@ -186,21 +187,21 @@ class ElectronicCertificateApprovedPaymentArticleTest extends TestCase /** * @dataProvider invalidCertificatesDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetInvalidCertificates($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCertificates($value); } /** * @dataProvider invalidCertificatesDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidCertificates($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->certificates = $value; } @@ -228,7 +229,7 @@ class ElectronicCertificateApprovedPaymentArticleTest extends TestCase array(1000), array(-1), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } @@ -256,7 +257,7 @@ class ElectronicCertificateApprovedPaymentArticleTest extends TestCase array(1), array(-1), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(29, '0123456789.')), array(Random::str(31, '0123456789.')), ); @@ -284,7 +285,7 @@ class ElectronicCertificateApprovedPaymentArticleTest extends TestCase { return array( array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(129)), ); } @@ -364,8 +365,8 @@ class ElectronicCertificateApprovedPaymentArticleTest extends TestCase array(array()), array(1), array('string'), - array(new \stdClass()), - array(array(new \stdClass())), + array(new stdClass()), + array(array(new stdClass())), array(array(1, 2, 3)), array(array('invalid_data')), ); diff --git a/tests/Model/PaymentMethod/ElectronicCertificate/ElectronicCertificatePaymentDataTest.php b/tests/Model/PaymentMethod/ElectronicCertificate/ElectronicCertificatePaymentDataTest.php index 16364cc5..cfd1b6f5 100644 --- a/tests/Model/PaymentMethod/ElectronicCertificate/ElectronicCertificatePaymentDataTest.php +++ b/tests/Model/PaymentMethod/ElectronicCertificate/ElectronicCertificatePaymentDataTest.php @@ -28,6 +28,7 @@ namespace Tests\YooKassa\Model\PaymentMethod\ElectronicCertificate; use InvalidArgumentException; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\CurrencyCode; use YooKassa\Model\MonetaryAmount; @@ -84,21 +85,21 @@ class ElectronicCertificatePaymentDataTest extends TestCase /** * @dataProvider invalidAmountDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetInvalidAmount($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setAmount($value); } /** * @dataProvider invalidAmountDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidAmount($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->amount = $value; } @@ -113,31 +114,31 @@ class ElectronicCertificatePaymentDataTest extends TestCase /** * @dataProvider invalidBasketIdDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetInvalidBasketId($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setBasketId($value); } /** * @dataProvider invalidBasketIdDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidBasketId($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->basketId = $value; } /** * @dataProvider invalidBasketIdDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidBasketIdSnakeCase($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->basket_id = $value; } @@ -178,7 +179,7 @@ class ElectronicCertificatePaymentDataTest extends TestCase array(1), array(true), array(false), - array(new \stdClass()), + array(new stdClass()), ); } @@ -203,7 +204,7 @@ class ElectronicCertificatePaymentDataTest extends TestCase array(''), array(null), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } diff --git a/tests/Model/PaymentMethod/ElectronicCertificate/ElectronicCertificateTest.php b/tests/Model/PaymentMethod/ElectronicCertificate/ElectronicCertificateTest.php index 83afeb13..e9b986a8 100644 --- a/tests/Model/PaymentMethod/ElectronicCertificate/ElectronicCertificateTest.php +++ b/tests/Model/PaymentMethod/ElectronicCertificate/ElectronicCertificateTest.php @@ -28,6 +28,7 @@ namespace Tests\YooKassa\Model\PaymentMethod\ElectronicCertificate; use InvalidArgumentException; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\CurrencyCode; use YooKassa\Model\MonetaryAmount; @@ -54,31 +55,31 @@ class ElectronicCertificateTest extends TestCase /** * @dataProvider invalidCertificateIdDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetInvalidCertificateId($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCertificateId($value); } /** * @dataProvider invalidCertificateIdDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidCertificateId($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->certificateId = $value; } /** * @dataProvider invalidCertificateIdDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidCertificateIdSnakeCase($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->certificate_id = $value; } @@ -93,31 +94,31 @@ class ElectronicCertificateTest extends TestCase /** * @dataProvider invalidTruQuantityDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetInvalidTruQuantity($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setTruQuantity($value); } /** * @dataProvider invalidTruQuantityDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidTruQuantity($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->truQuantity = $value; } /** * @dataProvider invalidTruQuantityDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidTruQuantitySnakeCase($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->tru_quantity = $value; } @@ -164,21 +165,21 @@ class ElectronicCertificateTest extends TestCase /** * @dataProvider invalidAvailableCompensationDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetInvalidAvailableCompensation($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setAvailableCompensation($value); } /** * @dataProvider invalidAvailableCompensationDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidAvailableCompensation($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->availableCompensation = $value; } @@ -225,21 +226,21 @@ class ElectronicCertificateTest extends TestCase /** * @dataProvider invalidAppliedCompensationDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetInvalidAppliedCompensation($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setAppliedCompensation($value); } /** * @dataProvider invalidAppliedCompensationDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidAppliedCompensation($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->appliedCompensation = $value; } @@ -267,7 +268,7 @@ class ElectronicCertificateTest extends TestCase array(1), array(-1), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(19)), array(Random::str(31)), ); @@ -294,7 +295,7 @@ class ElectronicCertificateTest extends TestCase array(''), array(null), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } @@ -335,7 +336,7 @@ class ElectronicCertificateTest extends TestCase array(1), array(true), array(false), - array(new \stdClass()), + array(new stdClass()), ); } @@ -376,7 +377,7 @@ class ElectronicCertificateTest extends TestCase array(1), array(true), array(false), - array(new \stdClass()), + array(new stdClass()), ); } diff --git a/tests/Model/PaymentMethod/PaymentMethodAlfaBankTest.php b/tests/Model/PaymentMethod/PaymentMethodAlfaBankTest.php index e456776d..0a23256e 100644 --- a/tests/Model/PaymentMethod/PaymentMethodAlfaBankTest.php +++ b/tests/Model/PaymentMethod/PaymentMethodAlfaBankTest.php @@ -25,11 +25,12 @@ namespace Tests\YooKassa\Model\PaymentMethod; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\PaymentMethod\PaymentMethodAlfaBank; use YooKassa\Model\PaymentMethodType; -class PaymentMethodAlfaBankTest extends AbstractPaymentMethodTest +class PaymentMethodAlfaBankTest extends AbstractPaymentMethodTestCase { /** * @return PaymentMethodAlfaBank @@ -70,22 +71,22 @@ class PaymentMethodAlfaBankTest extends AbstractPaymentMethodTest /** * @dataProvider invalidLoginDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidLogin($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->setLogin($value); } /** * @dataProvider invalidLoginDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidLogin($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->login = $value; } @@ -107,7 +108,7 @@ class PaymentMethodAlfaBankTest extends AbstractPaymentMethodTest array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } } diff --git a/tests/Model/PaymentMethod/PaymentMethodApplePayTest.php b/tests/Model/PaymentMethod/PaymentMethodApplePayTest.php index fe127835..5fab71fb 100644 --- a/tests/Model/PaymentMethod/PaymentMethodApplePayTest.php +++ b/tests/Model/PaymentMethod/PaymentMethodApplePayTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\PaymentMethod; use YooKassa\Model\PaymentMethod\PaymentMethodApplePay; use YooKassa\Model\PaymentMethodType; -class PaymentMethodApplePayTest extends AbstractPaymentMethodTest +class PaymentMethodApplePayTest extends AbstractPaymentMethodTestCase { /** * @return PaymentMethodApplePay diff --git a/tests/Model/PaymentMethod/PaymentMethodB2bSberbankTest.php b/tests/Model/PaymentMethod/PaymentMethodB2bSberbankTest.php index c0feca1c..2f4633e2 100644 --- a/tests/Model/PaymentMethod/PaymentMethodB2bSberbankTest.php +++ b/tests/Model/PaymentMethod/PaymentMethodB2bSberbankTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Model\PaymentMethod; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\CurrencyCode; use YooKassa\Model\MonetaryAmount; @@ -81,10 +82,10 @@ class PaymentMethodB2bSberbankTest extends TestCase /** * @dataProvider invalidVatDataProvider * @param string $value - * @expectedException \InvalidArgumentException */ public function testSetGetInvalidVatData($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->setVatData($value); } @@ -104,10 +105,10 @@ class PaymentMethodB2bSberbankTest extends TestCase /** * @dataProvider invalidPayerBankDetailsDataProvider * @param string $value - * @expectedException \InvalidArgumentException */ public function testSetGetInvalidPayerBankDetails($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->setPayerBankDetails($value); } @@ -124,8 +125,8 @@ class PaymentMethodB2bSberbankTest extends TestCase return array( array( array( - 'type' => Random::value(VatDataType::getValidValues()), - 'rate' => Random::value(VatDataRate::getValidValues()), + 'type' => Random::value(VatDataType::getValidValues()), + 'rate' => Random::value(VatDataRate::getValidValues()), 'amount' => new MonetaryAmount(Random::int(1, 10000), CurrencyCode::EUR), ) ), @@ -142,7 +143,7 @@ class PaymentMethodB2bSberbankTest extends TestCase public function invalidVatDataProvider() { return array( - array(new \stdClass()) + array(new stdClass()) ); } @@ -151,8 +152,8 @@ class PaymentMethodB2bSberbankTest extends TestCase return array( array( array( - 'fullName' => Random::str(1, 256), - 'shortName' => Random::str(1, 100), + 'fullName' => Random::str(1, 256), + 'shortName' => Random::str(1, 100), 'address' => Random::str(1, 100), 'inn' => Random::str(12, 12, '1234567890'), 'kpp' => Random::str(12, 12, '1234567890'), @@ -171,7 +172,7 @@ class PaymentMethodB2bSberbankTest extends TestCase public function invalidPayerBankDetailsDataProvider() { return array( - array(new \stdClass()) + array(new stdClass()) ); } } diff --git a/tests/Model/PaymentMethod/PaymentMethodBankCardTest.php b/tests/Model/PaymentMethod/PaymentMethodBankCardTest.php index 16adeed8..2b3bb37a 100644 --- a/tests/Model/PaymentMethod/PaymentMethodBankCardTest.php +++ b/tests/Model/PaymentMethod/PaymentMethodBankCardTest.php @@ -25,13 +25,14 @@ namespace Tests\YooKassa\Model\PaymentMethod; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\PaymentMethod\BankCardSource; use YooKassa\Model\PaymentMethod\PaymentMethodBankCard; use YooKassa\Model\PaymentMethod\PaymentMethodCardType; use YooKassa\Model\PaymentMethodType; -class PaymentMethodBankCardTest extends AbstractPaymentMethodTest +class PaymentMethodBankCardTest extends AbstractPaymentMethodTestCase { /** * @return PaymentMethodBankCard @@ -60,11 +61,11 @@ class PaymentMethodBankCardTest extends AbstractPaymentMethodTest /** * @dataProvider invalidCardDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidCard($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCard($value); } @@ -223,7 +224,7 @@ class PaymentMethodBankCardTest extends AbstractPaymentMethodTest array(0), array(1), array(-1), - array(new \stdClass()), + array(new stdClass()), array(Random::str(3, '0123456789')), array(Random::str(5, '0123456789')), ); diff --git a/tests/Model/PaymentMethod/PaymentMethodCashTest.php b/tests/Model/PaymentMethod/PaymentMethodCashTest.php index 4d2368e2..6f94710f 100644 --- a/tests/Model/PaymentMethod/PaymentMethodCashTest.php +++ b/tests/Model/PaymentMethod/PaymentMethodCashTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\PaymentMethod; use YooKassa\Model\PaymentMethod\PaymentMethodCash; use YooKassa\Model\PaymentMethodType; -class PaymentMethodCashTest extends AbstractPaymentMethodTest +class PaymentMethodCashTest extends AbstractPaymentMethodTestCase { /** * @return PaymentMethodCash diff --git a/tests/Model/PaymentMethod/PaymentMethodElectronicCertificateTest.php b/tests/Model/PaymentMethod/PaymentMethodElectronicCertificateTest.php index 97cbb08e..a12881ca 100644 --- a/tests/Model/PaymentMethod/PaymentMethodElectronicCertificateTest.php +++ b/tests/Model/PaymentMethod/PaymentMethodElectronicCertificateTest.php @@ -28,6 +28,7 @@ namespace Tests\YooKassa\Model\PaymentMethod; use InvalidArgumentException; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\CurrencyCode; use YooKassa\Model\MonetaryAmount; @@ -88,21 +89,21 @@ class PaymentMethodElectronicCertificateTest extends TestCase /** * @dataProvider invalidCardDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetInvalidCard($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCard($value); } /** * @dataProvider invalidCardDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidCard($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->card = $value; } @@ -158,31 +159,31 @@ class PaymentMethodElectronicCertificateTest extends TestCase /** * @dataProvider invalidElectronicCertificateDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetInvalidElectronicCertificate($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setElectronicCertificate($value); } /** * @dataProvider invalidElectronicCertificateDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidElectronicCertificate($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->electronicCertificate = $value; } /** * @dataProvider invalidElectronicCertificateDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidElectronicCertificateSnakeCase($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->electronic_certificate = $value; } @@ -224,21 +225,21 @@ class PaymentMethodElectronicCertificateTest extends TestCase /** * @dataProvider invalidArticlesDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetInvalidArticles($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setArticles($value); } /** * @dataProvider invalidArticlesDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidArticles($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->articles = $value; } @@ -267,7 +268,7 @@ class PaymentMethodElectronicCertificateTest extends TestCase array(1), array(-1), array('5'), - array(new \stdClass()), + array(new stdClass()), array(Random::str(20)), ); } @@ -297,7 +298,7 @@ class PaymentMethodElectronicCertificateTest extends TestCase array(1), array(-1), array('string'), - array(new \stdClass()), + array(new stdClass()), array(Random::str(20)), ); } @@ -386,8 +387,8 @@ class PaymentMethodElectronicCertificateTest extends TestCase return array( array(1), array('string'), - array(new \stdClass()), - array(array(new \stdClass())), + array(new stdClass()), + array(array(new stdClass())), array(array(1, 2, 3)), array(array('invalid_data')), ); diff --git a/tests/Model/PaymentMethod/PaymentMethodFactoryTest.php b/tests/Model/PaymentMethod/PaymentMethodFactoryTest.php index e9590430..7596e5d9 100644 --- a/tests/Model/PaymentMethod/PaymentMethodFactoryTest.php +++ b/tests/Model/PaymentMethod/PaymentMethodFactoryTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Model\PaymentMethodTest; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\PaymentMethod\AbstractPaymentMethod; use YooKassa\Model\PaymentMethod\PaymentMethodFactory; @@ -56,11 +57,11 @@ class PaymentMethodFactoryTest extends TestCase /** * @dataProvider invalidTypeDataProvider - * @expectedException \InvalidArgumentException * @param $type */ public function testInvalidFactory($type) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->factory($type); } @@ -103,11 +104,11 @@ class PaymentMethodFactoryTest extends TestCase /** * @dataProvider invalidDataArrayDataProvider - * @expectedException \InvalidArgumentException * @param $options */ public function testInvalidFactoryFromArray($options) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->factoryFromArray($options); } @@ -129,7 +130,7 @@ class PaymentMethodFactoryTest extends TestCase array(1), array(-1), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } @@ -138,161 +139,161 @@ class PaymentMethodFactoryTest extends TestCase $result = array( array( array( - 'type' => PaymentMethodType::ALFABANK, - 'login' => Random::str(10, 20), - 'id' => Random::str(1, 64), - 'saved' => Random::bool(), - 'title' => Random::str(10, 20), + 'type' => PaymentMethodType::ALFABANK, + 'login' => Random::str(10, 20), + 'id' => Random::str(1, 64), + 'saved' => Random::bool(), + 'title' => Random::str(10, 20), ), ), array( array( - 'type' => PaymentMethodType::GOOGLE_PAY, - 'id' => Random::str(1, 64), - 'saved' => Random::bool(), - 'title' => Random::str(10, 20), + 'type' => PaymentMethodType::GOOGLE_PAY, + 'id' => Random::str(1, 64), + 'saved' => Random::bool(), + 'title' => Random::str(10, 20), ), ), array( array( - 'type' => PaymentMethodType::APPLE_PAY, - 'id' => Random::str(1, 64), - 'saved' => Random::bool(), - 'title' => Random::str(10, 20), + 'type' => PaymentMethodType::APPLE_PAY, + 'id' => Random::str(1, 64), + 'saved' => Random::bool(), + 'title' => Random::str(10, 20), ), ), array( array( - 'type' => PaymentMethodType::BANK_CARD, - 'id' => Random::str(1, 64), - 'saved' => Random::bool(), - 'title' => Random::str(10, 20), + 'type' => PaymentMethodType::BANK_CARD, + 'id' => Random::str(1, 64), + 'saved' => Random::bool(), + 'title' => Random::str(10, 20), 'card' => array( - 'last4' => Random::str(4, '0123456789'), - 'first6' => Random::str(6, '0123456789'), - 'expiry_year' => Random::int(2000, 2200), - 'expiry_month' => Random::value(array('01','02','03','04','05','06','07','08','09','10','11','12')), - 'card_type' => Random::str(3, 10), + 'last4' => Random::str(4, '0123456789'), + 'first6' => Random::str(6, '0123456789'), + 'expiry_year' => Random::int(2000, 2200), + 'expiry_month' => Random::value(array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12')), + 'card_type' => Random::str(3, 10), ), ), ), array( array( - 'type' => PaymentMethodType::BANK_CARD, - 'id' => Random::str(1, 64), - 'saved' => Random::bool(), - 'title' => Random::str(10, 20), + 'type' => PaymentMethodType::BANK_CARD, + 'id' => Random::str(1, 64), + 'saved' => Random::bool(), + 'title' => Random::str(10, 20), 'card' => array( - 'last4' => Random::str(4, '0123456789'), - 'first6' => Random::str(6, '0123456789'), - 'expiry_year' => Random::int(2000, 2200), - 'expiry_month' => Random::value(array('01','02','03','04','05','06','07','08','09','10','11','12')), - 'card_type' => Random::str(3, 10), + 'last4' => Random::str(4, '0123456789'), + 'first6' => Random::str(6, '0123456789'), + 'expiry_year' => Random::int(2000, 2200), + 'expiry_month' => Random::value(array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12')), + 'card_type' => Random::str(3, 10), ), ), ), array( array( - 'type' => PaymentMethodType::SBERBANK, - 'id' => Random::str(1, 64), - 'saved' => Random::bool(), - 'title' => Random::str(10, 20), + 'type' => PaymentMethodType::SBERBANK, + 'id' => Random::str(1, 64), + 'saved' => Random::bool(), + 'title' => Random::str(10, 20), 'card' => array( - 'last4' => Random::str(4, '0123456789'), - 'first6' => Random::str(6, '0123456789'), - 'expiry_year' => Random::int(2000, 2200), - 'expiry_month' => Random::value(array('01','02','03','04','05','06','07','08','09','10','11','12')), - 'card_type' => Random::str(3, 10), + 'last4' => Random::str(4, '0123456789'), + 'first6' => Random::str(6, '0123456789'), + 'expiry_year' => Random::int(2000, 2200), + 'expiry_month' => Random::value(array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12')), + 'card_type' => Random::str(3, 10), ), - 'phone' => Random::str(4, 15, '0123456789'), + 'phone' => Random::str(4, 15, '0123456789'), ), ), array( array( - 'type' => PaymentMethodType::CASH, - 'id' => Random::str(1, 64), - 'saved' => Random::bool(), - 'title' => Random::str(10, 20), + 'type' => PaymentMethodType::CASH, + 'id' => Random::str(1, 64), + 'saved' => Random::bool(), + 'title' => Random::str(10, 20), ), ), array( array( - 'type' => PaymentMethodType::MOBILE_BALANCE, - 'id' => Random::str(1, 64), - 'saved' => Random::bool(), - 'title' => Random::str(10, 20), - 'phone' => Random::str(4, 15, '0123456789'), + 'type' => PaymentMethodType::MOBILE_BALANCE, + 'id' => Random::str(1, 64), + 'saved' => Random::bool(), + 'title' => Random::str(10, 20), + 'phone' => Random::str(4, 15, '0123456789'), ), ), array( array( - 'type' => PaymentMethodType::SBERBANK, - 'phone' => Random::str(4, 15, '0123456789'), - 'id' => Random::str(1, 64), - 'saved' => Random::bool(), - 'title' => Random::str(10, 20), + 'type' => PaymentMethodType::SBERBANK, + 'phone' => Random::str(4, 15, '0123456789'), + 'id' => Random::str(1, 64), + 'saved' => Random::bool(), + 'title' => Random::str(10, 20), ), ), array( array( - 'type' => PaymentMethodType::YOO_MONEY, + 'type' => PaymentMethodType::YOO_MONEY, 'account_number' => Random::str(31, '0123456789'), - 'id' => Random::str(1, 64), - 'saved' => Random::bool(), - 'title' => Random::str(10, 20), + 'id' => Random::str(1, 64), + 'saved' => Random::bool(), + 'title' => Random::str(10, 20), ), ), array( array( - 'type' => PaymentMethodType::YOO_MONEY, + 'type' => PaymentMethodType::YOO_MONEY, 'account_number' => Random::str(31, '0123456789'), - 'id' => Random::str(1, 64), - 'saved' => Random::bool(), - 'title' => Random::str(10, 20), + 'id' => Random::str(1, 64), + 'saved' => Random::bool(), + 'title' => Random::str(10, 20), ), ), array( array( - 'type' => PaymentMethodType::INSTALLMENTS, - 'id' => Random::str(1, 64), - 'saved' => Random::bool(), - 'title' => Random::str(10, 20), + 'type' => PaymentMethodType::INSTALLMENTS, + 'id' => Random::str(1, 64), + 'saved' => Random::bool(), + 'title' => Random::str(10, 20), ), ), array( array( - 'type' => PaymentMethodType::B2B_SBERBANK, - 'id' => Random::str(1, 64), - 'saved' => Random::bool(), + 'type' => PaymentMethodType::B2B_SBERBANK, + 'id' => Random::str(1, 64), + 'saved' => Random::bool(), ), ), array( array( - 'type' => PaymentMethodType::TINKOFF_BANK, - 'id' => Random::str(1, 64), - 'saved' => Random::bool(), + 'type' => PaymentMethodType::TINKOFF_BANK, + 'id' => Random::str(1, 64), + 'saved' => Random::bool(), ), ), array( array( - 'type' => PaymentMethodType::SBP, - 'id' => Random::str(1, 64), - 'saved' => Random::bool(), - 'title' => Random::str(10, 20), + 'type' => PaymentMethodType::SBP, + 'id' => Random::str(1, 64), + 'saved' => Random::bool(), + 'title' => Random::str(10, 20), ), ), array( array( - 'type' => PaymentMethodType::ALFA_PAY, - 'id' => Random::str(1, 64), - 'saved' => Random::bool(), - 'title' => Random::str(10, 20), + 'type' => PaymentMethodType::ALFA_PAY, + 'id' => Random::str(1, 64), + 'saved' => Random::bool(), + 'title' => Random::str(10, 20), 'card' => array( - 'last4' => Random::str(4, '0123456789'), - 'first6' => Random::str(6, '0123456789'), - 'expiry_year' => Random::int(2000, 2200), - 'expiry_month' => Random::value(array('01','02','03','04','05','06','07','08','09','10','11','12')), - 'card_type' => Random::str(3, 10), + 'last4' => Random::str(4, '0123456789'), + 'first6' => Random::str(6, '0123456789'), + 'expiry_year' => Random::int(2000, 2200), + 'expiry_month' => Random::value(array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12')), + 'card_type' => Random::str(3, 10), ), ), ), diff --git a/tests/Model/PaymentMethod/PaymentMethodGooglePayTest.php b/tests/Model/PaymentMethod/PaymentMethodGooglePayTest.php index 8e69fccd..23d04008 100644 --- a/tests/Model/PaymentMethod/PaymentMethodGooglePayTest.php +++ b/tests/Model/PaymentMethod/PaymentMethodGooglePayTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\PaymentMethod; use YooKassa\Model\PaymentMethod\PaymentMethodGooglePay; use YooKassa\Model\PaymentMethodType; -class PaymentMethodGooglePayTest extends AbstractPaymentMethodTest +class PaymentMethodGooglePayTest extends AbstractPaymentMethodTestCase { /** * @return PaymentMethodGooglePay diff --git a/tests/Model/PaymentMethod/PaymentMethodInstallmentsTest.php b/tests/Model/PaymentMethod/PaymentMethodInstallmentsTest.php index 4498c937..d2344b52 100644 --- a/tests/Model/PaymentMethod/PaymentMethodInstallmentsTest.php +++ b/tests/Model/PaymentMethod/PaymentMethodInstallmentsTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\PaymentMethod; use YooKassa\Model\PaymentMethod\PaymentMethodInstallments; use YooKassa\Model\PaymentMethodType; -class PaymentMethodInstallmentsTest extends AbstractPaymentMethodTest +class PaymentMethodInstallmentsTest extends AbstractPaymentMethodTestCase { /** * @return PaymentMethodInstallments diff --git a/tests/Model/PaymentMethod/PaymentMethodMobileBalanceTest.php b/tests/Model/PaymentMethod/PaymentMethodMobileBalanceTest.php index 11b5976f..ef568ab0 100644 --- a/tests/Model/PaymentMethod/PaymentMethodMobileBalanceTest.php +++ b/tests/Model/PaymentMethod/PaymentMethodMobileBalanceTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\PaymentMethod; use YooKassa\Model\PaymentMethod\PaymentMethodMobileBalance; use YooKassa\Model\PaymentMethodType; -class PaymentMethodMobileBalanceTest extends AbstractPaymentMethodPhoneTest +class PaymentMethodMobileBalanceTest extends AbstractPaymentMethodPhoneTestCase { /** * @return PaymentMethodMobileBalance diff --git a/tests/Model/PaymentMethod/PaymentMethodQiwiTest.php b/tests/Model/PaymentMethod/PaymentMethodQiwiTest.php index 82dad8a2..869398aa 100644 --- a/tests/Model/PaymentMethod/PaymentMethodQiwiTest.php +++ b/tests/Model/PaymentMethod/PaymentMethodQiwiTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\PaymentMethod; use YooKassa\Model\PaymentMethod\PaymentMethodQiwi; use YooKassa\Model\PaymentMethodType; -class PaymentMethodQiwiTest extends AbstractPaymentMethodTest +class PaymentMethodQiwiTest extends AbstractPaymentMethodTestCase { /** * @return PaymentMethodQiwi diff --git a/tests/Model/PaymentMethod/PaymentMethodSberBnplTest.php b/tests/Model/PaymentMethod/PaymentMethodSberBnplTest.php index cf2d8eff..250f28e2 100644 --- a/tests/Model/PaymentMethod/PaymentMethodSberBnplTest.php +++ b/tests/Model/PaymentMethod/PaymentMethodSberBnplTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\PaymentMethod; use YooKassa\Model\PaymentMethod\PaymentMethodSberBnpl; use YooKassa\Model\PaymentMethodType; -class PaymentMethodSberBnplTest extends AbstractPaymentMethodTest +class PaymentMethodSberBnplTest extends AbstractPaymentMethodTestCase { /** * @return PaymentMethodSberBnpl diff --git a/tests/Model/PaymentMethod/PaymentMethodSberLoanTest.php b/tests/Model/PaymentMethod/PaymentMethodSberLoanTest.php index 236c5fe9..a6813b65 100644 --- a/tests/Model/PaymentMethod/PaymentMethodSberLoanTest.php +++ b/tests/Model/PaymentMethod/PaymentMethodSberLoanTest.php @@ -33,7 +33,7 @@ use YooKassa\Model\PaymentMethod\AbstractPaymentMethod; use YooKassa\Model\PaymentMethod\PaymentMethodSberLoan; use YooKassa\Model\PaymentMethodType; -class PaymentMethodSberLoanTest extends AbstractPaymentMethodTest +class PaymentMethodSberLoanTest extends AbstractPaymentMethodTestCase { /** * @return AbstractPaymentMethod @@ -73,22 +73,22 @@ class PaymentMethodSberLoanTest extends AbstractPaymentMethodTest /** * @dataProvider invalidLoanOptionDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetInvalidLoanOption($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->setLoanOption($value); } /** * @dataProvider invalidLoanOptionDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidLoanOption($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->loan_option = $value; } @@ -120,22 +120,22 @@ class PaymentMethodSberLoanTest extends AbstractPaymentMethodTest /** * @dataProvider invalidDiscountAmountDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetInvalidDiscountAmount($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->setDiscountAmount($value); } /** * @dataProvider invalidDiscountAmountDataProvider - * @expectedException InvalidArgumentException * @param mixed $value */ public function testSetterInvalidDiscountAmount($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->discount_amount = $value; } diff --git a/tests/Model/PaymentMethod/PaymentMethodSberbankTest.php b/tests/Model/PaymentMethod/PaymentMethodSberbankTest.php index 79392e11..fd2b6f48 100644 --- a/tests/Model/PaymentMethod/PaymentMethodSberbankTest.php +++ b/tests/Model/PaymentMethod/PaymentMethodSberbankTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Model\PaymentMethod; +use stdClass; use YooKassa\Model\PaymentMethod\PaymentMethodSberbank; use YooKassa\Model\PaymentMethodType; @@ -69,22 +70,22 @@ class PaymentMethodSberbankTest extends PaymentMethodBankCardTest /** * @dataProvider invalidPhoneDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidPhone($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->setPhone($value); } /** * @dataProvider invalidPhoneDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidPhone($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->phone = $value; } @@ -115,7 +116,7 @@ class PaymentMethodSberbankTest extends PaymentMethodBankCardTest array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), array('2345678901234567'), ); } diff --git a/tests/Model/PaymentMethod/PaymentMethodSbpTest.php b/tests/Model/PaymentMethod/PaymentMethodSbpTest.php index 22dee910..cca7b05e 100644 --- a/tests/Model/PaymentMethod/PaymentMethodSbpTest.php +++ b/tests/Model/PaymentMethod/PaymentMethodSbpTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\PaymentMethod; use YooKassa\Model\PaymentMethod\PaymentMethodSbp; use YooKassa\Model\PaymentMethodType; -class PaymentMethodSbpTest extends AbstractPaymentMethodTest +class PaymentMethodSbpTest extends AbstractPaymentMethodTestCase { /** * @return PaymentMethodSbp diff --git a/tests/Model/PaymentMethod/PaymentMethodTinkoffBankTest.php b/tests/Model/PaymentMethod/PaymentMethodTinkoffBankTest.php index 0a5354cc..3af992b2 100644 --- a/tests/Model/PaymentMethod/PaymentMethodTinkoffBankTest.php +++ b/tests/Model/PaymentMethod/PaymentMethodTinkoffBankTest.php @@ -29,7 +29,7 @@ use YooKassa\Model\PaymentMethod\AbstractPaymentMethod; use YooKassa\Model\PaymentMethod\PaymentMethodTinkoffBank; use YooKassa\Model\PaymentMethodType; -class PaymentMethodTinkoffBankTest extends AbstractPaymentMethodTest +class PaymentMethodTinkoffBankTest extends AbstractPaymentMethodTestCase { /** * @return AbstractPaymentMethod diff --git a/tests/Model/PaymentMethod/PaymentMethodUnknownTest.php b/tests/Model/PaymentMethod/PaymentMethodUnknownTest.php index 2a40a454..75f9528e 100644 --- a/tests/Model/PaymentMethod/PaymentMethodUnknownTest.php +++ b/tests/Model/PaymentMethod/PaymentMethodUnknownTest.php @@ -29,7 +29,7 @@ use YooKassa\Model\PaymentMethod\AbstractPaymentMethod; use YooKassa\Model\PaymentMethod\PaymentMethodUnknown; use YooKassa\Model\PaymentMethodType; -class PaymentMethodUnknownTest extends AbstractPaymentMethodTest +class PaymentMethodUnknownTest extends AbstractPaymentMethodTestCase { /** * @return AbstractPaymentMethod diff --git a/tests/Model/PaymentMethod/PaymentMethodWebmoneyTest.php b/tests/Model/PaymentMethod/PaymentMethodWebmoneyTest.php index 599fcc4c..81d17f40 100644 --- a/tests/Model/PaymentMethod/PaymentMethodWebmoneyTest.php +++ b/tests/Model/PaymentMethod/PaymentMethodWebmoneyTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\PaymentMethod; use YooKassa\Model\PaymentMethod\PaymentMethodWebmoney; use YooKassa\Model\PaymentMethodType; -class PaymentMethodWebmoneyTest extends AbstractPaymentMethodTest +class PaymentMethodWebmoneyTest extends AbstractPaymentMethodTestCase { /** * @return PaymentMethodWebmoney diff --git a/tests/Model/PaymentMethod/PaymentMethodWechatTest.php b/tests/Model/PaymentMethod/PaymentMethodWechatTest.php index b82715e0..bdfca22d 100644 --- a/tests/Model/PaymentMethod/PaymentMethodWechatTest.php +++ b/tests/Model/PaymentMethod/PaymentMethodWechatTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Model\PaymentMethod; use YooKassa\Model\PaymentMethod\PaymentMethodWechat; use YooKassa\Model\PaymentMethodType; -class PaymentMethodWechatTest extends AbstractPaymentMethodTest +class PaymentMethodWechatTest extends AbstractPaymentMethodTestCase { /** * @return PaymentMethodWechat diff --git a/tests/Model/PaymentMethod/PaymentMethodYooMoneyTest.php b/tests/Model/PaymentMethod/PaymentMethodYooMoneyTest.php index ed62da65..b3bfeb2d 100644 --- a/tests/Model/PaymentMethod/PaymentMethodYooMoneyTest.php +++ b/tests/Model/PaymentMethod/PaymentMethodYooMoneyTest.php @@ -25,11 +25,12 @@ namespace Tests\YooKassa\Model\PaymentMethod; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\PaymentMethod\PaymentMethodYooMoney; use YooKassa\Model\PaymentMethodType; -class PaymentMethodYooMoneyTest extends AbstractPaymentMethodTest +class PaymentMethodYooMoneyTest extends AbstractPaymentMethodTestCase { /** * @return PaymentMethodYooMoney @@ -79,33 +80,33 @@ class PaymentMethodYooMoneyTest extends AbstractPaymentMethodTest /** * @dataProvider invalidAccountNumberDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidAccountNumber($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->setAccountNumber($value); } /** * @dataProvider invalidAccountNumberDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidAccountNumber($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->accountNumber = $value; } /** * @dataProvider invalidAccountNumberDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidAccount_number($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->account_number = $value; } @@ -130,7 +131,7 @@ class PaymentMethodYooMoneyTest extends AbstractPaymentMethodTest array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(10, '0123456789')), array(Random::str(34, '0123456789')), ); diff --git a/tests/Model/PaymentTest.php b/tests/Model/PaymentTest.php index ded09d9c..1ddddebc 100644 --- a/tests/Model/PaymentTest.php +++ b/tests/Model/PaymentTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Model; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\CancellationDetails; use YooKassa\Model\CancellationDetailsPartyCode; @@ -66,22 +67,22 @@ class PaymentTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidId($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payment(); $instance->setId($value['id']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidId($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payment(); $instance->id = $value['id']; } @@ -109,22 +110,22 @@ class PaymentTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidStatus($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payment(); $instance->setStatus($value['status']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidStatus($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payment(); $instance->status = $value['status']; } @@ -157,7 +158,7 @@ class PaymentTest extends TestCase public function testSetInvalidRecipient($value) { if (class_exists('TypeError')) { - self::setExpectedException('TypeError'); + self::expectException('TypeError'); $instance = new Payment(); $instance->setRecipient($value['recipient']); } @@ -170,7 +171,7 @@ class PaymentTest extends TestCase public function testSetterInvalidRecipient($value) { if (class_exists('TypeError')) { - self::setExpectedException('TypeError'); + self::expectException('TypeError'); $instance = new Payment(); $instance->recipient = $value['recipient']; } @@ -204,7 +205,7 @@ class PaymentTest extends TestCase public function testSetInvalidAmount($value) { if (class_exists('TypeError')) { - self::setExpectedException('TypeError'); + self::expectException('TypeError'); $instance = new Payment(); $instance->setAmount($value['amount']); } @@ -217,7 +218,7 @@ class PaymentTest extends TestCase public function testSetterInvalidAmount($value) { if (class_exists('TypeError')) { - self::setExpectedException('TypeError'); + self::expectException('TypeError'); $instance = new Payment(); $instance->amount = $value['amount']; } @@ -260,7 +261,7 @@ class PaymentTest extends TestCase public function testSetInvalidPaymentMethod($value) { if (class_exists('TypeError')) { - self::setExpectedException('TypeError'); + self::expectException('TypeError'); $instance = new Payment(); $instance->setPaymentMethod($value['payment_method']); } @@ -273,7 +274,7 @@ class PaymentTest extends TestCase public function testSetterInvalidPaymentMethod($value) { if (class_exists('TypeError')) { - self::setExpectedException('TypeError'); + self::expectException('TypeError'); $instance = new Payment(); $instance->paymentMethod = $value['payment_method']; } @@ -286,7 +287,7 @@ class PaymentTest extends TestCase public function testSetterInvalidPayment_method($value) { if (class_exists('TypeError')) { - self::setExpectedException('TypeError'); + self::expectException('TypeError'); $instance = new Payment(); $instance->payment_method = $value['payment_method']; } @@ -324,33 +325,33 @@ class PaymentTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidCreatedAt($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payment(); $instance->setCreatedAt($value['created_at']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidCreatedAt($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payment(); $instance->createdAt = $value['created_at']; } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidCreated_at($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payment(); $instance->created_at = $value['created_at']; } @@ -405,33 +406,33 @@ class PaymentTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidCapturedAt($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payment(); $instance->setCapturedAt($value['captured_at']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidCapturedAt($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payment(); $instance->capturedAt = $value['captured_at']; } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidCaptured_at($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payment(); $instance->captured_at = $value['captured_at']; } @@ -464,7 +465,7 @@ class PaymentTest extends TestCase public function testSetInvalidConfirmation($value) { if (class_exists('TypeError')) { - self::setExpectedException('TypeError'); + self::expectException('TypeError'); $instance = new Payment(); $instance->setConfirmation($value['confirmation']); } @@ -477,7 +478,7 @@ class PaymentTest extends TestCase public function testSetterInvalidConfirmation($value) { if (class_exists('TypeError')) { - self::setExpectedException('TypeError'); + self::expectException('TypeError'); $instance = new Payment(); $instance->confirmation = $value['confirmation']; } @@ -520,7 +521,7 @@ class PaymentTest extends TestCase public function testSetInvalidRefundedAmount($value) { if (class_exists('TypeError')) { - self::setExpectedException('TypeError'); + self::expectException('TypeError'); $instance = new Payment(); $instance->setRefundedAmount($value['refunded_amount']); } @@ -533,7 +534,7 @@ class PaymentTest extends TestCase public function testSetterInvalidRefundedAmount($value) { if (class_exists('TypeError')) { - self::setExpectedException('TypeError'); + self::expectException('TypeError'); $instance = new Payment(); $instance->refundedAmount = $value['refunded_amount']; } @@ -546,7 +547,7 @@ class PaymentTest extends TestCase public function testSetterInvalidRefunded_amount($value) { if (class_exists('TypeError')) { - self::setExpectedException('TypeError'); + self::expectException('TypeError'); $instance = new Payment(); $instance->refunded_amount = $value['refunded_amount']; } @@ -575,22 +576,22 @@ class PaymentTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidPaid($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payment(); $instance->setPaid($value['paid']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidPaid($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payment(); $instance->paid = $value['paid']; } @@ -618,22 +619,22 @@ class PaymentTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidRefundable($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payment(); $instance->setRefundable($value['refundable']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidRefundable($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payment(); $instance->refundable = $value['refundable']; } @@ -689,33 +690,33 @@ class PaymentTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidReceiptRegistration($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payment(); $instance->setReceiptRegistration($value['receipt_registration']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidReceiptRegistration($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payment(); $instance->receiptRegistration = $value['receipt_registration']; } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidReceipt_registration($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payment(); $instance->receipt_registration = $value['receipt_registration']; } @@ -765,10 +766,10 @@ class PaymentTest extends TestCase /** * @dataProvider invalidDataProvider * @param array $options - * @expectedException \InvalidArgumentException */ public function testInvalidTransfers($options) { + $this->expectException('InvalidArgumentException'); $instance = new Payment(); $instance->setTransfers($options['transfers']); } @@ -787,10 +788,10 @@ class PaymentTest extends TestCase /** * @dataProvider invalidDataProvider * @param array $options - * @expectedException \InvalidArgumentException */ public function testSetInvalidTest($options) { + $this->expectException('InvalidArgumentException'); $instance = new Payment(); $instance->setTest($options['test']); } @@ -811,7 +812,7 @@ class PaymentTest extends TestCase 'description' => ($i == 0 ? null : ($i == 1 ? '' : ($i == 2 ? Random::str(Payment::MAX_LENGTH_DESCRIPTION) : Random::str(1, Payment::MAX_LENGTH_DESCRIPTION)))), 'payment_method' => new PaymentMethodQiwi(), - 'reference_id' => ($i == 0 ? null : ($i == 1 ? '' : Random::str(10, 20, 'abcdef0123456789'))), + 'reference_id' => ($i == 0 ? null : ($i == 1 ? '' : Random::str(10, 20, 'abcdef0123456789'))), 'created_at' => date(YOOKASSA_DATE, mt_rand(1, time())), 'captured_at' => ($i == 0 ? null : ($i == 1 ? '' : date(YOOKASSA_DATE, mt_rand(1, time())))), 'expires_at' => ($i == 0 ? null : ($i == 1 ? '' : date(YOOKASSA_DATE, mt_rand(1, time())))), @@ -881,8 +882,8 @@ class PaymentTest extends TestCase 'refundable' => '', 'created_at' => array(), 'captured_at' => '23423-234-234', - 'receipt_registration' => new \stdClass(), - 'transfers' => new \stdClass(), + 'receipt_registration' => new stdClass(), + 'transfers' => new stdClass(), 'test' => '' ), ) @@ -899,8 +900,8 @@ class PaymentTest extends TestCase 'charge' => 'test', 'income' => 'test', 'refunded_amount' => 'test', - 'paid' => $i == 0 ? array() : new \stdClass(), - 'refundable' => $i == 0 ? array() : new \stdClass(), + 'paid' => $i == 0 ? array() : new stdClass(), + 'refundable' => $i == 0 ? array() : new stdClass(), 'created_at' => $i == 0 ? '23423-234-32' : -Random::int(), 'captured_at' => -Random::int(), 'receipt_registration' => $i == 0 ? true : Random::str(5), @@ -962,33 +963,33 @@ class PaymentTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidExpiresAt($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payment(); $instance->setExpiresAt($value['captured_at']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidExpiresAt($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payment(); $instance->expiresAt = $value['captured_at']; } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidExpires_at($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payment(); $instance->expires_at = $value['captured_at']; } @@ -1010,19 +1011,19 @@ class PaymentTest extends TestCase } /** - * @expectedException \InvalidArgumentException */ public function testSetInvalidTypeDescription() { + $this->expectException('InvalidArgumentException'); $instance = new Payment(); $instance->setDescription(true); } /** - * @expectedException \InvalidArgumentException */ public function testSetInvalidLengthDescription() { + $this->expectException('InvalidArgumentException'); $instance = new Payment(); $description = Random::str(Payment::MAX_LENGTH_DESCRIPTION + 1); $instance->setDescription($description); diff --git a/tests/Model/Payout/AbstractPayoutDestinationTest.php b/tests/Model/Payout/AbstractPayoutDestinationTestCase.php similarity index 92% rename from tests/Model/Payout/AbstractPayoutDestinationTest.php rename to tests/Model/Payout/AbstractPayoutDestinationTestCase.php index 4aaca4c1..76c6e928 100644 --- a/tests/Model/Payout/AbstractPayoutDestinationTest.php +++ b/tests/Model/Payout/AbstractPayoutDestinationTestCase.php @@ -26,10 +26,11 @@ namespace Tests\YooKassa\Model\Payout; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\Payout\AbstractPayoutDestination; -abstract class AbstractPayoutDestinationTest extends TestCase +abstract class AbstractPayoutDestinationTestCase extends TestCase { /** * @return AbstractPayoutDestination @@ -52,11 +53,11 @@ abstract class AbstractPayoutDestinationTest extends TestCase /** * @dataProvider invalidTypeDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testInvalidType($value) { + $this->expectException('InvalidArgumentException'); new TestPaymentData($value); } @@ -68,7 +69,7 @@ abstract class AbstractPayoutDestinationTest extends TestCase array(Random::str(40)), array(0), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } } diff --git a/tests/Model/Payout/IncomeReceiptTest.php b/tests/Model/Payout/IncomeReceiptTest.php index 9a5f6650..019f39bd 100644 --- a/tests/Model/Payout/IncomeReceiptTest.php +++ b/tests/Model/Payout/IncomeReceiptTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Model\Payout; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\CurrencyCode; use YooKassa\Model\MonetaryAmount; @@ -87,11 +88,11 @@ class IncomeReceiptTest extends TestCase /** * @dataProvider invalidAmountProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidAmount($value) { + $this->expectException('InvalidArgumentException'); $instance = new IncomeReceipt(); $instance->setAmount($value); } @@ -139,11 +140,11 @@ class IncomeReceiptTest extends TestCase /** * @dataProvider invalidServiceNameProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidServiceName($value) { + $this->expectException('InvalidArgumentException'); $instance = new IncomeReceipt(); $instance->setServiceName($value); } @@ -191,11 +192,11 @@ class IncomeReceiptTest extends TestCase /** * @dataProvider invalidStringProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidNpdReceiptId($value) { + $this->expectException('InvalidArgumentException'); $instance = new IncomeReceipt(); $instance->setNpdReceiptId($value); } @@ -234,11 +235,11 @@ class IncomeReceiptTest extends TestCase /** * @dataProvider invalidStringProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidUrl($value) { + $this->expectException('InvalidArgumentException'); $instance = new IncomeReceipt(); $instance->setUrl($value); } @@ -248,34 +249,34 @@ class IncomeReceiptTest extends TestCase $result = array( array( array( - 'service_name' => Random::str(1, IncomeReceipt::MAX_LENGTH_SERVICE_NAME), - 'npd_receipt_id' => null, - 'url' => null, - 'amount' => null, + 'service_name' => Random::str(1, IncomeReceipt::MAX_LENGTH_SERVICE_NAME), + 'npd_receipt_id' => null, + 'url' => null, + 'amount' => null, ), ), array( array( - 'service_name' => Random::str(1, IncomeReceipt::MAX_LENGTH_SERVICE_NAME), - 'npd_receipt_id' => '', - 'url' => Random::str(1, 50), - 'amount' => array(), + 'service_name' => Random::str(1, IncomeReceipt::MAX_LENGTH_SERVICE_NAME), + 'npd_receipt_id' => '', + 'url' => Random::str(1, 50), + 'amount' => array(), ), ), array( array( - 'service_name' => Random::str(1, IncomeReceipt::MAX_LENGTH_SERVICE_NAME), - 'npd_receipt_id' => Random::str(1, 50), - 'url' => '', + 'service_name' => Random::str(1, IncomeReceipt::MAX_LENGTH_SERVICE_NAME), + 'npd_receipt_id' => Random::str(1, 50), + 'url' => '', 'amount' => new MonetaryAmount(Random::int(1, 1000000)), ), ), ); for ($i = 1; $i < 6; $i++) { $receipt = array( - 'service_name' => Random::str(1, IncomeReceipt::MAX_LENGTH_SERVICE_NAME), - 'npd_receipt_id' => Random::str(1, 50), - 'url' => Random::str(1, 50), + 'service_name' => Random::str(1, IncomeReceipt::MAX_LENGTH_SERVICE_NAME), + 'npd_receipt_id' => Random::str(1, 50), + 'url' => Random::str(1, 50), 'amount' => array( 'value' => round(Random::float(0.1, 99.99), 2), 'currency' => Random::value(CurrencyCode::getValidValues()) @@ -291,7 +292,7 @@ class IncomeReceiptTest extends TestCase return array( array(null), array(''), - array(new \stdClass()), + array(new stdClass()), array(true), array(false), array(array()), @@ -302,7 +303,7 @@ class IncomeReceiptTest extends TestCase public function invalidStringProvider() { return array( - array(new \stdClass()), + array(new stdClass()), array(true), array(false), array(array()), @@ -312,7 +313,7 @@ class IncomeReceiptTest extends TestCase public function invalidAmountProvider() { return array( - array(new \stdClass()), + array(new stdClass()), array(true), array(false), ); diff --git a/tests/Model/Payout/PayoutCancellationDetailsTest.php b/tests/Model/Payout/PayoutCancellationDetailsTest.php index e61a867d..e87bd03c 100644 --- a/tests/Model/Payout/PayoutCancellationDetailsTest.php +++ b/tests/Model/Payout/PayoutCancellationDetailsTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Model\Payout; +use Exception; use PHPUnit\Framework\TestCase; use YooKassa\Model\Payout\PayoutCancellationDetailsPartyCode; use YooKassa\Model\Payout\PayoutCancellationDetailsReasonCode; @@ -96,7 +97,7 @@ class PayoutCancellationDetailsTest extends TestCase $instance = self::getInstance(); try { $instance->setParty($value); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } @@ -111,7 +112,7 @@ class PayoutCancellationDetailsTest extends TestCase $instance = self::getInstance(); try { $instance->reason = $value; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } @@ -121,15 +122,15 @@ class PayoutCancellationDetailsTest extends TestCase */ public function validDataProvider() { - $result = array(); - $cancellationDetailsParties = PayoutCancellationDetailsPartyCode::getValidValues(); + $result = array(); + $cancellationDetailsParties = PayoutCancellationDetailsPartyCode::getValidValues(); $countCancellationDetailsParties = count($cancellationDetailsParties); - $cancellationDetailsReasons = PayoutCancellationDetailsReasonCode::getValidValues(); + $cancellationDetailsReasons = PayoutCancellationDetailsReasonCode::getValidValues(); $countCancellationDetailsReasons = count($cancellationDetailsReasons); for ($i = 0; $i < 20; $i++) { $result[] = array( array( - 'party' => $cancellationDetailsParties[$i % $countCancellationDetailsParties], + 'party' => $cancellationDetailsParties[$i % $countCancellationDetailsParties], 'reason' => $cancellationDetailsReasons[$i % $countCancellationDetailsReasons] ) ); @@ -159,7 +160,7 @@ class PayoutCancellationDetailsTest extends TestCase { $instance = new PayoutCancellationDetails($value); $expected = array( - 'party' => $value['party'], + 'party' => $value['party'], 'reason' => $value['reason'], ); self::assertEquals($expected, $instance->jsonSerialize()); diff --git a/tests/Model/Payout/PayoutDestinationBankCardCardTest.php b/tests/Model/Payout/PayoutDestinationBankCardCardTest.php index 0010d3bf..75344d89 100644 --- a/tests/Model/Payout/PayoutDestinationBankCardCardTest.php +++ b/tests/Model/Payout/PayoutDestinationBankCardCardTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Model\Payout; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\PaymentMethodType; use YooKassa\Model\Payout\PayoutDestinationBankCardCard; @@ -59,21 +60,21 @@ class PayoutDestinationBankCardCardTest extends TestCase /** * @dataProvider invalidLast4DataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidNumber($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setLast4($value); } /** * @dataProvider invalidLast4DataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidNumber($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->last4 = $value; } @@ -88,21 +89,21 @@ class PayoutDestinationBankCardCardTest extends TestCase /** * @dataProvider invalidFirst6DataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetFirst6InvalidNumber($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setFirst6($value); } /** * @dataProvider invalidFirst6DataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterFirst6InvalidNumber($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->first6 = $value; } @@ -135,91 +136,91 @@ class PayoutDestinationBankCardCardTest extends TestCase /** * @dataProvider invalidCardTypeDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidCardType($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCardType($value); } /** * @dataProvider invalidCardTypeDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidCardType($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->cardType = $value; } /** * @dataProvider invalidCardTypeDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidCard_type($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->card_type = $value; } /** * @dataProvider invalidIssuerCountryDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidIssuerCountry($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setIssuerCountry($value); } /** * @dataProvider invalidIssuerCountryDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidIssuerCountry($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->issuerCountry = $value; } /** * @dataProvider invalidIssuerCountryDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidIssuer_country($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->issuer_country = $value; } /** * @dataProvider invalidIssuerNameDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidIssuerName($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setIssuerName($value); } /** * @dataProvider invalidIssuerNameDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidIssuerName($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->issuerName = $value; } /** * @dataProvider invalidIssuerNameDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidIssuer_name($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->issuer_name = $value; } @@ -290,7 +291,7 @@ class PayoutDestinationBankCardCardTest extends TestCase array(1), array(-1), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(3, '0123456789')), array(Random::str(5, '0123456789')), ); @@ -305,7 +306,7 @@ class PayoutDestinationBankCardCardTest extends TestCase array(1), array(-1), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(3, '0123456789')), array(Random::str(5, '0123456789')), ); @@ -319,7 +320,7 @@ class PayoutDestinationBankCardCardTest extends TestCase array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } @@ -330,7 +331,7 @@ class PayoutDestinationBankCardCardTest extends TestCase array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } @@ -340,7 +341,7 @@ class PayoutDestinationBankCardCardTest extends TestCase array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } diff --git a/tests/Model/Payout/PayoutDestinationBankCardTest.php b/tests/Model/Payout/PayoutDestinationBankCardTest.php index 170d6591..bc470788 100644 --- a/tests/Model/Payout/PayoutDestinationBankCardTest.php +++ b/tests/Model/Payout/PayoutDestinationBankCardTest.php @@ -25,12 +25,13 @@ namespace Tests\YooKassa\Model\Payout; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\Payout\PayoutDestinationBankCard; use YooKassa\Model\Payout\PayoutDestinationBankCardCard; use YooKassa\Model\PaymentMethodType; -class PayoutDestinationBankCardTest extends AbstractPayoutDestinationTest +class PayoutDestinationBankCardTest extends AbstractPayoutDestinationTestCase { /** * @return PayoutDestinationBankCard @@ -97,21 +98,21 @@ class PayoutDestinationBankCardTest extends AbstractPayoutDestinationTest /** * @dataProvider invalidCardDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidCard($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCard($value); } /** * @dataProvider invalidCardDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidCard($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->card = $value; } @@ -140,7 +141,7 @@ class PayoutDestinationBankCardTest extends AbstractPayoutDestinationTest array(-1), array('5'), array(true), - array(new \stdClass()), + array(new stdClass()), ); } } diff --git a/tests/Model/Payout/PayoutDestinationFactoryTest.php b/tests/Model/Payout/PayoutDestinationFactoryTest.php index 5f477917..0cc3f3aa 100644 --- a/tests/Model/Payout/PayoutDestinationFactoryTest.php +++ b/tests/Model/Payout/PayoutDestinationFactoryTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Model\Payout; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\Payout\AbstractPayoutDestination; use YooKassa\Model\Payout\PayoutDestinationFactory; @@ -54,11 +55,11 @@ class PayoutDestinationFactoryTest extends TestCase /** * @dataProvider invalidTypeDataProvider - * @expectedException \InvalidArgumentException * @param $type */ public function testInvalidFactory($type) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->factory($type); } @@ -100,11 +101,11 @@ class PayoutDestinationFactoryTest extends TestCase /** * @dataProvider invalidDataArrayDataProvider - * @expectedException \InvalidArgumentException * @param $options */ public function testInvalidFactoryFromArray($options) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->factoryFromArray($options); } @@ -128,7 +129,7 @@ class PayoutDestinationFactoryTest extends TestCase array(-1), array('5'), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(10)), ); } @@ -136,15 +137,15 @@ class PayoutDestinationFactoryTest extends TestCase public function validArrayDataProvider() { $result = array( - array( + array( array( 'type' => PaymentMethodType::BANK_CARD, 'card' => array( - 'first6' => Random::str(6, '0123456789'), - 'last4' => Random::str(4, '0123456789'), - 'card_type' => Random::str(3, 20), + 'first6' => Random::str(6, '0123456789'), + 'last4' => Random::str(4, '0123456789'), + 'card_type' => Random::str(3, 20), 'issuer_country' => Random::str(2), - 'issuer_name' => Random::str(4, 50), + 'issuer_name' => Random::str(4, 50), ), ), ), @@ -161,7 +162,7 @@ class PayoutDestinationFactoryTest extends TestCase 'bank_id' => Random::str(4, 12), ), ), - ); + ); foreach (PayoutDestinationType::getEnabledValues() as $value) { $result[] = array(array('type' => $value)); } diff --git a/tests/Model/Payout/PayoutDestinationSbpTest.php b/tests/Model/Payout/PayoutDestinationSbpTest.php index 21d89943..be3f0f5c 100644 --- a/tests/Model/Payout/PayoutDestinationSbpTest.php +++ b/tests/Model/Payout/PayoutDestinationSbpTest.php @@ -25,11 +25,13 @@ namespace Tests\YooKassa\Model\Payout; +use DateTime; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\PaymentMethodType; use YooKassa\Model\Payout\PayoutDestinationSbp; -class PayoutDestinationSbpTest extends AbstractPayoutDestinationTest +class PayoutDestinationSbpTest extends AbstractPayoutDestinationTestCase { /** * @return PayoutDestinationSbp @@ -82,21 +84,21 @@ class PayoutDestinationSbpTest extends AbstractPayoutDestinationTest /** * @dataProvider invalidPhoneDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidPhone($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setPhone($value); } /** * @dataProvider invalidPhoneDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidPhone($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->phone = $value; } @@ -140,21 +142,21 @@ class PayoutDestinationSbpTest extends AbstractPayoutDestinationTest /** * @dataProvider invalidBankIdDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidBankId($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setBankId($value); } /** * @dataProvider invalidBankIdDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidBankId($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->bankId = $value; } @@ -199,20 +201,20 @@ class PayoutDestinationSbpTest extends AbstractPayoutDestinationTest /** * @dataProvider invalidRecipientCheckedDataProvider * @param mixed $value - * @expectedException \InvalidArgumentException */ public function testSetInvalidRecipientChecked($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->recipientChecked = $value; } /** * @dataProvider invalidRecipientCheckedDataProvider * @param mixed $value - * @expectedException \InvalidArgumentException */ public function testSettterInvalidRecipientChecked($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setRecipientChecked($value); } @@ -231,8 +233,8 @@ class PayoutDestinationSbpTest extends AbstractPayoutDestinationTest array(null), array(''), array(true), - array(new \stdClass()), - array(new \DateTime()), + array(new stdClass()), + array(new DateTime()), ); } @@ -251,8 +253,8 @@ class PayoutDestinationSbpTest extends AbstractPayoutDestinationTest array(null), array(''), array(true), - array(new \stdClass()), - array(new \DateTime()), + array(new stdClass()), + array(new DateTime()), array(Random::str(13)), ); } @@ -271,8 +273,8 @@ class PayoutDestinationSbpTest extends AbstractPayoutDestinationTest array(array()), array(null), array(''), - array(new \stdClass()), - array(new \DateTime()), + array(new stdClass()), + array(new DateTime()), ); } diff --git a/tests/Model/Payout/PayoutDestinationYooMoneyTest.php b/tests/Model/Payout/PayoutDestinationYooMoneyTest.php index 709a5bd6..4178ab5e 100644 --- a/tests/Model/Payout/PayoutDestinationYooMoneyTest.php +++ b/tests/Model/Payout/PayoutDestinationYooMoneyTest.php @@ -25,11 +25,13 @@ namespace Tests\YooKassa\Model\Payout; +use DateTime; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\Payout\PayoutDestinationYooMoney; use YooKassa\Model\PaymentMethodType; -class PayoutDestinationYooMoneyTest extends AbstractPayoutDestinationTest +class PayoutDestinationYooMoneyTest extends AbstractPayoutDestinationTestCase { /** * @return PayoutDestinationYooMoney @@ -87,21 +89,21 @@ class PayoutDestinationYooMoneyTest extends AbstractPayoutDestinationTest /** * @dataProvider invalidAccountNumberDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidAccountNumber($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setAccountNumber($value); } /** * @dataProvider invalidAccountNumberDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidAccountNumber($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->account_number = $value; } @@ -123,8 +125,8 @@ class PayoutDestinationYooMoneyTest extends AbstractPayoutDestinationTest array(null), array(Random::str(34, 50, '0123456789')), array(true), - array(new \stdClass()), - array(new \DateTime()), + array(new stdClass()), + array(new DateTime()), array(Random::str(1, 10, '0123456789')), ); } diff --git a/tests/Model/Payout/PayoutSelfEmployedTest.php b/tests/Model/Payout/PayoutSelfEmployedTest.php index 06af9064..a4ff39c1 100644 --- a/tests/Model/Payout/PayoutSelfEmployedTest.php +++ b/tests/Model/Payout/PayoutSelfEmployedTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Model\Payout; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\Payout\PayoutSelfEmployed; use YooKassa\Model\SelfEmployed\SelfEmployedInterface; @@ -67,22 +68,22 @@ class PayoutSelfEmployedTest extends TestCase /** * @dataProvider invalidIdDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidId($value) { + $this->expectException('InvalidArgumentException'); $instance = new PayoutSelfEmployed(); $instance->setId($value); } /** * @dataProvider invalidIdDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidId($value) { + $this->expectException('InvalidArgumentException'); $instance = new PayoutSelfEmployed(); $instance->id = $value; } @@ -92,7 +93,7 @@ class PayoutSelfEmployedTest extends TestCase return array( array(false), array(true), - array(new \stdClass()), + array(new stdClass()), array(array()), array(Random::str(1, 35)), array(Random::str(51, 60)), diff --git a/tests/Model/PayoutTest.php b/tests/Model/PayoutTest.php index 52231458..0a023994 100644 --- a/tests/Model/PayoutTest.php +++ b/tests/Model/PayoutTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Model; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\CurrencyCode; use YooKassa\Model\Metadata; @@ -66,22 +67,22 @@ class PayoutTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidId($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payout(); $instance->setId($value['id']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidId($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payout(); $instance->id = $value['id']; } @@ -109,22 +110,22 @@ class PayoutTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidStatus($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payout(); $instance->setStatus($value['status']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidStatus($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payout(); $instance->status = $value['status']; } @@ -152,22 +153,22 @@ class PayoutTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidAmount($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payout(); $instance->setAmount($value['amount']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidAmount($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payout(); $instance->amount = $value['amount']; } @@ -195,44 +196,44 @@ class PayoutTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidPayoutDestination($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payout(); $instance->setPayoutDestination($value['payout_destination']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidPayoutDestination($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payout(); $instance->payout_destination = $value['payout_destination']; } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidCancellationDetails($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payout(); $instance->setCancellationDetails($value['cancellation_details']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidCancellationDetails($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payout(); $instance->payout_destination = $value['cancellation_details']; } @@ -269,33 +270,33 @@ class PayoutTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidCreatedAt($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payout(); $instance->setCreatedAt($value['created_at']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidCreatedAt($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payout(); $instance->createdAt = $value['created_at']; } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidCreated_at($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payout(); $instance->created_at = $value['created_at']; } @@ -323,22 +324,22 @@ class PayoutTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidTest($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payout(); $instance->setTest($value['test']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidTest($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payout(); $instance->test = $value['test']; } @@ -370,22 +371,22 @@ class PayoutTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidDeal($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payout(); $instance->setDeal($value['deal']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidDeal($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payout(); $instance->deal = $value['deal']; } @@ -421,22 +422,22 @@ class PayoutTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidSelfEmployed($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payout(); $instance->setSelfEmployed($value['self_employed']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidSelfEmployed($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payout(); $instance->self_employed = $value['self_employed']; @@ -471,22 +472,22 @@ class PayoutTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidReceipt($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payout(); $instance->setReceipt($value['receipt']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidReceipt($value) { + $this->expectException('InvalidArgumentException'); $instance = new Payout(); $instance->receipt = $value['receipt']; } @@ -508,19 +509,19 @@ class PayoutTest extends TestCase } /** - * @expectedException \InvalidArgumentException */ public function testSetInvalidTypeDescription() { + $this->expectException('InvalidArgumentException'); $instance = new Payout(); $instance->setDescription(true); } /** - * @expectedException \InvalidArgumentException */ public function testSetInvalidLengthDescription() { + $this->expectException('InvalidArgumentException'); $instance = new Payout(); $description = Random::str(Payout::MAX_LENGTH_DESCRIPTION + 1); $instance->setDescription($description); @@ -615,7 +616,7 @@ class PayoutTest extends TestCase 'status' => Random::value(PayoutStatus::getValidValues()), 'amount' => new MonetaryAmount(Random::int(1, 10000), 'RUB'), 'description' => Random::str(1, Payout::MAX_LENGTH_DESCRIPTION), - 'payout_destination' => $payoutDestinations[Random::value(array(PaymentMethodType::YOO_MONEY,PaymentMethodType::BANK_CARD))], + 'payout_destination' => $payoutDestinations[Random::value(array(PaymentMethodType::YOO_MONEY, PaymentMethodType::BANK_CARD))], 'created_at' => date(YOOKASSA_DATE, mt_rand(111111111, time())), 'test' => true, 'deal' => null, @@ -639,9 +640,9 @@ class PayoutTest extends TestCase 'test' => true, 'deal' => array('id' => Random::str(36, 50)), 'receipt' => array( - 'service_name' => Random::str(1, IncomeReceipt::MAX_LENGTH_SERVICE_NAME), - 'npd_receipt_id' => Random::str(1, 50), - 'url' => Random::str(1, 50), + 'service_name' => Random::str(1, IncomeReceipt::MAX_LENGTH_SERVICE_NAME), + 'npd_receipt_id' => Random::str(1, 50), + 'url' => Random::str(1, 50), 'amount' => array( 'value' => number_format(Random::float(1, 99), 2, '.', ''), 'currency' => Random::value(CurrencyCode::getValidValues()) @@ -660,15 +661,15 @@ class PayoutTest extends TestCase 'amount' => new MonetaryAmount(Random::int(1, 10000), 'RUB'), 'description' => ($i == 0 ? null : ($i == 1 ? '' : ($i == 2 ? Random::str(Payout::MAX_LENGTH_DESCRIPTION) : Random::str(1, Payout::MAX_LENGTH_DESCRIPTION)))), - 'payout_destination' => $payoutDestinations[Random::value(array(PaymentMethodType::YOO_MONEY,PaymentMethodType::BANK_CARD))], + 'payout_destination' => $payoutDestinations[Random::value(array(PaymentMethodType::YOO_MONEY, PaymentMethodType::BANK_CARD))], 'created_at' => date(YOOKASSA_DATE, mt_rand(1, time())), 'test' => (bool)($i % 2), 'deal' => new PayoutDealInfo(array('id' => Random::str(36, 50))), 'self_employed' => new PayoutSelfEmployed(array('id' => Random::str(36, 50))), 'receipt' => new IncomeReceipt(array( - 'service_name' => Random::str(1, IncomeReceipt::MAX_LENGTH_SERVICE_NAME), - 'npd_receipt_id' => Random::str(1, 50), - 'url' => Random::str(1, 50), + 'service_name' => Random::str(1, IncomeReceipt::MAX_LENGTH_SERVICE_NAME), + 'npd_receipt_id' => Random::str(1, 50), + 'url' => Random::str(1, 50), 'amount' => array( 'value' => number_format(Random::float(1, 99), 2, '.', ''), 'currency' => Random::value(CurrencyCode::getValidValues()) @@ -708,14 +709,14 @@ class PayoutTest extends TestCase 'id' => '', 'status' => '', 'amount' => '', - 'payout_destination' => new \stdClass(), + 'payout_destination' => new stdClass(), 'test' => '', 'deal' => new Metadata(), - 'self_employed' => new \stdClass(), + 'self_employed' => new stdClass(), 'receipt' => new Metadata(), - 'metadata' => new \stdClass(), + 'metadata' => new stdClass(), 'created_at' => array(), - 'cancellation_details' => new \stdClass(), + 'cancellation_details' => new stdClass(), ), ), ); @@ -723,14 +724,14 @@ class PayoutTest extends TestCase $payment = array( 'id' => Random::str($i < 5 ? mt_rand(1, 35) : mt_rand(51, 64)), 'status' => Random::str(1, 35), - 'amount' => $i % 2 ? array() : new \stdClass(), - 'payout_destination' => $i % 2 ? Random::str(10) : new \stdClass(), - 'test' => $i == 0 ? array() : new \stdClass(), - 'deal' => $i == 0 ? Random::str(10) : new \stdClass(), - 'self_employed' => $i == 0 ? Random::str(10) : new \stdClass(), - 'receipt' => $i == 0 ? Random::str(10) : new \stdClass(), - 'metadata' => $i == 0 ? Random::str(10) : new \stdClass(), - 'cancellation_details' => $i == 0 ? Random::str(10) : new \stdClass(), + 'amount' => $i % 2 ? array() : new stdClass(), + 'payout_destination' => $i % 2 ? Random::str(10) : new stdClass(), + 'test' => $i == 0 ? array() : new stdClass(), + 'deal' => $i == 0 ? Random::str(10) : new stdClass(), + 'self_employed' => $i == 0 ? Random::str(10) : new stdClass(), + 'receipt' => $i == 0 ? Random::str(10) : new stdClass(), + 'metadata' => $i == 0 ? Random::str(10) : new stdClass(), + 'cancellation_details' => $i == 0 ? Random::str(10) : new stdClass(), 'created_at' => $i == 0 ? '23423-234-32' : -Random::int(), ); $result[] = array($payment); diff --git a/tests/Model/PersonalData/PersonalDataCancellationDetailsTest.php b/tests/Model/PersonalData/PersonalDataCancellationDetailsTest.php index 671ecd63..3f72695b 100644 --- a/tests/Model/PersonalData/PersonalDataCancellationDetailsTest.php +++ b/tests/Model/PersonalData/PersonalDataCancellationDetailsTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Model\PersonalData; +use Exception; use PHPUnit\Framework\TestCase; use YooKassa\Model\PersonalData\PersonalDataCancellationDetails; use YooKassa\Model\PersonalData\PersonalDataCancellationDetailsPartyCode; @@ -97,7 +98,7 @@ class PersonalDataCancellationDetailsTest extends TestCase $instance = self::getInstance(); try { $instance->setParty($value); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } @@ -112,7 +113,7 @@ class PersonalDataCancellationDetailsTest extends TestCase $instance = self::getInstance(); try { $instance->reason = $value; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } @@ -122,15 +123,15 @@ class PersonalDataCancellationDetailsTest extends TestCase */ public function validDataProvider() { - $result = array(); - $cancellationDetailsParties = PersonalDataCancellationDetailsPartyCode::getValidValues(); + $result = array(); + $cancellationDetailsParties = PersonalDataCancellationDetailsPartyCode::getValidValues(); $countCancellationDetailsParties = count($cancellationDetailsParties); - $cancellationDetailsReasons = PersonalDataCancellationDetailsReasonCode::getValidValues(); + $cancellationDetailsReasons = PersonalDataCancellationDetailsReasonCode::getValidValues(); $countCancellationDetailsReasons = count($cancellationDetailsReasons); for ($i = 0; $i < 20; $i++) { $result[] = array( array( - 'party' => $cancellationDetailsParties[$i % $countCancellationDetailsParties], + 'party' => $cancellationDetailsParties[$i % $countCancellationDetailsParties], 'reason' => $cancellationDetailsReasons[$i % $countCancellationDetailsReasons] ) ); @@ -160,7 +161,7 @@ class PersonalDataCancellationDetailsTest extends TestCase { $instance = new PersonalDataCancellationDetails($value); $expected = array( - 'party' => $value['party'], + 'party' => $value['party'], 'reason' => $value['reason'], ); self::assertEquals($expected, $instance->jsonSerialize()); diff --git a/tests/Model/PersonalData/PersonalDataTest.php b/tests/Model/PersonalData/PersonalDataTest.php index f67d618a..288c62ad 100644 --- a/tests/Model/PersonalData/PersonalDataTest.php +++ b/tests/Model/PersonalData/PersonalDataTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Model\PersonalData; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\Metadata; use YooKassa\Model\PersonalData\PersonalData; @@ -60,22 +61,22 @@ class PersonalDataTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidId($value) { + $this->expectException('InvalidArgumentException'); $instance = new PersonalData(); $instance->setId($value['id']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidId($value) { + $this->expectException('InvalidArgumentException'); $instance = new PersonalData(); $instance->id = $value['id']; } @@ -103,22 +104,22 @@ class PersonalDataTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidStatus($value) { + $this->expectException('InvalidArgumentException'); $instance = new PersonalData(); $instance->setStatus($value['status']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidStatus($value) { + $this->expectException('InvalidArgumentException'); $instance = new PersonalData(); $instance->status = $value['status']; } @@ -147,10 +148,10 @@ class PersonalDataTest extends TestCase /** * @dataProvider invalidDataProvider * @param $value - * @expectedException \InvalidArgumentException */ public function testSetInvalidType($value) { + $this->expectException('InvalidArgumentException'); $instance = new PersonalData(); $instance->setType($value['type']); } @@ -158,10 +159,10 @@ class PersonalDataTest extends TestCase /** * @dataProvider invalidDataProvider * @param $value - * @expectedException \InvalidArgumentException */ public function testSetterInvalidType($value) { + $this->expectException('InvalidArgumentException'); $instance = new PersonalData(); $instance->type = $value['type']; } @@ -198,33 +199,33 @@ class PersonalDataTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidCreatedAt($value) { + $this->expectException('InvalidArgumentException'); $instance = new PersonalData(); $instance->setCreatedAt($value['created_at']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidCreatedAt($value) { + $this->expectException('InvalidArgumentException'); $instance = new PersonalData(); $instance->createdAt = $value['created_at']; } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidCreated_at($value) { + $this->expectException('InvalidArgumentException'); $instance = new PersonalData(); $instance->created_at = $value['created_at']; } @@ -267,33 +268,33 @@ class PersonalDataTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidExpiresAt($value) { + $this->expectException('InvalidArgumentException'); $instance = new PersonalData(); $instance->setExpiresAt($value['expires_at']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidExpiresAt($value) { + $this->expectException('InvalidArgumentException'); $instance = new PersonalData(); $instance->expiresAt = $value['expires_at']; } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidExpires_at($value) { + $this->expectException('InvalidArgumentException'); $instance = new PersonalData(); $instance->expires_at = $value['expires_at']; } @@ -330,11 +331,11 @@ class PersonalDataTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidCancellationDetails($value) { + $this->expectException('InvalidArgumentException'); $instance = new PersonalData(); $instance->cancellation_details = $value['cancellation_details']; } @@ -373,11 +374,11 @@ class PersonalDataTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidMetadata($value) { + $this->expectException('InvalidArgumentException'); $instance = new PersonalData(); $instance->metadata = $value['metadata']; } @@ -456,15 +457,15 @@ class PersonalDataTest extends TestCase 'status' => '', 'created_at' => array(), 'expires_at' => array(), - 'cancellation_details' => new \stdClass(), - 'metadata' => new \stdClass(), + 'cancellation_details' => new stdClass(), + 'metadata' => new stdClass(), ), ), ); for ($i = 0; $i < 10; $i++) { $personalData = array( 'id' => Random::str($i < 5 ? mt_rand(1, 35) : mt_rand(51, 64)), - 'type' => $i % 2 ? Random::str(10) : new \stdClass(), + 'type' => $i % 2 ? Random::str(10) : new stdClass(), 'status' => Random::str(1, 35), 'created_at' => $i === 0 ? '23423-234-32' : -Random::int(), 'expires_at' => $i === 0 ? '23423-234-32' : -Random::int(), diff --git a/tests/Model/Receipt/AdditionalUserPropsTest.php b/tests/Model/Receipt/AdditionalUserPropsTest.php index 14ef12fc..f8813fab 100644 --- a/tests/Model/Receipt/AdditionalUserPropsTest.php +++ b/tests/Model/Receipt/AdditionalUserPropsTest.php @@ -25,6 +25,8 @@ namespace Tests\YooKassa\Model\Receipt; +use Exception; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\Receipt\AdditionalUserProps; use PHPUnit\Framework\TestCase; @@ -86,7 +88,7 @@ class AdditionalUserPropsTest extends TestCase $instance = self::getInstance(); try { $instance->setValue($value); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } @@ -101,7 +103,7 @@ class AdditionalUserPropsTest extends TestCase $instance = self::getInstance(); try { $instance->value = $value; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } @@ -131,7 +133,7 @@ class AdditionalUserPropsTest extends TestCase $instance = self::getInstance(); try { $instance->setName($name); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } @@ -146,7 +148,7 @@ class AdditionalUserPropsTest extends TestCase $instance = self::getInstance(); try { $instance->name = $name; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } @@ -167,18 +169,18 @@ class AdditionalUserPropsTest extends TestCase { $exceptionNamespace = 'YooKassa\\Common\\Exceptions\\'; return array( - array(null, $exceptionNamespace . 'EmptyPropertyValueException'), - array('', $exceptionNamespace . 'EmptyPropertyValueException'), - array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(null, $exceptionNamespace . 'EmptyPropertyValueException'), + array('', $exceptionNamespace . 'EmptyPropertyValueException'), + array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(fopen(__FILE__, 'r'), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(Random::str(AdditionalUserProps::VALUE_MAX_LENGTH + 1), $exceptionNamespace . 'InvalidPropertyValueException'), - array(-1, $exceptionNamespace . 'InvalidPropertyValueException'), - array(-0.01, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0.0, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), - array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(-1, $exceptionNamespace . 'InvalidPropertyValueException'), + array(-0.01, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0.0, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), + array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), ); } @@ -186,18 +188,18 @@ class AdditionalUserPropsTest extends TestCase { $exceptionNamespace = 'YooKassa\\Common\\Exceptions\\'; return array( - array(null, $exceptionNamespace . 'EmptyPropertyValueException'), - array('', $exceptionNamespace . 'EmptyPropertyValueException'), - array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(null, $exceptionNamespace . 'EmptyPropertyValueException'), + array('', $exceptionNamespace . 'EmptyPropertyValueException'), + array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(fopen(__FILE__, 'r'), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(Random::str(AdditionalUserProps::NAME_MAX_LENGTH + 1), $exceptionNamespace . 'InvalidPropertyValueException'), - array('III', $exceptionNamespace . 'InvalidPropertyValueException'), - array(-0.01, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(0.0, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(0, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(0.01, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array('III', $exceptionNamespace . 'InvalidPropertyValueException'), + array(-0.01, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(0.0, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(0, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(0.01, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), ); } @@ -209,7 +211,7 @@ class AdditionalUserPropsTest extends TestCase array(1.00, true), array(0.99, false), array(0.99, array()), - array(0.99, new \stdClass()), + array(0.99, new stdClass()), array(0.99, 'test'), array(0.99, -1.0), array(0.99, -0.99), diff --git a/tests/Model/Receipt/IndustryDetailsTest.php b/tests/Model/Receipt/IndustryDetailsTest.php index da68a05e..667b9c75 100644 --- a/tests/Model/Receipt/IndustryDetailsTest.php +++ b/tests/Model/Receipt/IndustryDetailsTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Model\Receipt; +use Exception; use YooKassa\Helpers\Random; use YooKassa\Model\Receipt\IndustryDetails; use PHPUnit\Framework\TestCase; @@ -90,7 +91,7 @@ class IndustryDetailsTest extends TestCase $instance = self::getInstance(); try { $instance->setValue($value); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -105,7 +106,7 @@ class IndustryDetailsTest extends TestCase $instance = self::getInstance(); try { $instance->value = $value; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -135,7 +136,7 @@ class IndustryDetailsTest extends TestCase $instance = self::getInstance(); try { $instance->setDocumentNumber($document_number); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -150,7 +151,7 @@ class IndustryDetailsTest extends TestCase $instance = self::getInstance(); try { $instance->document_number = $document_number; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -180,7 +181,7 @@ class IndustryDetailsTest extends TestCase $instance = self::getInstance(); try { $instance->setFederalId($federal_id); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassFederalId, $e); } } @@ -195,7 +196,7 @@ class IndustryDetailsTest extends TestCase $instance = self::getInstance(); try { $instance->federal_id = $federal_id; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassFederalId, $e); } } @@ -225,7 +226,7 @@ class IndustryDetailsTest extends TestCase $instance = self::getInstance(); try { $instance->setDocumentDate($document_date); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentDate, $e); } } @@ -240,7 +241,7 @@ class IndustryDetailsTest extends TestCase $instance = self::getInstance(); try { $instance->document_date = $document_date; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentDate, $e); } } @@ -263,18 +264,18 @@ class IndustryDetailsTest extends TestCase { $exceptionValueNamespace = 'YooKassa\\Common\\Exceptions\\'; return array( - array(null, $exceptionValueNamespace . 'EmptyPropertyValueException'), - array('', $exceptionValueNamespace . 'EmptyPropertyValueException'), - array(array(), $exceptionValueNamespace . 'InvalidPropertyValueTypeException'), + array(null, $exceptionValueNamespace . 'EmptyPropertyValueException'), + array('', $exceptionValueNamespace . 'EmptyPropertyValueException'), + array(array(), $exceptionValueNamespace . 'InvalidPropertyValueTypeException'), array(fopen(__FILE__, 'r'), $exceptionValueNamespace . 'InvalidPropertyValueTypeException'), array(Random::str(IndustryDetails::VALUE_MAX_LENGTH + 1), $exceptionValueNamespace . 'InvalidPropertyValueException'), - array(-1, $exceptionValueNamespace . 'InvalidPropertyValueException'), - array(-0.01, $exceptionValueNamespace . 'InvalidPropertyValueException'), - array(0.0, $exceptionValueNamespace . 'InvalidPropertyValueException'), - array(0, $exceptionValueNamespace . 'InvalidPropertyValueException'), - array(0.001, $exceptionValueNamespace . 'InvalidPropertyValueException'), - array(true, $exceptionValueNamespace . 'InvalidPropertyValueTypeException'), - array(false, $exceptionValueNamespace . 'InvalidPropertyValueTypeException'), + array(-1, $exceptionValueNamespace . 'InvalidPropertyValueException'), + array(-0.01, $exceptionValueNamespace . 'InvalidPropertyValueException'), + array(0.0, $exceptionValueNamespace . 'InvalidPropertyValueException'), + array(0, $exceptionValueNamespace . 'InvalidPropertyValueException'), + array(0.001, $exceptionValueNamespace . 'InvalidPropertyValueException'), + array(true, $exceptionValueNamespace . 'InvalidPropertyValueTypeException'), + array(false, $exceptionValueNamespace . 'InvalidPropertyValueTypeException'), ); } @@ -282,18 +283,18 @@ class IndustryDetailsTest extends TestCase { $exceptionDocumentNumberNamespace = 'YooKassa\\Common\\Exceptions\\'; return array( - array(null, $exceptionDocumentNumberNamespace . 'EmptyPropertyValueException'), - array('', $exceptionDocumentNumberNamespace . 'EmptyPropertyValueException'), - array(array(), $exceptionDocumentNumberNamespace . 'InvalidPropertyValueTypeException'), + array(null, $exceptionDocumentNumberNamespace . 'EmptyPropertyValueException'), + array('', $exceptionDocumentNumberNamespace . 'EmptyPropertyValueException'), + array(array(), $exceptionDocumentNumberNamespace . 'InvalidPropertyValueTypeException'), array(fopen(__FILE__, 'r'), $exceptionDocumentNumberNamespace . 'InvalidPropertyValueTypeException'), array(Random::str(IndustryDetails::DOCUMENT_NUMBER_MAX_LENGTH + 1), $exceptionDocumentNumberNamespace . 'InvalidPropertyValueException'), - array('III', $exceptionDocumentNumberNamespace . 'InvalidPropertyValueException'), - array(-0.01, $exceptionDocumentNumberNamespace . 'InvalidPropertyValueTypeException'), - array(0.0, $exceptionDocumentNumberNamespace . 'InvalidPropertyValueTypeException'), - array(0, $exceptionDocumentNumberNamespace . 'InvalidPropertyValueTypeException'), - array(0.01, $exceptionDocumentNumberNamespace . 'InvalidPropertyValueTypeException'), - array(true, $exceptionDocumentNumberNamespace . 'InvalidPropertyValueTypeException'), - array(false, $exceptionDocumentNumberNamespace . 'InvalidPropertyValueTypeException'), + array('III', $exceptionDocumentNumberNamespace . 'InvalidPropertyValueException'), + array(-0.01, $exceptionDocumentNumberNamespace . 'InvalidPropertyValueTypeException'), + array(0.0, $exceptionDocumentNumberNamespace . 'InvalidPropertyValueTypeException'), + array(0, $exceptionDocumentNumberNamespace . 'InvalidPropertyValueTypeException'), + array(0.01, $exceptionDocumentNumberNamespace . 'InvalidPropertyValueTypeException'), + array(true, $exceptionDocumentNumberNamespace . 'InvalidPropertyValueTypeException'), + array(false, $exceptionDocumentNumberNamespace . 'InvalidPropertyValueTypeException'), ); } @@ -301,18 +302,18 @@ class IndustryDetailsTest extends TestCase { $exceptionFederalIdNamespace = 'YooKassa\\Common\\Exceptions\\'; return array( - array(null, $exceptionFederalIdNamespace . 'EmptyPropertyValueException'), - array('', $exceptionFederalIdNamespace . 'EmptyPropertyValueException'), - array(array(), $exceptionFederalIdNamespace . 'InvalidPropertyValueTypeException'), + array(null, $exceptionFederalIdNamespace . 'EmptyPropertyValueException'), + array('', $exceptionFederalIdNamespace . 'EmptyPropertyValueException'), + array(array(), $exceptionFederalIdNamespace . 'InvalidPropertyValueTypeException'), array(fopen(__FILE__, 'r'), $exceptionFederalIdNamespace . 'InvalidPropertyValueTypeException'), array(Random::str(IndustryDetails::DOCUMENT_NUMBER_MAX_LENGTH + 1), $exceptionFederalIdNamespace . 'InvalidPropertyValueException'), - array('III', $exceptionFederalIdNamespace . 'InvalidPropertyValueException'), - array(-0.01, $exceptionFederalIdNamespace . 'InvalidPropertyValueTypeException'), - array(0.0, $exceptionFederalIdNamespace . 'InvalidPropertyValueTypeException'), - array(0, $exceptionFederalIdNamespace . 'InvalidPropertyValueTypeException'), - array(0.01, $exceptionFederalIdNamespace . 'InvalidPropertyValueTypeException'), - array(true, $exceptionFederalIdNamespace . 'InvalidPropertyValueTypeException'), - array(false, $exceptionFederalIdNamespace . 'InvalidPropertyValueTypeException'), + array('III', $exceptionFederalIdNamespace . 'InvalidPropertyValueException'), + array(-0.01, $exceptionFederalIdNamespace . 'InvalidPropertyValueTypeException'), + array(0.0, $exceptionFederalIdNamespace . 'InvalidPropertyValueTypeException'), + array(0, $exceptionFederalIdNamespace . 'InvalidPropertyValueTypeException'), + array(0.01, $exceptionFederalIdNamespace . 'InvalidPropertyValueTypeException'), + array(true, $exceptionFederalIdNamespace . 'InvalidPropertyValueTypeException'), + array(false, $exceptionFederalIdNamespace . 'InvalidPropertyValueTypeException'), ); } @@ -320,18 +321,18 @@ class IndustryDetailsTest extends TestCase { $exceptionDocumentDateNamespace = 'YooKassa\\Common\\Exceptions\\'; return array( - array(null, $exceptionDocumentDateNamespace . 'EmptyPropertyValueException'), - array('', $exceptionDocumentDateNamespace . 'EmptyPropertyValueException'), - array(array(), $exceptionDocumentDateNamespace . 'InvalidPropertyValueTypeException'), + array(null, $exceptionDocumentDateNamespace . 'EmptyPropertyValueException'), + array('', $exceptionDocumentDateNamespace . 'EmptyPropertyValueException'), + array(array(), $exceptionDocumentDateNamespace . 'InvalidPropertyValueTypeException'), array(fopen(__FILE__, 'r'), $exceptionDocumentDateNamespace . 'InvalidPropertyValueTypeException'), array(Random::str(IndustryDetails::DOCUMENT_NUMBER_MAX_LENGTH + 1), $exceptionDocumentDateNamespace . 'InvalidPropertyValueException'), - array('III', $exceptionDocumentDateNamespace . 'InvalidPropertyValueException'), - array(-0.01, $exceptionDocumentDateNamespace . 'InvalidPropertyValueTypeException'), - array(0.0, $exceptionDocumentDateNamespace . 'InvalidPropertyValueTypeException'), - array(0, $exceptionDocumentDateNamespace . 'InvalidPropertyValueTypeException'), - array(0.01, $exceptionDocumentDateNamespace . 'InvalidPropertyValueTypeException'), - array(true, $exceptionDocumentDateNamespace . 'InvalidPropertyValueTypeException'), - array(false, $exceptionDocumentDateNamespace . 'InvalidPropertyValueTypeException'), + array('III', $exceptionDocumentDateNamespace . 'InvalidPropertyValueException'), + array(-0.01, $exceptionDocumentDateNamespace . 'InvalidPropertyValueTypeException'), + array(0.0, $exceptionDocumentDateNamespace . 'InvalidPropertyValueTypeException'), + array(0, $exceptionDocumentDateNamespace . 'InvalidPropertyValueTypeException'), + array(0.01, $exceptionDocumentDateNamespace . 'InvalidPropertyValueTypeException'), + array(true, $exceptionDocumentDateNamespace . 'InvalidPropertyValueTypeException'), + array(false, $exceptionDocumentDateNamespace . 'InvalidPropertyValueTypeException'), ); } diff --git a/tests/Model/Receipt/MarkCodeInfoTest.php b/tests/Model/Receipt/MarkCodeInfoTest.php index ce30d83a..577b20c4 100644 --- a/tests/Model/Receipt/MarkCodeInfoTest.php +++ b/tests/Model/Receipt/MarkCodeInfoTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Model\Receipt; +use Exception; use YooKassa\Helpers\Random; use YooKassa\Model\Receipt\MarkCodeInfo; use PHPUnit\Framework\TestCase; @@ -86,7 +87,7 @@ class MarkCodeInfoTest extends TestCase $instance = self::getInstance(); try { $instance->setMarkCodeRaw($value); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -101,7 +102,7 @@ class MarkCodeInfoTest extends TestCase $instance = self::getInstance(); try { $instance->mark_code_raw = $value; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -110,18 +111,18 @@ class MarkCodeInfoTest extends TestCase { $exceptionNamespace = 'YooKassa\\Common\\Exceptions\\'; return array( - array(null, $exceptionNamespace . 'EmptyPropertyValueException'), - array('', $exceptionNamespace . 'EmptyPropertyValueException'), - array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(null, $exceptionNamespace . 'EmptyPropertyValueException'), + array('', $exceptionNamespace . 'EmptyPropertyValueException'), + array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(fopen(__FILE__, 'r'), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(Random::int(-100, MarkCodeInfo::MIN_LENGTH - 1), $exceptionNamespace . 'InvalidPropertyValueException'), - array(-1, $exceptionNamespace . 'InvalidPropertyValueException'), - array(-0.01, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0.0, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), - array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(-1, $exceptionNamespace . 'InvalidPropertyValueException'), + array(-0.01, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0.0, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), + array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), ); } @@ -157,7 +158,7 @@ class MarkCodeInfoTest extends TestCase $instance = self::getInstance(); try { $instance->setUnknown($value); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -172,7 +173,7 @@ class MarkCodeInfoTest extends TestCase $instance = self::getInstance(); try { $instance->unknown = $value; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -181,18 +182,18 @@ class MarkCodeInfoTest extends TestCase { $exceptionNamespace = 'YooKassa\\Common\\Exceptions\\'; return array( - array(null, $exceptionNamespace . 'EmptyPropertyValueException'), - array('', $exceptionNamespace . 'EmptyPropertyValueException'), - array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(null, $exceptionNamespace . 'EmptyPropertyValueException'), + array('', $exceptionNamespace . 'EmptyPropertyValueException'), + array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(fopen(__FILE__, 'r'), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(Random::str(MarkCodeInfo::MAX_UNKNOWN_LENGTH + 1), $exceptionNamespace . 'InvalidPropertyValueException'), - array(-1, $exceptionNamespace . 'InvalidPropertyValueException'), - array(-0.01, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0.0, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), - array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(-1, $exceptionNamespace . 'InvalidPropertyValueException'), + array(-0.01, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0.0, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), + array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), ); } @@ -228,7 +229,7 @@ class MarkCodeInfoTest extends TestCase $instance = self::getInstance(); try { $instance->setEan8($value); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -243,7 +244,7 @@ class MarkCodeInfoTest extends TestCase $instance = self::getInstance(); try { $instance->ean_8 = $value; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -252,18 +253,18 @@ class MarkCodeInfoTest extends TestCase { $exceptionNamespace = 'YooKassa\\Common\\Exceptions\\'; return array( - array(null, $exceptionNamespace . 'EmptyPropertyValueException'), - array('', $exceptionNamespace . 'EmptyPropertyValueException'), - array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(null, $exceptionNamespace . 'EmptyPropertyValueException'), + array('', $exceptionNamespace . 'EmptyPropertyValueException'), + array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(fopen(__FILE__, 'r'), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(Random::str(MarkCodeInfo::MAX_EAN_8_LENGTH + 1), $exceptionNamespace . 'InvalidPropertyValueException'), - array(-1, $exceptionNamespace . 'InvalidPropertyValueException'), - array(-0.01, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0.0, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), - array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(-1, $exceptionNamespace . 'InvalidPropertyValueException'), + array(-0.01, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0.0, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), + array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), ); } @@ -299,7 +300,7 @@ class MarkCodeInfoTest extends TestCase $instance = self::getInstance(); try { $instance->setEan13($value); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -314,7 +315,7 @@ class MarkCodeInfoTest extends TestCase $instance = self::getInstance(); try { $instance->ean_13 = $value; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -323,18 +324,18 @@ class MarkCodeInfoTest extends TestCase { $exceptionNamespace = 'YooKassa\\Common\\Exceptions\\'; return array( - array(null, $exceptionNamespace . 'EmptyPropertyValueException'), - array('', $exceptionNamespace . 'EmptyPropertyValueException'), - array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(null, $exceptionNamespace . 'EmptyPropertyValueException'), + array('', $exceptionNamespace . 'EmptyPropertyValueException'), + array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(fopen(__FILE__, 'r'), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(Random::str(MarkCodeInfo::MAX_EAN_13_LENGTH + 1), $exceptionNamespace . 'InvalidPropertyValueException'), - array(-1, $exceptionNamespace . 'InvalidPropertyValueException'), - array(-0.01, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0.0, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), - array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(-1, $exceptionNamespace . 'InvalidPropertyValueException'), + array(-0.01, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0.0, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), + array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), ); } @@ -370,7 +371,7 @@ class MarkCodeInfoTest extends TestCase $instance = self::getInstance(); try { $instance->setItf14($value); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -385,7 +386,7 @@ class MarkCodeInfoTest extends TestCase $instance = self::getInstance(); try { $instance->itf_14 = $value; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -394,18 +395,18 @@ class MarkCodeInfoTest extends TestCase { $exceptionNamespace = 'YooKassa\\Common\\Exceptions\\'; return array( - array(null, $exceptionNamespace . 'EmptyPropertyValueException'), - array('', $exceptionNamespace . 'EmptyPropertyValueException'), - array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(null, $exceptionNamespace . 'EmptyPropertyValueException'), + array('', $exceptionNamespace . 'EmptyPropertyValueException'), + array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(fopen(__FILE__, 'r'), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(Random::str(MarkCodeInfo::MAX_ITF_14_LENGTH + 1), $exceptionNamespace . 'InvalidPropertyValueException'), - array(-1, $exceptionNamespace . 'InvalidPropertyValueException'), - array(-0.01, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0.0, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), - array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(-1, $exceptionNamespace . 'InvalidPropertyValueException'), + array(-0.01, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0.0, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), + array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), ); } @@ -441,7 +442,7 @@ class MarkCodeInfoTest extends TestCase $instance = self::getInstance(); try { $instance->setGs10($value); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -456,7 +457,7 @@ class MarkCodeInfoTest extends TestCase $instance = self::getInstance(); try { $instance->gs_10 = $value; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -465,18 +466,18 @@ class MarkCodeInfoTest extends TestCase { $exceptionNamespace = 'YooKassa\\Common\\Exceptions\\'; return array( - array(null, $exceptionNamespace . 'EmptyPropertyValueException'), - array('', $exceptionNamespace . 'EmptyPropertyValueException'), - array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(null, $exceptionNamespace . 'EmptyPropertyValueException'), + array('', $exceptionNamespace . 'EmptyPropertyValueException'), + array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(fopen(__FILE__, 'r'), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(Random::str(MarkCodeInfo::MAX_GS_10_LENGTH + 1), $exceptionNamespace . 'InvalidPropertyValueException'), - array(-1, $exceptionNamespace . 'InvalidPropertyValueException'), - array(-0.01, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0.0, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), - array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(-1, $exceptionNamespace . 'InvalidPropertyValueException'), + array(-0.01, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0.0, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), + array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), ); } @@ -512,7 +513,7 @@ class MarkCodeInfoTest extends TestCase $instance = self::getInstance(); try { $instance->setGs1m($value); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -527,7 +528,7 @@ class MarkCodeInfoTest extends TestCase $instance = self::getInstance(); try { $instance->gs_1m = $value; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -536,18 +537,18 @@ class MarkCodeInfoTest extends TestCase { $exceptionNamespace = 'YooKassa\\Common\\Exceptions\\'; return array( - array(null, $exceptionNamespace . 'EmptyPropertyValueException'), - array('', $exceptionNamespace . 'EmptyPropertyValueException'), - array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(null, $exceptionNamespace . 'EmptyPropertyValueException'), + array('', $exceptionNamespace . 'EmptyPropertyValueException'), + array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(fopen(__FILE__, 'r'), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(Random::str(MarkCodeInfo::MAX_GS_1M_LENGTH + 1), $exceptionNamespace . 'InvalidPropertyValueException'), - array(-1, $exceptionNamespace . 'InvalidPropertyValueException'), - array(-0.01, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0.0, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), - array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(-1, $exceptionNamespace . 'InvalidPropertyValueException'), + array(-0.01, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0.0, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), + array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), ); } @@ -583,7 +584,7 @@ class MarkCodeInfoTest extends TestCase $instance = self::getInstance(); try { $instance->setShort($value); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -598,7 +599,7 @@ class MarkCodeInfoTest extends TestCase $instance = self::getInstance(); try { $instance->short = $value; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -607,18 +608,18 @@ class MarkCodeInfoTest extends TestCase { $exceptionNamespace = 'YooKassa\\Common\\Exceptions\\'; return array( - array(null, $exceptionNamespace . 'EmptyPropertyValueException'), - array('', $exceptionNamespace . 'EmptyPropertyValueException'), - array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(null, $exceptionNamespace . 'EmptyPropertyValueException'), + array('', $exceptionNamespace . 'EmptyPropertyValueException'), + array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(fopen(__FILE__, 'r'), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(Random::str(MarkCodeInfo::MAX_SHORT_LENGTH + 1), $exceptionNamespace . 'InvalidPropertyValueException'), - array(-1, $exceptionNamespace . 'InvalidPropertyValueException'), - array(-0.01, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0.0, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), - array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(-1, $exceptionNamespace . 'InvalidPropertyValueException'), + array(-0.01, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0.0, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), + array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), ); } @@ -654,7 +655,7 @@ class MarkCodeInfoTest extends TestCase $instance = self::getInstance(); try { $instance->setFur($value); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -669,7 +670,7 @@ class MarkCodeInfoTest extends TestCase $instance = self::getInstance(); try { $instance->fur = $value; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -678,18 +679,18 @@ class MarkCodeInfoTest extends TestCase { $exceptionNamespace = 'YooKassa\\Common\\Exceptions\\'; return array( - array(null, $exceptionNamespace . 'EmptyPropertyValueException'), - array('', $exceptionNamespace . 'EmptyPropertyValueException'), - array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(null, $exceptionNamespace . 'EmptyPropertyValueException'), + array('', $exceptionNamespace . 'EmptyPropertyValueException'), + array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(fopen(__FILE__, 'r'), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(Random::str(MarkCodeInfo::MAX_FUR_LENGTH + 1), $exceptionNamespace . 'InvalidPropertyValueException'), - array(-1, $exceptionNamespace . 'InvalidPropertyValueException'), - array(-0.01, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0.0, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), - array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(-1, $exceptionNamespace . 'InvalidPropertyValueException'), + array(-0.01, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0.0, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), + array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), ); } @@ -725,7 +726,7 @@ class MarkCodeInfoTest extends TestCase $instance = self::getInstance(); try { $instance->setEgais20($value); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -740,7 +741,7 @@ class MarkCodeInfoTest extends TestCase $instance = self::getInstance(); try { $instance->egais_20 = $value; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -749,18 +750,18 @@ class MarkCodeInfoTest extends TestCase { $exceptionNamespace = 'YooKassa\\Common\\Exceptions\\'; return array( - array(null, $exceptionNamespace . 'EmptyPropertyValueException'), - array('', $exceptionNamespace . 'EmptyPropertyValueException'), - array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(null, $exceptionNamespace . 'EmptyPropertyValueException'), + array('', $exceptionNamespace . 'EmptyPropertyValueException'), + array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(fopen(__FILE__, 'r'), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(Random::str(MarkCodeInfo::MAX_EGAIS_20_LENGTH + 1), $exceptionNamespace . 'InvalidPropertyValueException'), - array(-1, $exceptionNamespace . 'InvalidPropertyValueException'), - array(-0.01, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0.0, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), - array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(-1, $exceptionNamespace . 'InvalidPropertyValueException'), + array(-0.01, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0.0, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), + array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), ); } @@ -796,7 +797,7 @@ class MarkCodeInfoTest extends TestCase $instance = self::getInstance(); try { $instance->setEgais30($value); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -811,7 +812,7 @@ class MarkCodeInfoTest extends TestCase $instance = self::getInstance(); try { $instance->egais_30 = $value; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -820,18 +821,18 @@ class MarkCodeInfoTest extends TestCase { $exceptionNamespace = 'YooKassa\\Common\\Exceptions\\'; return array( - array(null, $exceptionNamespace . 'EmptyPropertyValueException'), - array('', $exceptionNamespace . 'EmptyPropertyValueException'), - array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(null, $exceptionNamespace . 'EmptyPropertyValueException'), + array('', $exceptionNamespace . 'EmptyPropertyValueException'), + array(array(), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(fopen(__FILE__, 'r'), $exceptionNamespace . 'InvalidPropertyValueTypeException'), array(Random::str(MarkCodeInfo::MAX_EGAIS_30_LENGTH + 1), $exceptionNamespace . 'InvalidPropertyValueException'), - array(-1, $exceptionNamespace . 'InvalidPropertyValueException'), - array(-0.01, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0.0, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0, $exceptionNamespace . 'InvalidPropertyValueException'), - array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), - array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), - array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(-1, $exceptionNamespace . 'InvalidPropertyValueException'), + array(-0.01, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0.0, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0, $exceptionNamespace . 'InvalidPropertyValueException'), + array(0.001, $exceptionNamespace . 'InvalidPropertyValueException'), + array(true, $exceptionNamespace . 'InvalidPropertyValueTypeException'), + array(false, $exceptionNamespace . 'InvalidPropertyValueTypeException'), ); } diff --git a/tests/Model/Receipt/MarkQuantityTest.php b/tests/Model/Receipt/MarkQuantityTest.php index 4e6d7810..2bed3cd5 100644 --- a/tests/Model/Receipt/MarkQuantityTest.php +++ b/tests/Model/Receipt/MarkQuantityTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Model\Receipt; +use Exception; use YooKassa\Helpers\Random; use YooKassa\Model\Receipt\MarkQuantity; use PHPUnit\Framework\TestCase; @@ -86,7 +87,7 @@ class MarkQuantityTest extends TestCase $instance = self::getInstance(); try { $instance->setDenominator($denominator); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -101,7 +102,7 @@ class MarkQuantityTest extends TestCase $instance = self::getInstance(); try { $instance->denominator = $denominator; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -131,7 +132,7 @@ class MarkQuantityTest extends TestCase $instance = self::getInstance(); try { $instance->setNumerator($numerator); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassNumerator, $e); } } @@ -146,7 +147,7 @@ class MarkQuantityTest extends TestCase $instance = self::getInstance(); try { $instance->numerator = $numerator; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassNumerator, $e); } } @@ -167,18 +168,18 @@ class MarkQuantityTest extends TestCase { $exceptionDenominatorNamespace = 'YooKassa\\Common\\Exceptions\\'; return array( - array(null, $exceptionDenominatorNamespace . 'EmptyPropertyValueException'), - array('', $exceptionDenominatorNamespace . 'EmptyPropertyValueException'), - array(array(), $exceptionDenominatorNamespace . 'InvalidPropertyValueTypeException'), + array(null, $exceptionDenominatorNamespace . 'EmptyPropertyValueException'), + array('', $exceptionDenominatorNamespace . 'EmptyPropertyValueException'), + array(array(), $exceptionDenominatorNamespace . 'InvalidPropertyValueTypeException'), array(fopen(__FILE__, 'r'), $exceptionDenominatorNamespace . 'InvalidPropertyValueTypeException'), array(Random::int(-100, MarkQuantity::MIN_VALUE - 1), $exceptionDenominatorNamespace . 'InvalidPropertyValueException'), - array(-1, $exceptionDenominatorNamespace . 'InvalidPropertyValueException'), - array(-0.01, $exceptionDenominatorNamespace . 'InvalidPropertyValueException'), - array(0.0, $exceptionDenominatorNamespace . 'InvalidPropertyValueException'), - array(0, $exceptionDenominatorNamespace . 'InvalidPropertyValueException'), - array(0.001, $exceptionDenominatorNamespace . 'InvalidPropertyValueException'), - array(true, $exceptionDenominatorNamespace . 'InvalidPropertyValueTypeException'), - array(false, $exceptionDenominatorNamespace . 'InvalidPropertyValueTypeException'), + array(-1, $exceptionDenominatorNamespace . 'InvalidPropertyValueException'), + array(-0.01, $exceptionDenominatorNamespace . 'InvalidPropertyValueException'), + array(0.0, $exceptionDenominatorNamespace . 'InvalidPropertyValueException'), + array(0, $exceptionDenominatorNamespace . 'InvalidPropertyValueException'), + array(0.001, $exceptionDenominatorNamespace . 'InvalidPropertyValueException'), + array(true, $exceptionDenominatorNamespace . 'InvalidPropertyValueTypeException'), + array(false, $exceptionDenominatorNamespace . 'InvalidPropertyValueTypeException'), ); } @@ -186,18 +187,18 @@ class MarkQuantityTest extends TestCase { $exceptionNumeratorNamespace = 'YooKassa\\Common\\Exceptions\\'; return array( - array(null, $exceptionNumeratorNamespace . 'EmptyPropertyValueException'), - array('', $exceptionNumeratorNamespace . 'EmptyPropertyValueException'), - array(array(), $exceptionNumeratorNamespace . 'InvalidPropertyValueTypeException'), + array(null, $exceptionNumeratorNamespace . 'EmptyPropertyValueException'), + array('', $exceptionNumeratorNamespace . 'EmptyPropertyValueException'), + array(array(), $exceptionNumeratorNamespace . 'InvalidPropertyValueTypeException'), array(fopen(__FILE__, 'r'), $exceptionNumeratorNamespace . 'InvalidPropertyValueTypeException'), array(Random::int(-100, MarkQuantity::MIN_VALUE - 1), $exceptionNumeratorNamespace . 'InvalidPropertyValueException'), - array('III', $exceptionNumeratorNamespace . 'InvalidPropertyValueTypeException'), - array(-0.01, $exceptionNumeratorNamespace . 'InvalidPropertyValueException'), - array(0.0, $exceptionNumeratorNamespace . 'InvalidPropertyValueException'), - array(0, $exceptionNumeratorNamespace . 'InvalidPropertyValueException'), - array(0.01, $exceptionNumeratorNamespace . 'InvalidPropertyValueException'), - array(true, $exceptionNumeratorNamespace . 'InvalidPropertyValueTypeException'), - array(false, $exceptionNumeratorNamespace . 'InvalidPropertyValueTypeException'), + array('III', $exceptionNumeratorNamespace . 'InvalidPropertyValueTypeException'), + array(-0.01, $exceptionNumeratorNamespace . 'InvalidPropertyValueException'), + array(0.0, $exceptionNumeratorNamespace . 'InvalidPropertyValueException'), + array(0, $exceptionNumeratorNamespace . 'InvalidPropertyValueException'), + array(0.01, $exceptionNumeratorNamespace . 'InvalidPropertyValueException'), + array(true, $exceptionNumeratorNamespace . 'InvalidPropertyValueTypeException'), + array(false, $exceptionNumeratorNamespace . 'InvalidPropertyValueTypeException'), ); } diff --git a/tests/Model/Receipt/OperationalDetailsTest.php b/tests/Model/Receipt/OperationalDetailsTest.php index d025f65e..397445ee 100644 --- a/tests/Model/Receipt/OperationalDetailsTest.php +++ b/tests/Model/Receipt/OperationalDetailsTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Model\Receipt; +use Exception; use YooKassa\Helpers\Random; use YooKassa\Model\Receipt\OperationalDetails; use PHPUnit\Framework\TestCase; @@ -88,7 +89,7 @@ class OperationalDetailsTest extends TestCase $instance = self::getInstance(); try { $instance->setValue($value); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -103,7 +104,7 @@ class OperationalDetailsTest extends TestCase $instance = self::getInstance(); try { $instance->value = $value; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassDocumentNumber, $e); } } @@ -133,7 +134,7 @@ class OperationalDetailsTest extends TestCase $instance = self::getInstance(); try { $instance->setOperationId($operation_id); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassOperationId, $e); } } @@ -148,7 +149,7 @@ class OperationalDetailsTest extends TestCase $instance = self::getInstance(); try { $instance->operation_id = $operation_id; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassOperationId, $e); } } @@ -178,7 +179,7 @@ class OperationalDetailsTest extends TestCase $instance = self::getInstance(); try { $instance->setCreatedAt($created_at); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassCreatedAt, $e); } } @@ -193,7 +194,7 @@ class OperationalDetailsTest extends TestCase $instance = self::getInstance(); try { $instance->created_at = $created_at; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassCreatedAt, $e); } } @@ -215,18 +216,18 @@ class OperationalDetailsTest extends TestCase { $exceptionValueNamespace = 'YooKassa\\Common\\Exceptions\\'; return array( - array(null, $exceptionValueNamespace . 'EmptyPropertyValueException'), - array('', $exceptionValueNamespace . 'EmptyPropertyValueException'), - array(array(), $exceptionValueNamespace . 'InvalidPropertyValueTypeException'), + array(null, $exceptionValueNamespace . 'EmptyPropertyValueException'), + array('', $exceptionValueNamespace . 'EmptyPropertyValueException'), + array(array(), $exceptionValueNamespace . 'InvalidPropertyValueTypeException'), array(fopen(__FILE__, 'r'), $exceptionValueNamespace . 'InvalidPropertyValueTypeException'), array(Random::str(OperationalDetails::VALUE_MAX_LENGTH + 1), $exceptionValueNamespace . 'InvalidPropertyValueException'), - array(-1, $exceptionValueNamespace . 'InvalidPropertyValueException'), - array(-0.01, $exceptionValueNamespace . 'InvalidPropertyValueException'), - array(0.0, $exceptionValueNamespace . 'InvalidPropertyValueException'), - array(0, $exceptionValueNamespace . 'InvalidPropertyValueException'), - array(0.001, $exceptionValueNamespace . 'InvalidPropertyValueException'), - array(true, $exceptionValueNamespace . 'InvalidPropertyValueTypeException'), - array(false, $exceptionValueNamespace . 'InvalidPropertyValueTypeException'), + array(-1, $exceptionValueNamespace . 'InvalidPropertyValueException'), + array(-0.01, $exceptionValueNamespace . 'InvalidPropertyValueException'), + array(0.0, $exceptionValueNamespace . 'InvalidPropertyValueException'), + array(0, $exceptionValueNamespace . 'InvalidPropertyValueException'), + array(0.001, $exceptionValueNamespace . 'InvalidPropertyValueException'), + array(true, $exceptionValueNamespace . 'InvalidPropertyValueTypeException'), + array(false, $exceptionValueNamespace . 'InvalidPropertyValueTypeException'), ); } @@ -234,18 +235,18 @@ class OperationalDetailsTest extends TestCase { $exceptionOperationIdNamespace = 'YooKassa\\Common\\Exceptions\\'; return array( - array(null, $exceptionOperationIdNamespace . 'EmptyPropertyValueException'), - array('', $exceptionOperationIdNamespace . 'EmptyPropertyValueException'), - array(array(), $exceptionOperationIdNamespace . 'InvalidPropertyValueTypeException'), + array(null, $exceptionOperationIdNamespace . 'EmptyPropertyValueException'), + array('', $exceptionOperationIdNamespace . 'EmptyPropertyValueException'), + array(array(), $exceptionOperationIdNamespace . 'InvalidPropertyValueTypeException'), array(fopen(__FILE__, 'r'), $exceptionOperationIdNamespace . 'InvalidPropertyValueTypeException'), array(Random::str(OperationalDetails::OPERATION_ID_MAX_LENGTH + 1), $exceptionOperationIdNamespace . 'InvalidPropertyValueException'), - array('III', $exceptionOperationIdNamespace . 'InvalidPropertyValueException'), - array(-0.01, $exceptionOperationIdNamespace . 'InvalidPropertyValueTypeException'), - array(0.0, $exceptionOperationIdNamespace . 'InvalidPropertyValueTypeException'), - array(0, $exceptionOperationIdNamespace . 'InvalidPropertyValueTypeException'), - array(0.01, $exceptionOperationIdNamespace . 'InvalidPropertyValueTypeException'), - array(true, $exceptionOperationIdNamespace . 'InvalidPropertyValueTypeException'), - array(false, $exceptionOperationIdNamespace . 'InvalidPropertyValueTypeException'), + array('III', $exceptionOperationIdNamespace . 'InvalidPropertyValueException'), + array(-0.01, $exceptionOperationIdNamespace . 'InvalidPropertyValueTypeException'), + array(0.0, $exceptionOperationIdNamespace . 'InvalidPropertyValueTypeException'), + array(0, $exceptionOperationIdNamespace . 'InvalidPropertyValueTypeException'), + array(0.01, $exceptionOperationIdNamespace . 'InvalidPropertyValueTypeException'), + array(true, $exceptionOperationIdNamespace . 'InvalidPropertyValueTypeException'), + array(false, $exceptionOperationIdNamespace . 'InvalidPropertyValueTypeException'), ); } @@ -253,18 +254,18 @@ class OperationalDetailsTest extends TestCase { $exceptionCreatedAtNamespace = 'YooKassa\\Common\\Exceptions\\'; return array( - array(null, $exceptionCreatedAtNamespace . 'EmptyPropertyValueException'), - array('', $exceptionCreatedAtNamespace . 'EmptyPropertyValueException'), - array(array(), $exceptionCreatedAtNamespace . 'InvalidPropertyValueTypeException'), + array(null, $exceptionCreatedAtNamespace . 'EmptyPropertyValueException'), + array('', $exceptionCreatedAtNamespace . 'EmptyPropertyValueException'), + array(array(), $exceptionCreatedAtNamespace . 'InvalidPropertyValueTypeException'), array(fopen(__FILE__, 'r'), $exceptionCreatedAtNamespace . 'InvalidPropertyValueTypeException'), array(Random::str(1, 20), $exceptionCreatedAtNamespace . 'InvalidPropertyValueException'), - array('III', $exceptionCreatedAtNamespace . 'InvalidPropertyValueException'), - array(-0.01, $exceptionCreatedAtNamespace . 'InvalidPropertyValueTypeException'), - array(0.0, $exceptionCreatedAtNamespace . 'InvalidPropertyValueTypeException'), - array(0, $exceptionCreatedAtNamespace . 'InvalidPropertyValueTypeException'), - array(0.01, $exceptionCreatedAtNamespace . 'InvalidPropertyValueTypeException'), - array(true, $exceptionCreatedAtNamespace . 'InvalidPropertyValueTypeException'), - array(false, $exceptionCreatedAtNamespace . 'InvalidPropertyValueTypeException'), + array('III', $exceptionCreatedAtNamespace . 'InvalidPropertyValueException'), + array(-0.01, $exceptionCreatedAtNamespace . 'InvalidPropertyValueTypeException'), + array(0.0, $exceptionCreatedAtNamespace . 'InvalidPropertyValueTypeException'), + array(0, $exceptionCreatedAtNamespace . 'InvalidPropertyValueTypeException'), + array(0.01, $exceptionCreatedAtNamespace . 'InvalidPropertyValueTypeException'), + array(true, $exceptionCreatedAtNamespace . 'InvalidPropertyValueTypeException'), + array(false, $exceptionCreatedAtNamespace . 'InvalidPropertyValueTypeException'), ); } diff --git a/tests/Model/ReceiptCustomerTest.php b/tests/Model/ReceiptCustomerTest.php index d8df4ca9..0f300af0 100644 --- a/tests/Model/ReceiptCustomerTest.php +++ b/tests/Model/ReceiptCustomerTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Model; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\Receipt; use YooKassa\Model\ReceiptCustomer; @@ -44,8 +45,8 @@ class ReceiptCustomerTest extends TestCase self::assertNull($instance->phone); $value = !empty($options['customer']['phone']) - ? $options['customer']['phone'] - : (!empty($options['phone']) ? $options['phone'] : null); + ? $options['customer']['phone'] + : (!empty($options['phone']) ? $options['phone'] : null); $instance->setPhone($value); if ($value === null || $value === '') { @@ -69,8 +70,8 @@ class ReceiptCustomerTest extends TestCase self::assertNull($instance->phone); $value = !empty($options['customer']['phone']) - ? $options['customer']['phone'] - : (!empty($options['phone']) ? $options['phone'] : null); + ? $options['customer']['phone'] + : (!empty($options['phone']) ? $options['phone'] : null); $instance->phone = $value; if ($value === null || $value === '') { @@ -84,11 +85,11 @@ class ReceiptCustomerTest extends TestCase /** * @dataProvider invalidPhoneProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidPhone($value) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptCustomer(); $instance->setPhone($value); } @@ -96,7 +97,7 @@ class ReceiptCustomerTest extends TestCase public function invalidPhoneProvider() { return array( - array(new \stdClass()), + array(new stdClass()), array(array()), array(true), array(false), @@ -115,8 +116,8 @@ class ReceiptCustomerTest extends TestCase self::assertNull($instance->email); $value = !empty($options['customer']['email']) - ? $options['customer']['email'] - : (!empty($options['email']) ? $options['email'] : null); + ? $options['customer']['email'] + : (!empty($options['email']) ? $options['email'] : null); $instance->setEmail($value); if ($value === null || $value === '') { @@ -140,8 +141,8 @@ class ReceiptCustomerTest extends TestCase self::assertNull($instance->email); $value = !empty($options['customer']['email']) - ? $options['customer']['email'] - : (!empty($options['email']) ? $options['email'] : null); + ? $options['customer']['email'] + : (!empty($options['email']) ? $options['email'] : null); $instance->email = $value; if ($value === null || $value === '') { @@ -238,11 +239,11 @@ class ReceiptCustomerTest extends TestCase /** * @dataProvider invalidFullNameProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidFullName($value) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptCustomer(); $instance->setFullName($value); } @@ -250,7 +251,7 @@ class ReceiptCustomerTest extends TestCase public function invalidFullNameProvider() { return array( - array(new \stdClass()), + array(new stdClass()), array(array()), array(true), array(false), @@ -314,11 +315,11 @@ class ReceiptCustomerTest extends TestCase /** * @dataProvider invalidInnProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidInn($value) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptCustomer(); $instance->setInn($value); } @@ -327,7 +328,7 @@ class ReceiptCustomerTest extends TestCase public function invalidInnProvider() { return array( - array(new \stdClass()), + array(new stdClass()), array(array()), array(true), array(false), @@ -368,7 +369,7 @@ class ReceiptCustomerTest extends TestCase array( 'customer' => array( 'full_name' => Random::str(1, 256), - 'inn' => Random::str(12, 12, '1234567890'), + 'inn' => Random::str(12, 12, '1234567890'), ), 'phone' => Random::str(10, 10, '1234567890'), 'email' => uniqid() . '@' . uniqid(), @@ -380,7 +381,7 @@ class ReceiptCustomerTest extends TestCase 'full_name' => Random::str(1, 256), 'phone' => Random::str(10, 10, '1234567890'), 'email' => uniqid() . '@' . uniqid(), - 'inn' => Random::str(10, 10, '1234567890'), + 'inn' => Random::str(10, 10, '1234567890'), ), ), ), diff --git a/tests/Model/ReceiptItemTest.php b/tests/Model/ReceiptItemTest.php index c7bf50f6..127a4cee 100644 --- a/tests/Model/ReceiptItemTest.php +++ b/tests/Model/ReceiptItemTest.php @@ -25,7 +25,9 @@ namespace Tests\YooKassa\Model; +use Exception; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\ProductCode; use YooKassa\Helpers\Random; use YooKassa\Helpers\StringObject; @@ -71,7 +73,7 @@ class ReceiptItemTest extends TestCase */ public function testSetterDescription($value) { - $instance = $this->getTestInstance(); + $instance = $this->getTestInstance(); $instance->description = $value; self::assertEquals((string)$value, $instance->getDescription()); self::assertEquals((string)$value, $instance->description); @@ -91,23 +93,23 @@ class ReceiptItemTest extends TestCase /** * @dataProvider invalidDescriptionDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidDescription($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setDescription($value); } /** * @dataProvider invalidDescriptionDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetterInvalidDescription($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->description = $value; } @@ -119,7 +121,7 @@ class ReceiptItemTest extends TestCase array(new StringObject('')), array(true), array(false), - array(new \stdClass()), + array(new stdClass()), array(array()), ); } @@ -169,23 +171,23 @@ class ReceiptItemTest extends TestCase /** * @dataProvider invalidQuantityDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidQuantity($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setQuantity($value); } /** * @dataProvider invalidQuantityDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetterInvalidQuantity($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->quantity = $value; } @@ -197,7 +199,7 @@ class ReceiptItemTest extends TestCase array(0.0), array(Random::float(-100, -0.001)), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } @@ -277,7 +279,7 @@ class ReceiptItemTest extends TestCase */ public function testSetInvalidAgentType($value, $exception) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\' . $exception); + self::expectException('YooKassa\\Common\\Exceptions\\' . $exception); $this->getTestInstance()->setAgentType($value); } @@ -289,7 +291,7 @@ class ReceiptItemTest extends TestCase */ public function testSetterInvalidAgentType($value, $exception) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\' . $exception); + self::expectException('YooKassa\\Common\\Exceptions\\' . $exception); $this->getTestInstance()->agent_type = $value; } @@ -299,7 +301,7 @@ class ReceiptItemTest extends TestCase array(1, 'InvalidPropertyValueTypeException'), array(Random::str(10), 'InvalidPropertyValueException'), array(true, 'InvalidPropertyValueTypeException'), - array(new \stdClass(), 'InvalidPropertyValueTypeException'), + array(new stdClass(), 'InvalidPropertyValueTypeException'), ); } @@ -327,7 +329,7 @@ class ReceiptItemTest extends TestCase */ public function testSetInvalidSupplier($value, $exception) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\' . $exception); + self::expectException('YooKassa\\Common\\Exceptions\\' . $exception); $this->getTestInstance()->setSupplier($value); } @@ -339,7 +341,7 @@ class ReceiptItemTest extends TestCase */ public function testSetterInvalidSupplier($value, $exception) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\' . $exception); + self::expectException('YooKassa\\Common\\Exceptions\\' . $exception); $this->getTestInstance()->supplier = $value; } @@ -349,13 +351,13 @@ class ReceiptItemTest extends TestCase array(1, 'InvalidPropertyValueTypeException'), array(Random::str(10), 'InvalidPropertyValueTypeException'), array(true, 'InvalidPropertyValueTypeException'), - array(new \stdClass(), 'InvalidPropertyValueTypeException'), + array(new stdClass(), 'InvalidPropertyValueTypeException'), ); } /** * @return array[] - * @throws \Exception + * @throws Exception */ public function validDataSupplier() { @@ -383,6 +385,7 @@ class ReceiptItemTest extends TestCase } return $validData; } + /** * @dataProvider validVatCodeDataProvider * @@ -544,34 +547,34 @@ class ReceiptItemTest extends TestCase /** * @dataProvider invalidPaymentModeDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidPaymentMode($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setPaymentMode($value); } /** * @dataProvider invalidPaymentModeDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetterInvalidPaymentMode($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->paymentMode = $value; } /** * @dataProvider invalidPaymentModeDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetterInvalidPayment_mode($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->payment_mode = $value; } @@ -581,40 +584,40 @@ class ReceiptItemTest extends TestCase array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } /** * @dataProvider invalidPaymentSubjectDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidPaymentSubject($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setPaymentSubject($value); } /** * @dataProvider invalidPaymentSubjectDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetterInvalidPaymentSubject($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->paymentSubject = $value; } /** * @dataProvider invalidPaymentSubjectDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetterInvalidPayment_subject($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->payment_subject = $value; } @@ -624,40 +627,40 @@ class ReceiptItemTest extends TestCase array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } /** * @dataProvider invalidVatCodeDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidVatCode($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setVatCode($value); } /** * @dataProvider invalidVatCodeDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetterInvalidVatCode($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->vatCode = $value; } /** * @dataProvider invalidVatCodeDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetterInvalidVat_code($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->vat_code = $value; } @@ -667,7 +670,7 @@ class ReceiptItemTest extends TestCase array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), array(0), array(15), array(Random::int(-100, -1)), @@ -703,7 +706,7 @@ class ReceiptItemTest extends TestCase */ public function testSetterPrice($value) { - $instance = $this->getTestInstance(); + $instance = $this->getTestInstance(); $instance->price = $value; if (is_array($value)) { self::assertSame($value, $instance->getPrice()->toArray()); @@ -748,7 +751,7 @@ class ReceiptItemTest extends TestCase */ public function testSetInvalidPrice($value) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\InvalidPropertyValueTypeException'); + self::expectException('YooKassa\\Common\\Exceptions\\InvalidPropertyValueTypeException'); $this->getTestInstance()->setPrice($value); } @@ -759,7 +762,7 @@ class ReceiptItemTest extends TestCase */ public function testSetterInvalidPrice($value) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\InvalidPropertyValueTypeException'); + self::expectException('YooKassa\\Common\\Exceptions\\InvalidPropertyValueTypeException'); $this->getTestInstance()->price = $value; } @@ -772,7 +775,7 @@ class ReceiptItemTest extends TestCase array(1), array(true), array(false), - array(new \stdClass()), + array(new stdClass()), ); } @@ -828,24 +831,24 @@ class ReceiptItemTest extends TestCase } /** - * @expectedException \InvalidArgumentException * @dataProvider invalidIsShippingDataProvider * * @param mixed $value */ public function testInvalidSetIsShipping($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setIsShipping($value); } /** - * @expectedException \InvalidArgumentException * @dataProvider invalidIsShippingDataProvider * * @param mixed $value */ public function testInvalidSetterIsShipping($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->isShipping = $value; } @@ -855,7 +858,7 @@ class ReceiptItemTest extends TestCase array(array()), array('true'), array('false'), - array(new \stdClass()), + array(new stdClass()), ); } @@ -890,15 +893,15 @@ class ReceiptItemTest extends TestCase /** * @dataProvider invalidApplyDiscountCoefficientDataProvider - * @expectedException \InvalidArgumentException * * @param mixed $coefficient */ public function testInvalidApplyDiscountCoefficient($coefficient) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); - $instance->setPrice(new ReceiptItemAmount(Random::int(100))); + $instance->setPrice(new ReceiptItemAmount(Random::int(1, 100))); $instance->applyDiscountCoefficient($coefficient); } @@ -909,7 +912,7 @@ class ReceiptItemTest extends TestCase array(''), array('test'), array(array()), - array(new \stdClass()), + array(new stdClass()), array(-1.4), array(-0.01), array(-0.0001), @@ -968,13 +971,13 @@ class ReceiptItemTest extends TestCase /** * @dataProvider invalidIncreasePriceDataProvider - * @expectedException \InvalidArgumentException * * @param float $price * @param float $value */ public function testInvalidIncreasePrice($price, $value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->setPrice(new ReceiptItemAmount($price)); $instance->increasePrice($value); @@ -992,7 +995,7 @@ class ReceiptItemTest extends TestCase array(1.01, ''), array(1.01, 'test'), array(1.01, array()), - array(1.01, new \stdClass()), + array(1.01, new stdClass()), ); } @@ -1030,13 +1033,13 @@ class ReceiptItemTest extends TestCase /** * @dataProvider invalidFetchItemDataProvider - * @expectedException \InvalidArgumentException * * @param $quantity * @param $fetch */ public function testInvalidFetchItem($quantity, $fetch) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->setPrice(new ReceiptItemAmount(Random::int(1, 100))); $instance->setQuantity($quantity); @@ -1054,7 +1057,7 @@ class ReceiptItemTest extends TestCase array(1, 0.0), array(1, -12.3), array(1, array()), - array(1, new \stdClass()), + array(1, new stdClass()), array(1, 'test'), ); } @@ -1116,23 +1119,23 @@ class ReceiptItemTest extends TestCase /** * @dataProvider invalidProductCodeDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidProductCode($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setProductCode($value); } /** * @dataProvider invalidProductCodeDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetterInvalidProductCode($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->productCode = $value; } @@ -1142,7 +1145,7 @@ class ReceiptItemTest extends TestCase array(new StringObject('')), array(true), array(false), - array(new \stdClass()), + array(new stdClass()), array(array()), array(Random::str(2, 96, 'GHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_+-=`~?><:"\'')), array(Random::str(97, 100, '0123456789ABCDEF ')), @@ -1205,23 +1208,23 @@ class ReceiptItemTest extends TestCase /** * @dataProvider invalidCountryOfOriginCodeDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidCountryOfOriginCode($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCountryOfOriginCode($value); } /** * @dataProvider invalidCountryOfOriginCodeDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetterInvalidCountryOfOriginCode($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->countryOfOriginCode = $value; } @@ -1231,7 +1234,7 @@ class ReceiptItemTest extends TestCase array(new StringObject('')), array(true), array(false), - array(new \stdClass()), + array(new stdClass()), array(array()), array(Random::int()), array(Random::str(1, 1)), @@ -1298,23 +1301,23 @@ class ReceiptItemTest extends TestCase /** * @dataProvider invalidCustomsDeclarationNumberDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidCustomsDeclarationNumber($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCustomsDeclarationNumber($value); } /** * @dataProvider invalidCustomsDeclarationNumberDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetterInvalidCustomsDeclarationNumber($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->customsDeclarationNumber = $value; } @@ -1323,7 +1326,7 @@ class ReceiptItemTest extends TestCase return array( array(true), array(false), - array(new \stdClass()), + array(new stdClass()), array(array()), array(Random::str(33, 64)), ); @@ -1376,23 +1379,23 @@ class ReceiptItemTest extends TestCase /** * @dataProvider invalidExciseDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidExcise($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setExcise($value); } /** * @dataProvider invalidExciseDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetterInvalidExcise($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->excise = $value; } @@ -1402,7 +1405,7 @@ class ReceiptItemTest extends TestCase array(0.0), array(Random::float(-100, -0.001)), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } @@ -1473,7 +1476,7 @@ class ReceiptItemTest extends TestCase */ public function testSetInvalidMarkCodeInfo($value, $exception) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\' . $exception); + self::expectException('YooKassa\\Common\\Exceptions\\' . $exception); $this->getTestInstance()->setMarkCodeInfo($value); } @@ -1485,7 +1488,7 @@ class ReceiptItemTest extends TestCase */ public function testSetterInvalidMarkCodeInfo($value, $exception) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\' . $exception); + self::expectException('YooKassa\\Common\\Exceptions\\' . $exception); $this->getTestInstance()->mark_code_info = $value; } @@ -1495,7 +1498,7 @@ class ReceiptItemTest extends TestCase array(1.0, 'InvalidPropertyValueTypeException'), array(1, 'InvalidPropertyValueTypeException'), array(true, 'InvalidPropertyValueTypeException'), - array(new \stdClass(), 'InvalidPropertyValueTypeException'), + array(new stdClass(), 'InvalidPropertyValueTypeException'), ); } @@ -1572,7 +1575,7 @@ class ReceiptItemTest extends TestCase */ public function testSetInvalidMarkQuantity($value, $exception) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\' . $exception); + self::expectException('YooKassa\\Common\\Exceptions\\' . $exception); $this->getTestInstance()->setMarkQuantity($value); } @@ -1584,7 +1587,7 @@ class ReceiptItemTest extends TestCase */ public function testSetterInvalidMarkQuantity($value, $exception) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\' . $exception); + self::expectException('YooKassa\\Common\\Exceptions\\' . $exception); $this->getTestInstance()->mark_quantity = $value; } @@ -1594,7 +1597,7 @@ class ReceiptItemTest extends TestCase array(1.0, 'InvalidPropertyValueTypeException'), array(1, 'InvalidPropertyValueTypeException'), array(true, 'InvalidPropertyValueTypeException'), - array(new \stdClass(), 'InvalidPropertyValueTypeException'), + array(new stdClass(), 'InvalidPropertyValueTypeException'), ); } @@ -1673,7 +1676,7 @@ class ReceiptItemTest extends TestCase */ public function testSetInvalidPaymentSubjectIndustryDetails($value, $exception) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\' . $exception); + self::expectException('YooKassa\\Common\\Exceptions\\' . $exception); $this->getTestInstance()->setPaymentSubjectIndustryDetails($value); } @@ -1685,7 +1688,7 @@ class ReceiptItemTest extends TestCase */ public function testSetterInvalidPaymentSubjectIndustryDetails($value, $exception) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\' . $exception); + self::expectException('YooKassa\\Common\\Exceptions\\' . $exception); $this->getTestInstance()->payment_subject_industry_details = $value; } @@ -1695,8 +1698,8 @@ class ReceiptItemTest extends TestCase array(1.0, 'InvalidPropertyValueTypeException'), array(1, 'InvalidPropertyValueTypeException'), array(true, 'InvalidPropertyValueTypeException'), - array(new \stdClass(), 'InvalidPropertyValueTypeException'), - array(array(new \stdClass()), 'InvalidPropertyValueTypeException'), + array(new stdClass(), 'InvalidPropertyValueTypeException'), + array(array(new stdClass()), 'InvalidPropertyValueTypeException'), ); } @@ -1752,7 +1755,7 @@ class ReceiptItemTest extends TestCase */ public function testSetInvalidMeasure($value, $exception) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\' . $exception); + self::expectException('YooKassa\\Common\\Exceptions\\' . $exception); $this->getTestInstance()->setMeasure($value); } @@ -1764,7 +1767,7 @@ class ReceiptItemTest extends TestCase */ public function testSetterInvalidMeasure($value, $exception) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\' . $exception); + self::expectException('YooKassa\\Common\\Exceptions\\' . $exception); $this->getTestInstance()->measure = $value; } @@ -1773,7 +1776,7 @@ class ReceiptItemTest extends TestCase return array( array(array(), 'InvalidPropertyValueTypeException'), array(true, 'InvalidPropertyValueTypeException'), - array(new \stdClass(), 'InvalidPropertyValueTypeException'), + array(new stdClass(), 'InvalidPropertyValueTypeException'), array(Random::str(10), 'InvalidPropertyValueException'), ); } @@ -1827,7 +1830,7 @@ class ReceiptItemTest extends TestCase */ public function testSetInvalidMarkMode($value, $exception) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\' . $exception); + self::expectException('YooKassa\\Common\\Exceptions\\' . $exception); $this->getTestInstance()->setMarkMode($value); } @@ -1839,7 +1842,7 @@ class ReceiptItemTest extends TestCase */ public function testSetterInvalidMarkMode($value, $exception) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\' . $exception); + self::expectException('YooKassa\\Common\\Exceptions\\' . $exception); $this->getTestInstance()->mark_mode = $value; } @@ -1848,7 +1851,7 @@ class ReceiptItemTest extends TestCase return array( array(array(), 'InvalidPropertyValueTypeException'), array(true, 'InvalidPropertyValueTypeException'), - array(new \stdClass(), 'InvalidPropertyValueTypeException'), + array(new stdClass(), 'InvalidPropertyValueTypeException'), ); } @@ -1902,7 +1905,7 @@ class ReceiptItemTest extends TestCase */ public function testSetInvalidAdditionalPaymentSubjectProps($value, $exception) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\' . $exception); + self::expectException('YooKassa\\Common\\Exceptions\\' . $exception); $this->getTestInstance()->setAdditionalPaymentSubjectProps($value); } @@ -1914,7 +1917,7 @@ class ReceiptItemTest extends TestCase */ public function testSetterInvalidAdditionalPaymentSubjectProps($value, $exception) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\' . $exception); + self::expectException('YooKassa\\Common\\Exceptions\\' . $exception); $this->getTestInstance()->additionalPaymentSubjectProps = $value; } @@ -1923,7 +1926,7 @@ class ReceiptItemTest extends TestCase return array( array(array(), 'InvalidPropertyValueTypeException'), array(true, 'InvalidPropertyValueTypeException'), - array(new \stdClass(), 'InvalidPropertyValueTypeException'), + array(new stdClass(), 'InvalidPropertyValueTypeException'), ); } } diff --git a/tests/Model/ReceiptTest.php b/tests/Model/ReceiptTest.php index e519043a..304fe03a 100644 --- a/tests/Model/ReceiptTest.php +++ b/tests/Model/ReceiptTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Model; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\CurrencyCode; use YooKassa\Model\MonetaryAmount; @@ -74,11 +75,11 @@ class ReceiptTest extends TestCase /** * @dataProvider invalidItemsProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidItems($value) { + $this->expectException('InvalidArgumentException'); $instance = new Receipt(); $instance->setItems($value); } @@ -139,11 +140,11 @@ class ReceiptTest extends TestCase /** * @dataProvider invalidTaxSystemIdProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidTaxSystemCode($value) { + $this->expectException('InvalidArgumentException'); $instance = new Receipt(); $instance->setTaxSystemCode($value); } @@ -174,11 +175,11 @@ class ReceiptTest extends TestCase /** * @dataProvider invalidSettlementsDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testInvalidSetSettlements($value) { + $this->expectException('InvalidArgumentException'); $instance = new Receipt(); $instance->setSettlements($value); } @@ -188,11 +189,11 @@ class ReceiptTest extends TestCase $result = array( array( array( - 'items' => array(), + 'items' => array(), 'tax_system_code' => null, - 'customer' => array( - 'phone' => '', - 'email' => '', + 'customer' => array( + 'phone' => '', + 'email' => '', ), 'settlements' => array( array( @@ -207,11 +208,11 @@ class ReceiptTest extends TestCase ), array( array( - 'items' => array(), + 'items' => array(), 'tax_system_code' => '', - 'customer' => array( - 'phone' => '', - 'email' => '', + 'customer' => array( + 'phone' => '', + 'email' => '', ), 'settlements' => array( array( @@ -226,10 +227,10 @@ class ReceiptTest extends TestCase ), array( array( - 'items' => array(), - 'customer' => array( - 'phone' => '', - 'email' => '', + 'items' => array(), + 'customer' => array( + 'phone' => '', + 'email' => '', ), 'tax_system_code' => '', 'settlements' => array( @@ -245,10 +246,10 @@ class ReceiptTest extends TestCase ), array( array( - 'items' => array(), - 'customer' => array( - 'phone' => '', - 'email' => '', + 'items' => array(), + 'customer' => array( + 'phone' => '', + 'email' => '', ), 'tax_system_code' => '', 'settlements' => array( @@ -264,10 +265,10 @@ class ReceiptTest extends TestCase ), array( array( - 'items' => array(), - 'customer' => array( - 'phone' => '', - 'email' => '', + 'items' => array(), + 'customer' => array( + 'phone' => '', + 'email' => '', ), 'tax_system_code' => '', 'settlements' => array( @@ -284,10 +285,10 @@ class ReceiptTest extends TestCase ); for ($i = 1; $i < 6; $i++) { $receipt = array( - 'items' => array(), + 'items' => array(), 'tax_system_code' => $i, - 'phone' => Random::str(10, 10, '1234567890'), - 'email' => uniqid() . '@' . uniqid(), + 'phone' => Random::str(10, 10, '1234567890'), + 'email' => uniqid() . '@' . uniqid(), ); $result[] = array($receipt); } @@ -307,8 +308,8 @@ class ReceiptTest extends TestCase ) ) ) - ) - )); + ) + )); for ($i = 1; $i < 9; $i++) { $receipt = array( new Settlement( @@ -336,7 +337,7 @@ class ReceiptTest extends TestCase { return array( array(null), - array(new \stdClass()), + array(new stdClass()), array('invalid_value'), array(''), array(0), @@ -358,7 +359,7 @@ class ReceiptTest extends TestCase ), ), array( - array(new \stdClass()), + array(new stdClass()), ), ); } @@ -366,7 +367,7 @@ class ReceiptTest extends TestCase public function invalidTaxSystemIdProvider() { return array( - array(new \stdClass()), + array(new stdClass()), array('invalid_value'), array(0), array(3234), @@ -379,7 +380,7 @@ class ReceiptTest extends TestCase public function invalidPhoneProvider() { return array( - array(new \stdClass()), + array(new stdClass()), array(array()), array(true), array(false), diff --git a/tests/Model/RecipientTest.php b/tests/Model/RecipientTest.php index add52e2b..9be982fe 100644 --- a/tests/Model/RecipientTest.php +++ b/tests/Model/RecipientTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Model; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Helpers\StringObject; use YooKassa\Model\Recipient; @@ -64,33 +65,33 @@ class RecipientTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidAccountId($value) { + $this->expectException('InvalidArgumentException'); $instance = new Recipient(); $instance->setAccountId($value); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidAccountId($value) { + $this->expectException('InvalidArgumentException'); $instance = new Recipient(); $instance->accountId = $value; } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidAccount_id($value) { + $this->expectException('InvalidArgumentException'); $instance = new Recipient(); $instance->account_id = $value; } @@ -127,33 +128,33 @@ class RecipientTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidGatewayId($value) { + $this->expectException('InvalidArgumentException'); $instance = new Recipient(); $instance->setGatewayId($value); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidGatewayId($value) { + $this->expectException('InvalidArgumentException'); $instance = new Recipient(); $instance->gatewayId = $value; } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidGateway_id($value) { + $this->expectException('InvalidArgumentException'); $instance = new Recipient(); $instance->gateway_id = $value; } @@ -178,7 +179,7 @@ class RecipientTest extends TestCase array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } } diff --git a/tests/Model/RefundCancellationDetailsTest.php b/tests/Model/RefundCancellationDetailsTest.php index 8fab6c69..3c8ac4a9 100644 --- a/tests/Model/RefundCancellationDetailsTest.php +++ b/tests/Model/RefundCancellationDetailsTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Model; +use Exception; use PHPUnit\Framework\TestCase; use YooKassa\Model\RefundCancellationDetails; use YooKassa\Model\RefundCancellationDetailsPartyCode; @@ -100,7 +101,7 @@ class RefundCancellationDetailsTest extends TestCase $instance = self::getInstance(); try { $instance->setParty($value); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } @@ -115,7 +116,7 @@ class RefundCancellationDetailsTest extends TestCase $instance = self::getInstance(); try { $instance->reason = $value; - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } @@ -125,14 +126,14 @@ class RefundCancellationDetailsTest extends TestCase */ public function validDataProvider() { - $result = array(); - $cancellationDetailsParties = RefundCancellationDetailsPartyCode::getValidValues(); + $result = array(); + $cancellationDetailsParties = RefundCancellationDetailsPartyCode::getValidValues(); $countCancellationDetailsParties = count($cancellationDetailsParties); - $cancellationDetailsReasons = RefundCancellationDetailsReasonCode::getValidValues(); + $cancellationDetailsReasons = RefundCancellationDetailsReasonCode::getValidValues(); $countCancellationDetailsReasons = count($cancellationDetailsReasons); for ($i = 0; $i < 20; $i++) { $result[] = array( - 'party' => $cancellationDetailsParties[$i % $countCancellationDetailsParties], + 'party' => $cancellationDetailsParties[$i % $countCancellationDetailsParties], 'reason' => $cancellationDetailsReasons[$i % $countCancellationDetailsReasons] ); } @@ -162,7 +163,7 @@ class RefundCancellationDetailsTest extends TestCase { $instance = new RefundCancellationDetails($party, $reason); $expected = array( - 'party' => $party, + 'party' => $party, 'reason' => $reason, ); self::assertEquals($expected, $instance->jsonSerialize()); diff --git a/tests/Model/RefundTest.php b/tests/Model/RefundTest.php index 73d1ce58..7d2b97e2 100644 --- a/tests/Model/RefundTest.php +++ b/tests/Model/RefundTest.php @@ -25,7 +25,10 @@ namespace Tests\YooKassa\Model; +use DateTime; +use Exception; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Helpers\StringObject; use YooKassa\Model\AmountInterface; @@ -80,22 +83,22 @@ class RefundTest extends TestCase /** * @dataProvider invalidIdDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidId($value) { + $this->expectException('InvalidArgumentException'); $instance = new Refund(); $instance->setId($value); } /** * @dataProvider invalidIdDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidId($value) { + $this->expectException('InvalidArgumentException'); $instance = new Refund(); $instance->id = $value; } @@ -114,7 +117,7 @@ class RefundTest extends TestCase array(Random::str(35)), array(Random::str(37, 48)), array(Random::str(37)), - array(new \stdClass()), + array(new stdClass()), array(1), array(0), array(-1), @@ -140,17 +143,17 @@ class RefundTest extends TestCase /** * @dataProvider invalidSourcesDataProvider * @param $value - * @expectedException \InvalidArgumentException */ public function testSetInvalidSources($value) { + $this->expectException('InvalidArgumentException'); $instance = new Refund(); $instance->setSources($value); } /** * @return array[] - * @throws \Exception + * @throws Exception */ public function validSources() { @@ -205,33 +208,33 @@ class RefundTest extends TestCase /** * @dataProvider invalidIdDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidPaymentId($value) { + $this->expectException('InvalidArgumentException'); $instance = new Refund(); $instance->setPaymentId($value); } /** * @dataProvider invalidIdDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidPaymentId($value) { + $this->expectException('InvalidArgumentException'); $instance = new Refund(); $instance->paymentId = $value; } /** * @dataProvider invalidIdDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidPayment_id($value) { + $this->expectException('InvalidArgumentException'); $instance = new Refund(); $instance->payment_id = $value; } @@ -272,22 +275,22 @@ class RefundTest extends TestCase /** * @dataProvider invalidIdDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidStatus($value) { + $this->expectException('InvalidArgumentException'); $instance = new Refund(); $instance->setStatus($value); } /** * @dataProvider invalidIdDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidStatus($value) { + $this->expectException('InvalidArgumentException'); $instance = new Refund(); $instance->status = $value; } @@ -302,7 +305,7 @@ class RefundTest extends TestCase if (is_numeric($value)) { $expected = $value; - } elseif ($value instanceof \DateTime) { + } elseif ($value instanceof DateTime) { $expected = $value->getTimestamp(); } else { $expected = strtotime((string)$value); @@ -336,8 +339,8 @@ class RefundTest extends TestCase public function validCreatedAtDataProvider() { return array( - array(new \DateTime()), - array(new \DateTime(date(YOOKASSA_DATE, Random::int(1, time())))), + array(new DateTime()), + array(new DateTime(date(YOOKASSA_DATE, Random::int(1, time())))), array(time()), array(Random::int(1, time())), array(date(YOOKASSA_DATE)), @@ -349,33 +352,33 @@ class RefundTest extends TestCase /** * @dataProvider invalidCreatedAtDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidCreatedAt($value) { + $this->expectException('InvalidArgumentException'); $instance = new Refund(); $instance->setCreatedAt($value); } /** * @dataProvider invalidCreatedAtDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidCreatedAt($value) { + $this->expectException('InvalidArgumentException'); $instance = new Refund(); $instance->createdAt = $value; } /** * @dataProvider invalidCreatedAtDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidCreated_at($value) { + $this->expectException('InvalidArgumentException'); $instance = new Refund(); $instance->created_at = $value; } @@ -389,7 +392,7 @@ class RefundTest extends TestCase array(null), array(''), array(array()), - array(new \stdClass()), + array(new stdClass()), array('test'), ); } @@ -433,11 +436,11 @@ class RefundTest extends TestCase public function testSetInvalidAmount($value) { if ($value instanceof AmountInterface) { - self::setExpectedException('InvalidArgumentException'); + self::expectException('InvalidArgumentException'); $instance = new Refund(); $instance->setAmount($value); } elseif (class_exists('TypeError')) { - self::setExpectedException('TypeError'); + self::expectException('TypeError'); $instance = new Refund(); $instance->setAmount($value); } @@ -450,11 +453,11 @@ class RefundTest extends TestCase public function testSetterInvalidAmount($value) { if ($value instanceof AmountInterface) { - self::setExpectedException('InvalidArgumentException'); + self::expectException('InvalidArgumentException'); $instance = new Refund(); $instance->amount = $value; } elseif (class_exists('TypeError')) { - self::setExpectedException('TypeError'); + self::expectException('TypeError'); $instance = new Refund(); $instance->amount = $value; } @@ -473,7 +476,7 @@ class RefundTest extends TestCase array(new MonetaryAmount()), array(array()), array(1), - array(new \stdClass()), + array(new stdClass()), ); } @@ -522,33 +525,33 @@ class RefundTest extends TestCase /** * @dataProvider invalidReceiptRegisteredDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidReceiptRegistered($value) { + $this->expectException('InvalidArgumentException'); $instance = new Refund(); $instance->setReceiptRegistration($value); } /** * @dataProvider invalidReceiptRegisteredDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidReceiptRegistration($value) { + $this->expectException('InvalidArgumentException'); $instance = new Refund(); $instance->receiptRegistration = $value; } /** * @dataProvider invalidReceiptRegisteredDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidReceipt_registration($value) { + $this->expectException('InvalidArgumentException'); $instance = new Refund(); $instance->receipt_registration = $value; } @@ -564,7 +567,7 @@ class RefundTest extends TestCase array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(1, 10)), array(new StringObject(Random::str(1, 10))), ); @@ -603,22 +606,22 @@ class RefundTest extends TestCase /** * @dataProvider invalidDescriptionDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidDescription($value) { + $this->expectException('InvalidArgumentException'); $instance = new Refund(); $instance->setDescription($value); } /** * @dataProvider invalidDescriptionDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidDescription($value) { + $this->expectException('InvalidArgumentException'); $instance = new Refund(); $instance->description = $value; } @@ -631,7 +634,7 @@ class RefundTest extends TestCase array(array()), array(true), array(false), - array(new \stdClass()), + array(new stdClass()), ); } @@ -675,7 +678,7 @@ class RefundTest extends TestCase /** * @return array - * @throws \Exception + * @throws Exception */ public function validDealDataProvider() { @@ -692,7 +695,7 @@ class RefundTest extends TestCase */ public function testSetInvalidDeal($value) { - self::setExpectedException('InvalidArgumentException'); + self::expectException('InvalidArgumentException'); $instance = new Refund(); $instance->setDeal($value); } @@ -703,7 +706,7 @@ class RefundTest extends TestCase */ public function testSetterInvalidDeal($value) { - self::setExpectedException('InvalidArgumentException'); + self::expectException('InvalidArgumentException'); $instance = new Refund(); $instance->deal = $value; } @@ -718,7 +721,7 @@ class RefundTest extends TestCase array(false), array(new MonetaryAmount()), array(1), - array(new \stdClass()), + array(new stdClass()), ); } diff --git a/tests/Model/SafeDealTest.php b/tests/Model/SafeDealTest.php index 1b138d58..407e0c0e 100644 --- a/tests/Model/SafeDealTest.php +++ b/tests/Model/SafeDealTest.php @@ -25,7 +25,9 @@ namespace Tests\YooKassa\Model; +use DateTime; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\Deal\DealBalanceAmount; use YooKassa\Model\Deal\DealStatus; @@ -124,11 +126,11 @@ class SafeDealTest extends TestCase public function testSetInvalidBalance($value) { if (empty($value['balance'])) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\EmptyPropertyValueException'); + self::expectException('YooKassa\\Common\\Exceptions\\EmptyPropertyValueException'); $instance = new SafeDeal(); $instance->setBalance($value['balance']); } elseif (!is_array($value['balance']) && !($value['balance'] instanceof DealBalanceAmount)) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\InvalidPropertyValueTypeException'); + self::expectException('YooKassa\\Common\\Exceptions\\InvalidPropertyValueTypeException'); $instance = new SafeDeal(); $instance->setBalance($value['balance']); } @@ -141,11 +143,11 @@ class SafeDealTest extends TestCase public function testSetterInvalidBalance($value) { if (empty($value['balance'])) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\EmptyPropertyValueException'); + self::expectException('YooKassa\\Common\\Exceptions\\EmptyPropertyValueException'); $instance = new SafeDeal(); $instance->balance = $value['balance']; } elseif (!is_array($value['balance']) && !($value['balance'] instanceof DealBalanceAmount)) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\InvalidPropertyValueTypeException'); + self::expectException('YooKassa\\Common\\Exceptions\\InvalidPropertyValueTypeException'); $instance = new SafeDeal(); $instance->balance = $value['balance']; } @@ -188,11 +190,11 @@ class SafeDealTest extends TestCase public function testSetInvalidPayoutBalance($value) { if (empty($value['payout_balance'])) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\EmptyPropertyValueException'); + self::expectException('YooKassa\\Common\\Exceptions\\EmptyPropertyValueException'); $instance = new SafeDeal(); $instance->setPayoutBalance($value['payout_balance']); } elseif (!is_array($value['payout_balance']) && !($value['payout_balance'] instanceof DealBalanceAmount)) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\InvalidPropertyValueTypeException'); + self::expectException('YooKassa\\Common\\Exceptions\\InvalidPropertyValueTypeException'); $instance = new SafeDeal(); $instance->setPayoutBalance($value['payout_balance']); } @@ -205,11 +207,11 @@ class SafeDealTest extends TestCase public function testSetterInvalidPayoutBalance($value) { if (empty($value['payout_balance'])) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\EmptyPropertyValueException'); + self::expectException('YooKassa\\Common\\Exceptions\\EmptyPropertyValueException'); $instance = new SafeDeal(); $instance->payout_balance = $value['payout_balance']; } elseif (!is_array($value['payout_balance']) && !($value['payout_balance'] instanceof DealBalanceAmount)) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\InvalidPropertyValueTypeException'); + self::expectException('YooKassa\\Common\\Exceptions\\InvalidPropertyValueTypeException'); $instance = new SafeDeal(); $instance->payout_balance = $value['payout_balance']; } @@ -222,7 +224,7 @@ class SafeDealTest extends TestCase public function testSetInvalidMetadata($value) { if (!is_array($value) && !($value instanceof Metadata)) { - self::setExpectedException('YooKassa\\Common\\Exceptions\\InvalidPropertyValueTypeException'); + self::expectException('YooKassa\\Common\\Exceptions\\InvalidPropertyValueTypeException'); $instance = new SafeDeal(); $instance->setMetadata($value); } @@ -245,19 +247,19 @@ class SafeDealTest extends TestCase } /** - * @expectedException \InvalidArgumentException */ public function testSetInvalidTypeDescription() { + $this->expectException('InvalidArgumentException'); $instance = new SafeDeal(); $instance->setDescription(true); } /** - * @expectedException \InvalidArgumentException */ public function testSetInvalidLengthDescription() { + $this->expectException('InvalidArgumentException'); $instance = new SafeDeal(); $description = Random::str(SafeDeal::MAX_LENGTH_DESCRIPTION + 1); $instance->setDescription($description); @@ -325,33 +327,33 @@ class SafeDealTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidCreatedAt($value) { + $this->expectException('InvalidArgumentException'); $instance = new SafeDeal(); $instance->setCreatedAt($value['created_at']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidCreatedAt($value) { + $this->expectException('InvalidArgumentException'); $instance = new SafeDeal(); $instance->createdAt = $value['created_at']; } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidCreated_at($value) { + $this->expectException('InvalidArgumentException'); $instance = new SafeDeal(); $instance->created_at = $value['created_at']; } @@ -406,33 +408,33 @@ class SafeDealTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidExpiresAt($value) { + $this->expectException('InvalidArgumentException'); $instance = new SafeDeal(); $instance->setExpiresAt($value['expires_at']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidExpiresAt($value) { + $this->expectException('InvalidArgumentException'); $instance = new SafeDeal(); $instance->expiresAt = $value['expires_at']; } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidExpires_at($value) { + $this->expectException('InvalidArgumentException'); $instance = new SafeDeal(); $instance->expires_at = $value['expires_at']; } @@ -460,22 +462,22 @@ class SafeDealTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidTest($value) { + $this->expectException('InvalidArgumentException'); $instance = new SafeDeal(); $instance->setTest($value['test']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidTest($value) { + $this->expectException('InvalidArgumentException'); $instance = new SafeDeal(); $instance->test = $value['test']; } @@ -553,7 +555,7 @@ class SafeDealTest extends TestCase 'test' => null, 'created_at' => null, 'expires_at' => array(), - 'metadata' => new \stdClass(), + 'metadata' => new stdClass(), ) ), array( @@ -572,7 +574,7 @@ class SafeDealTest extends TestCase $invalidData = array( null, '', - new \stdClass(), + new stdClass(), 'invalid_value', new Metadata(), Random::str(5, 10), @@ -600,7 +602,7 @@ class SafeDealTest extends TestCase $customer->setBalance(new DealBalanceAmount(1000, 'RUB')); $customer->setPayoutBalance(new DealBalanceAmount(1000, 'RUB')); $customer->setDescription('Выплата по заказу №17'); - $customer->setCreatedAt(new \DateTime(date(YOOKASSA_DATE))); + $customer->setCreatedAt(new DateTime(date(YOOKASSA_DATE))); $customer->setExpiresAt(date(YOOKASSA_DATE)); $customer->setTest(true); $customer->setMetadata(array('order_id' => 'Заказ №17')); @@ -629,7 +631,7 @@ class SafeDealTest extends TestCase public function invalidMetaDataProvider() { return array( - array(new \stdClass()), + array(new stdClass()), array('invalid_value'), array(0), array(3234), diff --git a/tests/Model/SelfEmployed/AbstractConfirmationTest.php b/tests/Model/SelfEmployed/AbstractConfirmationTestCase.php similarity index 91% rename from tests/Model/SelfEmployed/AbstractConfirmationTest.php rename to tests/Model/SelfEmployed/AbstractConfirmationTestCase.php index 53983eac..e7ee92b8 100644 --- a/tests/Model/SelfEmployed/AbstractConfirmationTest.php +++ b/tests/Model/SelfEmployed/AbstractConfirmationTestCase.php @@ -25,11 +25,13 @@ namespace Tests\YooKassa\Model\SelfEmployed; +use Exception; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\SelfEmployed\SelfEmployedConfirmation; -abstract class AbstractConfirmationTest extends TestCase +abstract class AbstractConfirmationTestCase extends TestCase { /** * @return SelfEmployedConfirmation @@ -52,17 +54,17 @@ abstract class AbstractConfirmationTest extends TestCase /** * @dataProvider invalidTypeDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testInvalidType($value) { + $this->expectException('InvalidArgumentException'); new TestConfirmation($value); } /** * @return array - * @throws \Exception + * @throws Exception */ public function invalidTypeDataProvider() { @@ -72,7 +74,7 @@ abstract class AbstractConfirmationTest extends TestCase array(Random::str(40)), array(0), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } } diff --git a/tests/Model/SelfEmployed/ConfirmationFactoryTest.php b/tests/Model/SelfEmployed/ConfirmationFactoryTest.php index f3ede31c..8ced9115 100644 --- a/tests/Model/SelfEmployed/ConfirmationFactoryTest.php +++ b/tests/Model/SelfEmployed/ConfirmationFactoryTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Model\SelfEmployed; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\SelfEmployed\SelfEmployedConfirmation; use YooKassa\Model\SelfEmployed\SelfEmployedConfirmationFactory; @@ -56,11 +57,11 @@ class ConfirmationFactoryTest extends TestCase /** * @dataProvider invalidTypeDataProvider - * @expectedException \InvalidArgumentException * @param $type */ public function testInvalidFactory($type) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->factory($type); } @@ -94,11 +95,11 @@ class ConfirmationFactoryTest extends TestCase /** * @dataProvider invalidDataArrayDataProvider - * @expectedException \InvalidArgumentException * @param $options */ public function testInvalidFactoryFromArray($options) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->factoryFromArray($options); } @@ -122,7 +123,7 @@ class ConfirmationFactoryTest extends TestCase array(-1), array('5'), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(10)), ); } diff --git a/tests/Model/SelfEmployed/ConfirmationRedirectTest.php b/tests/Model/SelfEmployed/ConfirmationRedirectTest.php index c67d5ee4..7ecea736 100644 --- a/tests/Model/SelfEmployed/ConfirmationRedirectTest.php +++ b/tests/Model/SelfEmployed/ConfirmationRedirectTest.php @@ -25,10 +25,11 @@ namespace Tests\YooKassa\Model\SelfEmployed; +use stdClass; use YooKassa\Model\SelfEmployed\SelfEmployedConfirmationRedirect; use YooKassa\Model\SelfEmployed\SelfEmployedConfirmationType; -class ConfirmationRedirectTest extends AbstractConfirmationTest +class ConfirmationRedirectTest extends AbstractConfirmationTestCase { /** * @return SelfEmployedConfirmationRedirect @@ -99,33 +100,33 @@ class ConfirmationRedirectTest extends AbstractConfirmationTest /** * @dataProvider invalidUrlDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidConfirmationUrl($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->setConfirmationUrl($value); } /** * @dataProvider invalidUrlDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidConfirmationUrl($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->confirmationUrl = $value; } /** * @dataProvider invalidUrlDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidConfirmation_url($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->confirmation_url = $value; } @@ -158,7 +159,7 @@ class ConfirmationRedirectTest extends AbstractConfirmationTest array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } } diff --git a/tests/Model/SelfEmployed/SelfEmployedTest.php b/tests/Model/SelfEmployed/SelfEmployedTest.php index 12eba0e4..12b13ebd 100644 --- a/tests/Model/SelfEmployed/SelfEmployedTest.php +++ b/tests/Model/SelfEmployed/SelfEmployedTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Model\SelfEmployed; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\SelfEmployed\SelfEmployed; use YooKassa\Model\SelfEmployed\SelfEmployedConfirmationFactory; @@ -57,22 +58,22 @@ class SelfEmployedTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidId($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployed(); $instance->setId($value['id']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidId($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployed(); $instance->id = $value['id']; } @@ -100,22 +101,22 @@ class SelfEmployedTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidStatus($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployed(); $instance->setStatus($value['status']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidStatus($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployed(); $instance->status = $value['status']; } @@ -144,10 +145,10 @@ class SelfEmployedTest extends TestCase /** * @dataProvider invalidDataProvider * @param $value - * @expectedException \InvalidArgumentException */ public function testSetInvalidTest($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployed(); $instance->setTest($value['test']); } @@ -155,10 +156,10 @@ class SelfEmployedTest extends TestCase /** * @dataProvider invalidDataProvider * @param $value - * @expectedException \InvalidArgumentException */ public function testSetterInvalidTest($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployed(); $instance->test = $value['test']; } @@ -187,10 +188,10 @@ class SelfEmployedTest extends TestCase /** * @dataProvider invalidDataProvider * @param $value - * @expectedException \InvalidArgumentException */ public function testSetInvalidPhone($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployed(); $instance->setPhone($value['phone']); } @@ -198,10 +199,10 @@ class SelfEmployedTest extends TestCase /** * @dataProvider invalidDataProvider * @param $value - * @expectedException \InvalidArgumentException */ public function testSetterInvalidPhone($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployed(); $instance->phone = $value['phone']; } @@ -230,10 +231,10 @@ class SelfEmployedTest extends TestCase /** * @dataProvider invalidDataProvider * @param $value - * @expectedException \InvalidArgumentException */ public function testSetInvalidItn($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployed(); $instance->setItn($value['itn']); } @@ -241,10 +242,10 @@ class SelfEmployedTest extends TestCase /** * @dataProvider invalidDataProvider * @param $value - * @expectedException \InvalidArgumentException */ public function testSetterInvalidItn($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployed(); $instance->itn = $value['itn']; } @@ -281,33 +282,33 @@ class SelfEmployedTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidCreatedAt($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployed(); $instance->setCreatedAt($value['created_at']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidCreatedAt($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployed(); $instance->createdAt = $value['created_at']; } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidCreated_at($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployed(); $instance->created_at = $value['created_at']; } @@ -345,11 +346,11 @@ class SelfEmployedTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidConfirmation($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployed(); $instance->confirmation = $value['confirmation']; } @@ -366,7 +367,7 @@ class SelfEmployedTest extends TestCase 'status' => Random::value(SelfEmployedStatus::getValidValues()), 'test' => Random::bool(), 'itn' => null, - 'phone' => Random::str(11, 11,'0123456789'), + 'phone' => Random::str(11, 11, '0123456789'), 'created_at' => date(YOOKASSA_DATE, mt_rand(111111111, time())), 'confirmation' => array('type' => Random::value($confirmTypes)), ) @@ -376,7 +377,7 @@ class SelfEmployedTest extends TestCase 'id' => Random::str(36, 50), 'status' => Random::value(SelfEmployedStatus::getValidValues()), 'test' => Random::bool(), - 'itn' => Random::str(11, 11,'0123456789'), + 'itn' => Random::str(11, 11, '0123456789'), 'phone' => null, 'created_at' => date(YOOKASSA_DATE, mt_rand(1, time())), 'confirmation' => null, @@ -388,8 +389,8 @@ class SelfEmployedTest extends TestCase 'id' => Random::str(36, 50), 'status' => Random::value(SelfEmployedStatus::getValidValues()), 'test' => Random::bool(), - 'itn' => Random::str(11, 11,'0123456789'), - 'phone' => Random::str(11, 11,'0123456789'), + 'itn' => Random::str(11, 11, '0123456789'), + 'phone' => Random::str(11, 11, '0123456789'), 'created_at' => date(YOOKASSA_DATE, mt_rand(1, time())), 'confirmation' => $confirmFactory->factory(Random::value($confirmTypes)), ); @@ -406,7 +407,7 @@ class SelfEmployedTest extends TestCase 'id' => null, 'test' => null, 'status' => null, - 'itn' => new \stdClass(), + 'itn' => new stdClass(), 'phone' => array(), 'created_at' => null, 'confirmation' => array('type' => null), @@ -418,24 +419,24 @@ class SelfEmployedTest extends TestCase 'test' => 'null', 'status' => '', 'itn' => array(), - 'phone' => new \stdClass(), + 'phone' => new stdClass(), 'created_at' => array(), - 'confirmation' => new \stdClass(), + 'confirmation' => new stdClass(), ), ), ); for ($i = 0; $i < 10; $i++) { $selfEmployed = array( 'id' => Random::str($i < 5 ? mt_rand(1, 35) : mt_rand(51, 64)), - 'test' => $i % 2 ? Random::str(10) : new \stdClass(), + 'test' => $i % 2 ? Random::str(10) : new stdClass(), 'status' => Random::str(1, 35), - 'phone' => $i % 2 ? new \stdClass() : array(), - 'itn' => $i % 2 ? new \stdClass() : array(), + 'phone' => $i % 2 ? new stdClass() : array(), + 'itn' => $i % 2 ? new stdClass() : array(), 'created_at' => $i === 0 ? '23423-234-32' : -Random::int(), 'confirmation' => Random::value(array( array('type' => null), array('type' => true), - array('type' => new \stdClass()), + array('type' => new stdClass()), array('type' => array()), array('type' => 'fake'), )), diff --git a/tests/Model/SettlementTest.php b/tests/Model/SettlementTest.php index 556477f8..f88a5cc1 100644 --- a/tests/Model/SettlementTest.php +++ b/tests/Model/SettlementTest.php @@ -25,7 +25,9 @@ namespace Tests\YooKassa\Model; +use Exception; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Common\Exceptions\EmptyPropertyValueException; use YooKassa\Helpers\Random; use YooKassa\Model\AmountInterface; @@ -84,19 +86,18 @@ class SettlementTest extends TestCase /** * @dataProvider invalidTypeDataProvider * - * @expectedException \InvalidArgumentException - * @expectedException EmptyPropertyValueException * * @param $value */ public function testSetInvalidType($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setType($value); } /** * @return array - * @throws \Exception + * @throws Exception */ public function validDataProvider() { @@ -160,26 +161,24 @@ class SettlementTest extends TestCase /** * @dataProvider invalidAmountDataProvider * - * @expectedException \InvalidArgumentException - * @expectedException EmptyPropertyValueException * * @param $value */ public function testSetInvalidAmount($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setAmount($value); } /** * @dataProvider invalidAmountDataProvider * - * @expectedException \InvalidArgumentException - * @expectedException EmptyPropertyValueException * * @param $value */ public function testSetterInvalidAmount($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->amount = $value; } @@ -192,7 +191,7 @@ class SettlementTest extends TestCase array(1), array(true), array(false), - array(new \stdClass()), + array(new stdClass()), ); return $result; @@ -208,7 +207,7 @@ class SettlementTest extends TestCase array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(1, 10)), ); diff --git a/tests/Model/SourceTest.php b/tests/Model/SourceTest.php index e56eb227..78c0192c 100644 --- a/tests/Model/SourceTest.php +++ b/tests/Model/SourceTest.php @@ -25,7 +25,9 @@ namespace Tests\YooKassa\Model; +use Exception; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\AmountInterface; use YooKassa\Model\CurrencyCode; @@ -105,7 +107,7 @@ class SourceTest extends TestCase /** * @return array - * @throws \Exception + * @throws Exception */ public function validDataProvider() { @@ -129,24 +131,24 @@ class SourceTest extends TestCase /** * @dataProvider invalidAccountIdProvider * - * @expectedException \InvalidArgumentException * * @param mixed $value */ public function testGetSetInvalidAccountId($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setAccountId($value); } /** * @dataProvider invalidAccountIdProvider * - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetterInvalidAccountId($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->accountId = $value; } @@ -159,7 +161,7 @@ class SourceTest extends TestCase array(null), array(''), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } @@ -222,8 +224,8 @@ class SourceTest extends TestCase } /** - * @return \YooKassa\Model\MonetaryAmount[][] - * @throws \Exception + * @return MonetaryAmount[][] + * @throws Exception */ public function validAmountDataProvider() { @@ -243,48 +245,48 @@ class SourceTest extends TestCase /** * @dataProvider invalidAmountDataProvider * - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidAmount($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setAmount($value); } /** * @dataProvider invalidAmountDataProvider * - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetterInvalidAmount($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->amount = $value; } /** * @dataProvider invalidAmountDataProvider * - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidPlatformFeeAmount($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setPlatformFeeAmount($value); } /** * @dataProvider invalidAmountDataProvider * - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetterInvalidPlatformFeeAmount($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->platform_fee_amount = $value; } @@ -300,7 +302,7 @@ class SourceTest extends TestCase array(1), array(true), array(false), - array(new \stdClass()), + array(new stdClass()), ); } } diff --git a/tests/Model/SupplierTest.php b/tests/Model/SupplierTest.php index d58430bd..b83007ed 100644 --- a/tests/Model/SupplierTest.php +++ b/tests/Model/SupplierTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Model; +use stdClass; use YooKassa\Helpers\ProductCode; use YooKassa\Helpers\Random; use YooKassa\Model\Supplier; @@ -48,10 +49,10 @@ class SupplierTest extends TestCase /** * @dataProvider invalidInnDataTest * @param $value - * @expectedException \InvalidArgumentException */ public function testInvalidInn($value) { + $this->expectException('InvalidArgumentException'); $instance = new Supplier(); $instance->setInn($value); } @@ -72,10 +73,10 @@ class SupplierTest extends TestCase /** * @dataProvider invalidDataTest * @param $value - * @expectedException \InvalidArgumentException */ public function testInvalidName($value) { + $this->expectException('InvalidArgumentException'); $instance = new Supplier(); $instance->setName($value); } @@ -96,10 +97,10 @@ class SupplierTest extends TestCase /** * @dataProvider invalidDataTest * @param $value - * @expectedException \InvalidArgumentException */ public function testInvalidPhone($value) { + $this->expectException('InvalidArgumentException'); $instance = new Supplier(); $instance->setPhone($value); } @@ -125,8 +126,8 @@ class SupplierTest extends TestCase for ($i = 0; $i < 7; $i++) { $test = array( - 'name' => Random::str(1, 150), - 'inn' => Random::str(12, 12, '1234567890'), + 'name' => Random::str(1, 150), + 'inn' => Random::str(12, 12, '1234567890'), 'phone' => Random::str(10, 10, '1234567890'), ); @@ -139,7 +140,7 @@ class SupplierTest extends TestCase public function invalidDataTest() { return array( - array(new \stdClass()), + array(new stdClass()), array(false), array(true) ); @@ -149,7 +150,7 @@ class SupplierTest extends TestCase { return array( array('test'), - array(new \stdClass()), + array(new stdClass()), array(false), array(true) ); diff --git a/tests/Model/ThreeDSecureTest.php b/tests/Model/ThreeDSecureTest.php index 6dfb0165..7d50fc20 100644 --- a/tests/Model/ThreeDSecureTest.php +++ b/tests/Model/ThreeDSecureTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Model; +use Exception; use PHPUnit\Framework\TestCase; use YooKassa\Model\ThreeDSecure; @@ -70,7 +71,7 @@ class ThreeDSecureTest extends TestCase $instance = new ThreeDSecure(); try { $instance->setApplied($value); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } diff --git a/tests/Model/TransferTest.php b/tests/Model/TransferTest.php index 6fac1c48..fa1a914a 100644 --- a/tests/Model/TransferTest.php +++ b/tests/Model/TransferTest.php @@ -25,7 +25,9 @@ namespace Tests\YooKassa\Model; +use Exception; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\AmountInterface; use YooKassa\Model\CurrencyCode; @@ -118,25 +120,25 @@ class TransferTest extends TestCase /** * @return array - * @throws \Exception + * @throws Exception */ public function validDataProvider() { $result = array( array( - 'account_id' => '123', - 'amount' => array( - 'value' => '10.00', - 'currency' => 'RUB' - ), - 'platform_fee_amount' => array( - 'value' => '10.00', - 'currency' => 'RUB' - ), - 'status' => TransferStatus::PENDING, - 'description' => 'Заказ маркетплейса №1', - 'metadata' => null + 'account_id' => '123', + 'amount' => array( + 'value' => '10.00', + 'currency' => 'RUB' + ), + 'platform_fee_amount' => array( + 'value' => '10.00', + 'currency' => 'RUB' + ), + 'status' => TransferStatus::PENDING, + 'description' => 'Заказ маркетплейса №1', + 'metadata' => null ) ); for ($i = 0; $i < 10; $i++) { @@ -163,36 +165,36 @@ class TransferTest extends TestCase /** * @dataProvider invalidAccountIdProvider * - * @expectedException \InvalidArgumentException * * @param mixed $value */ public function testGetSetInvalidAccountId($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setAccountId($value); } /** * @dataProvider invalidAccountIdProvider * - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetterInvalidAccountId($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->accountId = $value; } /** * @dataProvider invalidMetadataProvider * - * @expectedException \InvalidArgumentException * * @param $value */ public function testInvalidMetadata($value) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->setMetadata($value); } @@ -206,7 +208,7 @@ class TransferTest extends TestCase array(null), array(''), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } @@ -269,8 +271,8 @@ class TransferTest extends TestCase } /** - * @return \YooKassa\Model\MonetaryAmount[][] - * @throws \Exception + * @return MonetaryAmount[][] + * @throws Exception */ public function validAmountDataProvider() { @@ -290,48 +292,48 @@ class TransferTest extends TestCase /** * @dataProvider invalidAmountDataProvider * - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidAmount($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setAmount($value); } /** * @dataProvider invalidAmountDataProvider * - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetterInvalidAmount($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->amount = $value; } /** * @dataProvider invalidAmountDataProvider * - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidPlatformFeeAmount($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setPlatformFeeAmount($value); } /** * @dataProvider invalidAmountDataProvider * - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetterInvalidPlatformFeeAmount($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->platform_fee_amount = $value; } @@ -347,7 +349,7 @@ class TransferTest extends TestCase array(1), array(true), array(false), - array(new \stdClass()), + array(new stdClass()), ); } @@ -394,42 +396,42 @@ class TransferTest extends TestCase /** * @dataProvider invalidStatusProvider * - * @expectedException \InvalidArgumentException * * @param mixed $value */ public function testGetSetInvalidStatus($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setStatus($value); } /** * @dataProvider invalidStatusProvider * - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetterInvalidStatus($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->status = $value; } /** - * @expectedException \InvalidArgumentException */ public function testSetInvalidTypeDescription() { + $this->expectException('InvalidArgumentException'); $instance = new Transfer(); $instance->setDescription(true); } /** - * @expectedException \InvalidArgumentException - * @throws \Exception + * @throws Exception */ public function testSetInvalidLengthDescription() { + $this->expectException('InvalidArgumentException'); $instance = new Transfer(); $description = Random::str(Transfer::MAX_LENGTH_DESCRIPTION + 1); $instance->setDescription($description); @@ -437,7 +439,7 @@ class TransferTest extends TestCase /** * @return array - * @throws \Exception + * @throws Exception */ public function invalidStatusProvider() { @@ -445,18 +447,18 @@ class TransferTest extends TestCase array(null), array(''), array(Random::str(15, 100)), - array(new \stdClass()), + array(new stdClass()), ); } /** * @return array - * @throws \Exception + * @throws Exception */ public function invalidMetadataProvider() { return array( - array(new \stdClass()), + array(new stdClass()), ); } } diff --git a/tests/Model/Webhook/WebhookTest.php b/tests/Model/Webhook/WebhookTest.php index 88ed8921..536e4b9c 100644 --- a/tests/Model/Webhook/WebhookTest.php +++ b/tests/Model/Webhook/WebhookTest.php @@ -70,23 +70,23 @@ class WebhookTest extends TestCase return array( array( array( - "id" => Random::str(20), + "id" => Random::str(20), "event" => NotificationEventType::REFUND_SUCCEEDED, - "url" => Random::str(20), + "url" => Random::str(20), ), ), array( array( - "id" => Random::str(20), + "id" => Random::str(20), "event" => NotificationEventType::PAYMENT_SUCCEEDED, - "url" => Random::str(20), + "url" => Random::str(20), ), ), array( array( - "id" => Random::str(20), + "id" => Random::str(20), "event" => NotificationEventType::PAYMENT_WAITING_FOR_CAPTURE, - "url" => Random::str(20), + "url" => Random::str(20), ), ), ); diff --git a/tests/Request/Deals/AbstractDealResponseTest.php b/tests/Request/Deals/AbstractDealResponseTestCase.php similarity index 99% rename from tests/Request/Deals/AbstractDealResponseTest.php rename to tests/Request/Deals/AbstractDealResponseTestCase.php index 4f7d10fd..c628863b 100644 --- a/tests/Request/Deals/AbstractDealResponseTest.php +++ b/tests/Request/Deals/AbstractDealResponseTestCase.php @@ -33,7 +33,7 @@ use YooKassa\Model\Deal\DealType; use YooKassa\Model\Deal\FeeMoment; use YooKassa\Request\Deals\DealResponse; -abstract class AbstractDealResponseTest extends TestCase +abstract class AbstractDealResponseTestCase extends TestCase { /** * @param $options diff --git a/tests/Request/Deals/CreateDealRequestBuilderTest.php b/tests/Request/Deals/CreateDealRequestBuilderTest.php index fdd95034..047db824 100644 --- a/tests/Request/Deals/CreateDealRequestBuilderTest.php +++ b/tests/Request/Deals/CreateDealRequestBuilderTest.php @@ -28,6 +28,7 @@ namespace Tests\YooKassa\Request\Deals; use Exception; use InvalidArgumentException; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\Deal\DealType; use YooKassa\Model\Deal\FeeMoment; @@ -80,12 +81,12 @@ class CreateDealRequestBuilderTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException InvalidArgumentException * * @param $options */ public function testSetInvalidTypeType($options) { + $this->expectException('InvalidArgumentException'); $builder = new CreateDealRequestBuilder(); $builder->setType($options); } @@ -113,12 +114,12 @@ class CreateDealRequestBuilderTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException InvalidArgumentException * * @param $options */ public function testSetInvalidTypeFeeMoment($options) { + $this->expectException('InvalidArgumentException'); $builder = new CreateDealRequestBuilder(); $builder->setFeeMoment($options); } @@ -148,12 +149,12 @@ class CreateDealRequestBuilderTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException InvalidArgumentException * * @param $options */ public function testSetInvalidTypeMetadata($options) { + $this->expectException('InvalidArgumentException'); $builder = new CreateDealRequestBuilder(); $builder->setMetadata($options); } @@ -180,22 +181,22 @@ class CreateDealRequestBuilderTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException InvalidArgumentException * * @param $options */ public function testSetInvalidTypeDescription($options) { + $this->expectException('InvalidArgumentException'); $builder = new CreateDealRequestBuilder(); $builder->setDescription($options); } /** - * @expectedException InvalidArgumentException */ public function testSetInvalidLengthDescription() { - $builder = new CreateDealRequestBuilder(); + $this->expectException('InvalidArgumentException'); + $builder = new CreateDealRequestBuilder(); $description = Random::str(SafeDeal::MAX_LENGTH_DESCRIPTION + 1); $builder->setDescription($description); } @@ -242,7 +243,7 @@ class CreateDealRequestBuilderTest extends TestCase return array( array(false), array(true), - array(new \stdClass()), + array(new stdClass()), array(new SafeDeal()), ); } diff --git a/tests/Request/Deals/CreateDealRequestSerializerTest.php b/tests/Request/Deals/CreateDealRequestSerializerTest.php index b890288a..efeb4e53 100644 --- a/tests/Request/Deals/CreateDealRequestSerializerTest.php +++ b/tests/Request/Deals/CreateDealRequestSerializerTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Request\Deals; +use Exception; use PHPUnit\Framework\TestCase; use YooKassa\Helpers\Random; use YooKassa\Model\Deal\DealType; @@ -42,8 +43,8 @@ class CreateDealRequestSerializerTest extends TestCase public function testSerialize($options) { $serializer = new CreateDealRequestSerializer(); - $instance = CreateDealRequest::builder()->build($options); - $data = $serializer->serialize($instance); + $instance = CreateDealRequest::builder()->build($options); + $data = $serializer->serialize($instance); $expected = array( 'type' => $options['type'], @@ -66,7 +67,7 @@ class CreateDealRequestSerializerTest extends TestCase /** * @return array - * @throws \Exception + * @throws Exception */ public function validDataProvider() { diff --git a/tests/Request/Deals/CreateDealRequestTest.php b/tests/Request/Deals/CreateDealRequestTest.php index ac657776..fd8f601f 100644 --- a/tests/Request/Deals/CreateDealRequestTest.php +++ b/tests/Request/Deals/CreateDealRequestTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Request\Deals; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\Deal\DealType; use YooKassa\Model\Deal\FeeMoment; @@ -178,33 +179,33 @@ class CreateDealRequestTest extends TestCase /** * @dataProvider invalidFeeMomentDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidFeeMoment($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreateDealRequest(); $instance->setFeeMoment($value); } /** * @dataProvider invalidMetadataDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidMetadata($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreateDealRequest(); $instance->setMetadata($value); } /** * @dataProvider invalidMetadataDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidType($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreateDealRequest(); $instance->setType($value); } @@ -234,7 +235,7 @@ class CreateDealRequestTest extends TestCase array(true), array(1), array(Random::str(10)), - array(new \stdClass()), + array(new stdClass()), ); } diff --git a/tests/Request/Deals/CreateDealResponseTest.php b/tests/Request/Deals/CreateDealResponseTest.php index ccbad29f..20160dcf 100644 --- a/tests/Request/Deals/CreateDealResponseTest.php +++ b/tests/Request/Deals/CreateDealResponseTest.php @@ -27,7 +27,7 @@ namespace Tests\YooKassa\Request\Deals; use YooKassa\Request\Deals\CreateDealResponse; -class CreateDealResponseTest extends AbstractDealResponseTest +class CreateDealResponseTest extends AbstractDealResponseTestCase { protected function getTestInstance($options) { diff --git a/tests/Request/Deals/DealResponseTest.php b/tests/Request/Deals/DealResponseTest.php index e69536ad..d0407565 100644 --- a/tests/Request/Deals/DealResponseTest.php +++ b/tests/Request/Deals/DealResponseTest.php @@ -27,7 +27,7 @@ namespace Tests\YooKassa\Request\Deals; use YooKassa\Request\Deals\DealResponse; -class DealResponseTest extends AbstractDealResponseTest +class DealResponseTest extends AbstractDealResponseTestCase { protected function getTestInstance($options) { diff --git a/tests/Request/Deals/DealsRequestBuilderTest.php b/tests/Request/Deals/DealsRequestBuilderTest.php index e34c69f9..8a6b5c13 100644 --- a/tests/Request/Deals/DealsRequestBuilderTest.php +++ b/tests/Request/Deals/DealsRequestBuilderTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Request\Deals; +use Exception; use PHPUnit\Framework\TestCase; use YooKassa\Helpers\Random; use YooKassa\Model\Deal\DealStatus; @@ -77,7 +78,7 @@ class DealsRequestBuilderTest extends TestCase /** * @dataProvider validDataProvider * @param $options - * @throws \Exception + * @throws Exception */ public function testSetCreatedGt($options) { @@ -98,7 +99,7 @@ class DealsRequestBuilderTest extends TestCase /** * @dataProvider validDataProvider * @param $options - * @throws \Exception + * @throws Exception */ public function testSetCreatedLte($options) { @@ -159,7 +160,7 @@ class DealsRequestBuilderTest extends TestCase /** * @dataProvider validDataProvider * @param $options - * @throws \Exception + * @throws Exception */ public function testSetExpiresGt($options) { @@ -180,7 +181,7 @@ class DealsRequestBuilderTest extends TestCase /** * @dataProvider validDataProvider * @param $options - * @throws \Exception + * @throws Exception */ public function testSetExpiresLte($options) { @@ -281,55 +282,55 @@ class DealsRequestBuilderTest extends TestCase public function validDataProvider() { - $result = array( + $result = array( array( array( - 'createdAtGte' => null, - 'createdAtGt' => null, - 'createdAtLte' => null, - 'createdAtLt' => null, - 'expiresAtGte' => null, - 'expiresAtGt' => null, - 'expiresAtLte' => null, - 'expiresAtLt' => null, + 'createdAtGte' => null, + 'createdAtGt' => null, + 'createdAtLte' => null, + 'createdAtLt' => null, + 'expiresAtGte' => null, + 'expiresAtGt' => null, + 'expiresAtLte' => null, + 'expiresAtLt' => null, 'fullTextSearch' => null, - 'status' => null, - 'limit' => null, - 'cursor' => null, + 'status' => null, + 'limit' => null, + 'cursor' => null, ), ), array( array( - 'createdAtGte' => '', - 'createdAtGt' => '', - 'createdAtLte' => '', - 'createdAtLt' => '', - 'expiresAtGte' => '', - 'expiresAtGt' => '', - 'expiresAtLte' => '', - 'expiresAtLt' => '', + 'createdAtGte' => '', + 'createdAtGt' => '', + 'createdAtLte' => '', + 'createdAtLt' => '', + 'expiresAtGte' => '', + 'expiresAtGt' => '', + 'expiresAtLte' => '', + 'expiresAtLt' => '', 'fullTextSearch' => '', - 'status' => '', - 'limit' => 0, - 'cursor' => '', + 'status' => '', + 'limit' => 0, + 'cursor' => '', ), ), ); $statuses = DealStatus::getValidValues(); for ($i = 0; $i < 10; $i++) { - $request = array( - 'createdAtGte' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'createdAtGt' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'createdAtLte' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'createdAtLt' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'expiresAtGte' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'expiresAtGt' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'expiresAtLte' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'expiresAtLt' => date(YOOKASSA_DATE, mt_rand(1, time())), + $request = array( + 'createdAtGte' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'createdAtGt' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'createdAtLte' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'createdAtLt' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'expiresAtGte' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'expiresAtGt' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'expiresAtLte' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'expiresAtLt' => date(YOOKASSA_DATE, mt_rand(1, time())), 'fullTextSearch' => Random::str(DealsRequest::MIN_LENGTH_DESCRIPTION, SafeDeal::MAX_LENGTH_DESCRIPTION), - 'status' => $statuses[mt_rand(0, count($statuses) - 1)], - 'limit' => mt_rand(1, 100), - 'cursor' => $this->randomString(mt_rand(2, 30)), + 'status' => $statuses[mt_rand(0, count($statuses) - 1)], + 'limit' => mt_rand(1, 100), + 'cursor' => $this->randomString(mt_rand(2, 30)), ); $result[] = array($request); } @@ -345,7 +346,7 @@ class DealsRequestBuilderTest extends TestCase if ($any) { $char = chr(mt_rand(32, 126)); } else { - $rnd = mt_rand(0, strlen($chars) - 1); + $rnd = mt_rand(0, strlen($chars) - 1); $char = substr($chars, $rnd, 1); } $result .= $char; diff --git a/tests/Request/Deals/DealsRequestSerializerTest.php b/tests/Request/Deals/DealsRequestSerializerTest.php index 25742521..ab1fcfaf 100644 --- a/tests/Request/Deals/DealsRequestSerializerTest.php +++ b/tests/Request/Deals/DealsRequestSerializerTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Request\Deals; +use DateTime; use PHPUnit\Framework\TestCase; use YooKassa\Helpers\Random; use YooKassa\Model\Deal\DealStatus; @@ -35,18 +36,18 @@ use YooKassa\Request\Deals\DealsRequestSerializer; class DealsRequestSerializerTest extends TestCase { private $fieldMap = array( - 'createdAtGte' => 'created_at.gte', - 'createdAtGt' => 'created_at.gt', - 'createdAtLte' => 'created_at.lte', - 'createdAtLt' => 'created_at.lt', - 'expiresAtGte' => 'expires_at.gte', - 'expiresAtGt' => 'expires_at.gt', - 'expiresAtLte' => 'expires_at.lte', - 'expiresAtLt' => 'expires_at.lt', - 'status' => 'status', - 'fullTextSearch' => 'full_text_search', - 'limit' => 'limit', - 'cursor' => 'cursor', + 'createdAtGte' => 'created_at.gte', + 'createdAtGt' => 'created_at.gt', + 'createdAtLte' => 'created_at.lte', + 'createdAtLt' => 'created_at.lt', + 'expiresAtGte' => 'expires_at.gte', + 'expiresAtGt' => 'expires_at.gt', + 'expiresAtLte' => 'expires_at.lte', + 'expiresAtLt' => 'expires_at.lt', + 'status' => 'status', + 'fullTextSearch' => 'full_text_search', + 'limit' => 'limit', + 'cursor' => 'cursor', ); /** @@ -56,14 +57,14 @@ class DealsRequestSerializerTest extends TestCase public function testSerialize($options) { $serializer = new DealsRequestSerializer(); - $data = $serializer->serialize(DealsRequest::builder()->build($options)); + $data = $serializer->serialize(DealsRequest::builder()->build($options)); $expected = array(); foreach ($this->fieldMap as $field => $mapped) { if (isset($options[$field])) { $value = $options[$field]; if (!empty($value)) { - $expected[$mapped] = $value instanceof \DateTime ? $value->format(YOOKASSA_DATE) : $value; + $expected[$mapped] = $value instanceof DateTime ? $value->format(YOOKASSA_DATE) : $value; } } } @@ -72,42 +73,42 @@ class DealsRequestSerializerTest extends TestCase public function validDataProvider() { - $result = array( + $result = array( array( array(), ), array( array( - 'createdAtGte' => '', - 'createdAtGt' => '', - 'createdAtLte' => '', - 'createdAtLt' => '', - 'expiresAtGte' => '', - 'expiresAtGt' => '', - 'expiresAtLte' => '', - 'expiresAtLt' => '', - 'fullTextSearch' => '', - 'status' => '', - 'limit' => 0, - 'cursor' => '', + 'createdAtGte' => '', + 'createdAtGt' => '', + 'createdAtLte' => '', + 'createdAtLt' => '', + 'expiresAtGte' => '', + 'expiresAtGt' => '', + 'expiresAtLte' => '', + 'expiresAtLt' => '', + 'fullTextSearch' => '', + 'status' => '', + 'limit' => 0, + 'cursor' => '', ), ), ); $statuses = DealStatus::getValidValues(); for ($i = 0; $i < 10; $i++) { - $request = array( - 'createdAtGte' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'createdAtGt' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'createdAtLte' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'createdAtLt' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'expiresAtGte' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'expiresAtGt' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'expiresAtLte' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'expiresAtLt' => date(YOOKASSA_DATE, mt_rand(1, time())), + $request = array( + 'createdAtGte' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'createdAtGt' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'createdAtLte' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'createdAtLt' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'expiresAtGte' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'expiresAtGt' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'expiresAtLte' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'expiresAtLt' => date(YOOKASSA_DATE, mt_rand(1, time())), 'fullTextSearch' => Random::str(DealsRequest::MIN_LENGTH_DESCRIPTION, SafeDeal::MAX_LENGTH_DESCRIPTION), - 'status' => $statuses[mt_rand(0, count($statuses) - 1)], - 'limit' => mt_rand(1, 100), - 'cursor' => $this->randomString(mt_rand(2, 30)), + 'status' => $statuses[mt_rand(0, count($statuses) - 1)], + 'limit' => mt_rand(1, 100), + 'cursor' => $this->randomString(mt_rand(2, 30)), ); $result[] = array($request); } @@ -123,7 +124,7 @@ class DealsRequestSerializerTest extends TestCase if ($any) { $char = chr(mt_rand(32, 126)); } else { - $rnd = mt_rand(0, strlen($chars) - 1); + $rnd = mt_rand(0, strlen($chars) - 1); $char = substr($chars, $rnd, 1); } $result .= $char; diff --git a/tests/Request/Deals/DealsRequestTest.php b/tests/Request/Deals/DealsRequestTest.php index 1a8c9b05..8feb089f 100644 --- a/tests/Request/Deals/DealsRequestTest.php +++ b/tests/Request/Deals/DealsRequestTest.php @@ -25,7 +25,9 @@ namespace Tests\YooKassa\Request\Deals; +use DateTime; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Helpers\StringObject; use YooKassa\Model\Deal\DealStatus; @@ -54,11 +56,11 @@ class DealsRequestTest extends TestCase /** * @dataProvider invalidPageDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidCursor($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCursor($value); } @@ -73,11 +75,11 @@ class DealsRequestTest extends TestCase /** * @dataProvider invalidFullTextSearchDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidFullTextSearch($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setFullTextSearch($value); } @@ -97,8 +99,8 @@ class DealsRequestTest extends TestCase 'expiresAtLte', 'expiresAtLt', ); - $expected = null; - if ($value instanceof \DateTime) { + $expected = null; + if ($value instanceof DateTime) { $expected = $value->format(YOOKASSA_DATE); } elseif (is_numeric($value)) { $expected = date(YOOKASSA_DATE, $value); @@ -106,87 +108,87 @@ class DealsRequestTest extends TestCase $expected = $value; } foreach ($properties as $property) { - $this->getterAndSetterTest($value, $property, empty($expected) ? null : new \DateTime($expected)); + $this->getterAndSetterTest($value, $property, empty($expected) ? null : new DateTime($expected)); } } /** * @dataProvider invalidDateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidCreatedAtGte($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCreatedAtGte($value); } /** * @dataProvider invalidDateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidCreatedAtGt($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCreatedAtGt($value); } /** * @dataProvider invalidDateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidCreatedAtLte($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCreatedAtLte($value); } /** * @dataProvider invalidDateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidCreatedAtLt($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCreatedAtLt($value); } /** * @dataProvider invalidDateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidExpiresAtGte($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setExpiresAtGte($value); } /** * @dataProvider invalidDateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidExpiresAtGt($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setExpiresAtGt($value); } /** * @dataProvider invalidDateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidExpiresAtLte($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setExpiresAtLte($value); } /** * @dataProvider invalidDateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidExpiresAtLt($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setExpiresAtLt($value); } @@ -202,11 +204,11 @@ class DealsRequestTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidLimit($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setLimit($value); } @@ -221,11 +223,11 @@ class DealsRequestTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidStatus($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setStatus($value); } @@ -282,7 +284,7 @@ class DealsRequestTest extends TestCase array(''), array(Random::int(0, time())), array(date(YOOKASSA_DATE, Random::int(0, time()))), - array(new \DateTime()), + array(new DateTime()), ); } @@ -311,7 +313,7 @@ class DealsRequestTest extends TestCase { return array( array(array()), - array(new \stdClass()), + array(new stdClass()), array(true), array(false), ); @@ -321,7 +323,7 @@ class DealsRequestTest extends TestCase { $result = array( array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(10)), array(Random::bytes(10)), array(-1), @@ -336,7 +338,7 @@ class DealsRequestTest extends TestCase array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(DealsRequest::MIN_LENGTH_DESCRIPTION - 1)), array(new StringObject(Random::str(SafeDeal::MAX_LENGTH_DESCRIPTION + 1))), ); @@ -348,7 +350,7 @@ class DealsRequestTest extends TestCase array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(35)), array(Random::str(37)), array(new StringObject(Random::str(10))), @@ -360,7 +362,7 @@ class DealsRequestTest extends TestCase { return array( array(array()), - array(new \stdClass()), + array(new stdClass()), array(true), array(false), ); @@ -370,7 +372,7 @@ class DealsRequestTest extends TestCase { $getter = 'get' . ucfirst($property); $setter = 'set' . ucfirst($property); - $has = 'has' . ucfirst($property); + $has = 'has' . ucfirst($property); $instance = $this->getTestInstance(); @@ -391,7 +393,7 @@ class DealsRequestTest extends TestCase if ($testHas) { self::assertTrue($instance->{$has}()); } - if ($expected instanceof \DateTime) { + if ($expected instanceof DateTime) { self::assertEquals($expected->getTimestamp(), $instance->{$getter}()->getTimestamp()); self::assertEquals($expected->getTimestamp(), $instance->{$property}->getTimestamp()); } else { @@ -418,7 +420,7 @@ class DealsRequestTest extends TestCase if ($testHas) { self::assertTrue($instance->{$has}()); } - if ($expected instanceof \DateTime) { + if ($expected instanceof DateTime) { self::assertEquals($expected->getTimestamp(), $instance->{$getter}()->getTimestamp()); self::assertEquals($expected->getTimestamp(), $instance->{$property}->getTimestamp()); } else { diff --git a/tests/Request/Deals/DealsResponseTest.php b/tests/Request/Deals/DealsResponseTest.php index c6966382..a9ec721d 100644 --- a/tests/Request/Deals/DealsResponseTest.php +++ b/tests/Request/Deals/DealsResponseTest.php @@ -93,10 +93,10 @@ class DealsResponseTest extends TestCase /** * @dataProvider invalidDataProvider * @param array $options - * @expectedException \InvalidArgumentException */ public function testInvalidData($options) { + $this->expectException('InvalidArgumentException'); new DealsResponse($options); } diff --git a/tests/Request/Payments/AbstractPaymentResponseTest.php b/tests/Request/Payments/AbstractPaymentResponseTestCase.php similarity index 99% rename from tests/Request/Payments/AbstractPaymentResponseTest.php rename to tests/Request/Payments/AbstractPaymentResponseTestCase.php index b1d3c8bf..b7cb65c0 100644 --- a/tests/Request/Payments/AbstractPaymentResponseTest.php +++ b/tests/Request/Payments/AbstractPaymentResponseTestCase.php @@ -39,7 +39,7 @@ use YooKassa\Model\Transfer; use YooKassa\Model\TransferStatus; use YooKassa\Request\Payments\PaymentResponse; -abstract class AbstractPaymentResponseTest extends TestCase +abstract class AbstractPaymentResponseTestCase extends TestCase { /** * @param $options @@ -368,7 +368,7 @@ abstract class AbstractPaymentResponseTest extends TestCase 'currency' => Random::str(1, 256), ), 'authorization_details' => array( - 'rrn' => Random::str(10), + 'rrn' => Random::str(10), 'auth_code' => Random::str(10), ), 'transfers' => array( diff --git a/tests/Request/Payments/CreatePaymentRequestBuilderTest.php b/tests/Request/Payments/CreatePaymentRequestBuilderTest.php index db6281d8..7c74780c 100644 --- a/tests/Request/Payments/CreatePaymentRequestBuilderTest.php +++ b/tests/Request/Payments/CreatePaymentRequestBuilderTest.php @@ -28,6 +28,7 @@ namespace Tests\YooKassa\Request\Payments; use Exception; use InvalidArgumentException; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\AmountInterface; use YooKassa\Model\ConfirmationAttributes\ConfirmationAttributesExternal; @@ -210,7 +211,7 @@ class CreatePaymentRequestBuilderTest extends TestCase if (!($options['amount'] instanceof AmountInterface)) { $builder->setAmount(array( - 'value' => $options['amount'], + 'value' => $options['amount'], 'currency' => 'EUR', )); $instance = $builder->build($this->getRequiredData('amount')); @@ -219,13 +220,13 @@ class CreatePaymentRequestBuilderTest extends TestCase } /** - * @expectedException InvalidArgumentException * @dataProvider invalidAmountDataProvider * * @param $value */ public function testSetInvalidAmount($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreatePaymentRequestBuilder(); $builder->setAmount($value); } @@ -361,12 +362,12 @@ class CreatePaymentRequestBuilderTest extends TestCase /** * @dataProvider invalidItemsDataProvider - * @expectedException InvalidArgumentException * * @param $items */ public function testSetInvalidReceiptItems($items) { + $this->expectException('InvalidArgumentException'); $builder = new CreatePaymentRequestBuilder(); $builder->setReceiptItems($items); } @@ -377,18 +378,18 @@ class CreatePaymentRequestBuilderTest extends TestCase array( array( array( - 'price' => 1, + 'price' => 1, 'quantity' => 1.4, - 'vatCode' => 3, + 'vatCode' => 3, ), ), ), array( array( array( - 'title' => 'test', + 'title' => 'test', 'quantity' => 1.4, - 'vatCode' => 3, + 'vatCode' => 3, ), ), ), @@ -396,18 +397,18 @@ class CreatePaymentRequestBuilderTest extends TestCase array( array( 'description' => 'test', - 'quantity' => 1.4, - 'vatCode' => 3, + 'quantity' => 1.4, + 'vatCode' => 3, ), ), ), array( array( array( - 'title' => 'test', - 'price' => 123, + 'title' => 'test', + 'price' => 123, 'quantity' => 1.4, - 'vatCode' => 15, + 'vatCode' => 15, ), ), ), @@ -415,16 +416,16 @@ class CreatePaymentRequestBuilderTest extends TestCase array( array( 'description' => 'test', - 'price' => 123, - 'quantity' => -1.4, + 'price' => 123, + 'quantity' => -1.4, ), ), ), array( array( array( - 'title' => 'test', - 'price' => 1, + 'title' => 'test', + 'price' => 1, 'vatCode' => 7, ), ), @@ -456,12 +457,12 @@ class CreatePaymentRequestBuilderTest extends TestCase /** * @dataProvider invalidEmailDataProvider - * @expectedException InvalidArgumentException * * @param $value */ public function testSetInvalidEmail($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreatePaymentRequestBuilder(); $builder->setReceiptEmail($value); } @@ -491,12 +492,12 @@ class CreatePaymentRequestBuilderTest extends TestCase /** * @dataProvider invalidPhoneDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidPhone($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreatePaymentRequestBuilder(); $builder->setReceiptPhone($value); } @@ -526,12 +527,12 @@ class CreatePaymentRequestBuilderTest extends TestCase /** * @dataProvider invalidVatIdDataProvider - * @expectedException InvalidArgumentException * * @param $value */ public function testSetInvalidTaxSystemId($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreatePaymentRequestBuilder(); $builder->setTaxSystemCode($value); } @@ -561,12 +562,12 @@ class CreatePaymentRequestBuilderTest extends TestCase /** * @dataProvider invalidReceiptIndustryDetailsDataProvider - * @expectedException InvalidArgumentException * * @param $value */ public function testSetInvalidReceiptIndustryDetails($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreatePaymentRequestBuilder(); $builder->setReceiptIndustryDetails($value); } @@ -596,12 +597,12 @@ class CreatePaymentRequestBuilderTest extends TestCase /** * @dataProvider invalidReceiptOperationalDetailsDataProvider - * @expectedException InvalidArgumentException * * @param $value */ public function testSetInvalidReceiptOperationalDetails($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreatePaymentRequestBuilder(); $builder->setReceiptOperationalDetails($value); } @@ -861,12 +862,12 @@ class CreatePaymentRequestBuilderTest extends TestCase /** * @dataProvider invalidRecipientDataProvider - * @expectedException InvalidArgumentException * * @param mixed $value */ public function testSetInvalidRecipient($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreatePaymentRequestBuilder(); $builder->setRecipient($value); } @@ -880,7 +881,7 @@ class CreatePaymentRequestBuilderTest extends TestCase array(1), array(1.1), array('test'), - array(new \stdClass()), + array(new stdClass()), ); } @@ -897,15 +898,15 @@ class CreatePaymentRequestBuilderTest extends TestCase ), 'items' => array( array( - 'description' => 'test', - 'quantity' => 123, - 'amount' => array( - 'value' => 321, + 'description' => 'test', + 'quantity' => 123, + 'amount' => array( + 'value' => 321, 'currency' => 'USD', ), - 'vat_code' => Random::int(1, 6), + 'vat_code' => Random::int(1, 6), 'payment_subject' => PaymentSubject::COMMODITY, - 'payment_mode' => PaymentMode::PARTIAL_PREPAYMENT, + 'payment_mode' => PaymentMode::PARTIAL_PREPAYMENT, ), ), ); @@ -933,12 +934,12 @@ class CreatePaymentRequestBuilderTest extends TestCase /** * @dataProvider invalidReceiptDataProvider - * @expectedException InvalidArgumentException * * @param mixed $value */ public function testSetInvalidReceipt($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreatePaymentRequestBuilder(); $builder->setReceipt($value); } @@ -952,7 +953,7 @@ class CreatePaymentRequestBuilderTest extends TestCase array(1), array(1.1), array('test'), - array(new \stdClass()), + array(new stdClass()), ); } @@ -967,27 +968,27 @@ class CreatePaymentRequestBuilderTest extends TestCase $receiptItem->setQuantity(1); $receiptItem->setDescription('test'); $receiptItem->setVatCode(3); - $result = array( + $result = array( array( array( - 'accountId' => Random::str(1, 32), - 'gatewayId' => Random::str(1, 32), - 'recipient' => null, - 'description' => null, - 'amount' => new MonetaryAmount(Random::int(1, 1000)), - 'currency' => Random::value(CurrencyCode::getValidValues()), - 'receiptItems' => array(), - 'paymentToken' => null, - 'paymentMethodId' => null, + 'accountId' => Random::str(1, 32), + 'gatewayId' => Random::str(1, 32), + 'recipient' => null, + 'description' => null, + 'amount' => new MonetaryAmount(Random::int(1, 1000)), + 'currency' => Random::value(CurrencyCode::getValidValues()), + 'receiptItems' => array(), + 'paymentToken' => null, + 'paymentMethodId' => null, 'paymentMethodData' => null, - 'confirmation' => null, + 'confirmation' => null, 'savePaymentMethod' => null, - 'capture' => null, - 'clientIp' => null, - 'metadata' => null, - 'receiptEmail' => null, - 'receiptPhone' => null, - 'taxSystemCode' => null, + 'capture' => null, + 'clientIp' => null, + 'metadata' => null, + 'receiptEmail' => null, + 'receiptPhone' => null, + 'taxSystemCode' => null, 'deal' => array( 'id' => Random::str(36, 50), 'settlements' => array( @@ -1001,41 +1002,41 @@ class CreatePaymentRequestBuilderTest extends TestCase ) ), 'fraud_data' => null, - 'receiptIndustryDetails' => null, + 'receiptIndustryDetails' => null, 'receiptOperationalDetails' => null, ), ), array( array( - 'accountId' => Random::str(1, 32), - 'gatewayId' => Random::str(1, 32), - 'recipient' => null, - 'description' => '', - 'amount' => new MonetaryAmount(Random::int(1, 1000)), - 'currency' => Random::value(CurrencyCode::getValidValues()), - 'receiptItems' => array( + 'accountId' => Random::str(1, 32), + 'gatewayId' => Random::str(1, 32), + 'recipient' => null, + 'description' => '', + 'amount' => new MonetaryAmount(Random::int(1, 1000)), + 'currency' => Random::value(CurrencyCode::getValidValues()), + 'receiptItems' => array( array( - 'title' => 'test', - 'quantity' => mt_rand(1, 100), - 'price' => mt_rand(1, 100), - 'vatCode' => mt_rand(1, 6), - 'paymentMode' => PaymentMode::CREDIT_PAYMENT, + 'title' => 'test', + 'quantity' => mt_rand(1, 100), + 'price' => mt_rand(1, 100), + 'vatCode' => mt_rand(1, 6), + 'paymentMode' => PaymentMode::CREDIT_PAYMENT, 'paymentSubject' => PaymentSubject::ANOTHER, ), $receiptItem, ), - 'referenceId' => '', - 'paymentToken' => '', - 'paymentMethodId' => '', + 'referenceId' => '', + 'paymentToken' => '', + 'paymentMethodId' => '', 'paymentMethodData' => '', - 'confirmation' => '', + 'confirmation' => '', 'savePaymentMethod' => '', - 'capture' => '', - 'clientIp' => '', - 'metadata' => array(), - 'receiptEmail' => Random::str(10, 32), - 'receiptPhone' => '', - 'taxSystemCode' => '', + 'capture' => '', + 'clientIp' => '', + 'metadata' => array(), + 'receiptEmail' => Random::str(10, 32), + 'receiptPhone' => '', + 'taxSystemCode' => '', 'deal' => array( 'id' => Random::str(36, 50), 'settlements' => array(), @@ -1043,12 +1044,12 @@ class CreatePaymentRequestBuilderTest extends TestCase 'fraud_data' => new FraudData(array( 'id' => Random::str(11, 15, '0123456789'), )), - 'receiptIndustryDetails' => '', + 'receiptIndustryDetails' => '', 'receiptOperationalDetails' => '', ), ), ); - $paymentMethodData = array( + $paymentMethodData = array( new PaymentDataQiwi(), PaymentMethodType::BANK_CARD, array( @@ -1068,26 +1069,26 @@ class CreatePaymentRequestBuilderTest extends TestCase ), ); for ($i = 0; $i < 10; $i++) { - $request = array( - 'accountId' => uniqid('', true), - 'gatewayId' => uniqid('', true), - 'recipient' => new Recipient(), - 'description' => uniqid('', true), - 'amount' => mt_rand(1, 100000), - 'currency' => CurrencyCode::RUB, - 'receiptItems' => array(), - 'referenceId' => uniqid('', true), - 'paymentToken' => uniqid('', true), - 'paymentMethodId' => uniqid('', true), + $request = array( + 'accountId' => uniqid('', true), + 'gatewayId' => uniqid('', true), + 'recipient' => new Recipient(), + 'description' => uniqid('', true), + 'amount' => mt_rand(1, 100000), + 'currency' => CurrencyCode::RUB, + 'receiptItems' => array(), + 'referenceId' => uniqid('', true), + 'paymentToken' => uniqid('', true), + 'paymentMethodId' => uniqid('', true), 'paymentMethodData' => isset($paymentMethodData[$i]) ? $paymentMethodData[$i] : null, - 'confirmation' => isset($confirmationStatuses[$i]) ? $confirmationStatuses[$i] : null, + 'confirmation' => isset($confirmationStatuses[$i]) ? $confirmationStatuses[$i] : null, 'savePaymentMethod' => (bool)mt_rand(0, 1), - 'capture' => (bool)mt_rand(0, 1), - 'clientIp' => long2ip(mt_rand(0, 2 ** 32)), - 'metadata' => array('test' => 'test'), - 'receiptEmail' => Random::str(10), - 'receiptPhone' => Random::str(10, '0123456789'), - 'taxSystemCode' => Random::int(1, 6), + 'capture' => (bool)mt_rand(0, 1), + 'clientIp' => long2ip(mt_rand(0, 2 ** 32)), + 'metadata' => array('test' => 'test'), + 'receiptEmail' => Random::str(10), + 'receiptPhone' => Random::str(10, '0123456789'), + 'taxSystemCode' => Random::int(1, 6), 'receiptIndustryDetails' => array( array( 'federal_id' => Random::str(1, 255), @@ -1132,7 +1133,7 @@ class CreatePaymentRequestBuilderTest extends TestCase array(-1), array(true), array(false), - array(new \stdClass()), + array(new stdClass()), array(0), ); } @@ -1146,7 +1147,7 @@ class CreatePaymentRequestBuilderTest extends TestCase array(array()), array(true), array(false), - array(new \stdClass()), + array(new stdClass()), ); } @@ -1157,7 +1158,7 @@ class CreatePaymentRequestBuilderTest extends TestCase public function invalidPhoneDataProvider() { return array( - array(new \stdClass()), + array(new stdClass()), array(array()), array(true), array(false), @@ -1174,7 +1175,7 @@ class CreatePaymentRequestBuilderTest extends TestCase array(array()), array(true), array(false), - array(new \stdClass()), + array(new stdClass()), array(0), array(7), array(Random::int(-100, -1)), @@ -1189,11 +1190,11 @@ class CreatePaymentRequestBuilderTest extends TestCase public function invalidReceiptIndustryDetailsDataProvider() { return array( - array(new \stdClass()), + array(new stdClass()), array( array( - new \stdClass(), - new \stdClass(), + new stdClass(), + new stdClass(), ) ), array(true), @@ -1204,7 +1205,7 @@ class CreatePaymentRequestBuilderTest extends TestCase public function invalidReceiptOperationalDetailsDataProvider() { return array( - array(new \stdClass()), + array(new stdClass()), array(true), array(Random::str(1, 100)), ); @@ -1231,34 +1232,34 @@ class CreatePaymentRequestBuilderTest extends TestCase } /** - * @expectedException InvalidArgumentException */ public function testSetInvalidTypeDescription() { + $this->expectException('InvalidArgumentException'); $builder = new CreatePaymentRequestBuilder(); $builder->setDescription(true); } /** - * @expectedException InvalidArgumentException */ public function testSetInvalidLengthDescription() { - $builder = new CreatePaymentRequestBuilder(); + $this->expectException('InvalidArgumentException'); + $builder = new CreatePaymentRequestBuilder(); $description = Random::str(Payment::MAX_LENGTH_DESCRIPTION + 1); $builder->setDescription($description); } /** * @dataProvider invalidVatIdDataProvider - * @expectedException InvalidArgumentException * * @param $value */ public function testSetInvalidAirline($value) { + $this->expectException('InvalidArgumentException'); if (is_array($value)) { - throw new \InvalidArgumentException(); + throw new InvalidArgumentException(); } $builder = new CreatePaymentRequestBuilder(); $builder->setAirline($value); @@ -1273,7 +1274,7 @@ class CreatePaymentRequestBuilderTest extends TestCase return array( array(true), array(false), - array(new \stdClass()), + array(new stdClass()), array(0), array(7), array(Random::int(-100, -1)), @@ -1283,11 +1284,11 @@ class CreatePaymentRequestBuilderTest extends TestCase /** * @dataProvider invalidDealDataProvider - * @expectedException InvalidArgumentException * @param $value */ public function testSetInvalidDeal($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreatePaymentRequestBuilder(); $builder->setDeal($value); } @@ -1301,7 +1302,7 @@ class CreatePaymentRequestBuilderTest extends TestCase return array( array(true), array(false), - array(new \stdClass()), + array(new stdClass()), array(0), array(7), array(Random::int(-100, -1)), @@ -1311,11 +1312,11 @@ class CreatePaymentRequestBuilderTest extends TestCase /** * @dataProvider invalidFraudDataProvider - * @expectedException InvalidArgumentException * @param $value */ public function testSetInvalidFraudData($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreatePaymentRequestBuilder(); $builder->setFraudData($value); } diff --git a/tests/Request/Payments/CreatePaymentRequestSerializerTest.php b/tests/Request/Payments/CreatePaymentRequestSerializerTest.php index 8c2c72b7..eedc589d 100644 --- a/tests/Request/Payments/CreatePaymentRequestSerializerTest.php +++ b/tests/Request/Payments/CreatePaymentRequestSerializerTest.php @@ -25,6 +25,8 @@ namespace Tests\YooKassa\Request\Payments; +use DateTime; +use Exception; use PHPUnit\Framework\TestCase; use YooKassa\Helpers\Random; use YooKassa\Model\Airline; @@ -61,10 +63,10 @@ use YooKassa\Request\Payments\CreatePaymentRequestSerializer; class CreatePaymentRequestSerializerTest extends TestCase { private $fieldMap = array( - 'payment_token' => 'paymentToken', - 'payment_method_id' => 'paymentMethodId', - 'client_ip' => 'clientIp', - 'merchant_customer_id' => 'merchantCustomerId', + 'payment_token' => 'paymentToken', + 'payment_method_id' => 'paymentMethodId', + 'client_ip' => 'clientIp', + 'merchant_customer_id' => 'merchantCustomerId', ); /** @@ -75,12 +77,12 @@ class CreatePaymentRequestSerializerTest extends TestCase public function testSerialize($options) { $serializer = new CreatePaymentRequestSerializer(); - $instance = CreatePaymentRequest::builder()->build($options); - $data = $serializer->serialize($instance); + $instance = CreatePaymentRequest::builder()->build($options); + $data = $serializer->serialize($instance); $expected = array( 'amount' => array( - 'value' => $options['amount'], + 'value' => $options['amount'], 'currency' => isset($options['currency']) ? $options['currency'] : CurrencyCode::RUB, ), ); @@ -88,7 +90,7 @@ class CreatePaymentRequestSerializerTest extends TestCase if (isset($options[$field])) { $value = $options[$field]; if (!empty($value)) { - $expected[$mapped] = $value instanceof \DateTime ? $value->format(YOOKASSA_DATE) : $value; + $expected[$mapped] = $value instanceof DateTime ? $value->format(YOOKASSA_DATE) : $value; } } } @@ -106,7 +108,7 @@ class CreatePaymentRequestSerializerTest extends TestCase $expected['confirmation']['locale'] = $locale; } if ($options['confirmation']->getType() === ConfirmationType::REDIRECT) { - $expected['confirmation']['enforce'] = $options['confirmation']->enforce; + $expected['confirmation']['enforce'] = $options['confirmation']->enforce; $expected['confirmation']['return_url'] = $options['confirmation']->returnUrl; } if ($options['confirmation']->getType() === ConfirmationType::MOBILE_APPLICATION) { @@ -125,16 +127,16 @@ class CreatePaymentRequestSerializerTest extends TestCase $expected['payment_method_data']['payment_data'] = $options['paymentMethodData']->getPaymentData(); break; case PaymentMethodType::GOOGLE_PAY: - $expected['payment_method_data']['payment_method_token'] = $options['paymentMethodData']->getPaymentMethodToken(); + $expected['payment_method_data']['payment_method_token'] = $options['paymentMethodData']->getPaymentMethodToken(); $expected['payment_method_data']['google_transaction_id'] = $options['paymentMethodData']->getGoogleTransactionId(); break; case PaymentMethodType::BANK_CARD: $expected['payment_method_data']['card'] = array( - 'number' => $options['paymentMethodData']->getCard()->getNumber(), - 'expiry_year' => $options['paymentMethodData']->getCard()->getExpiryYear(), + 'number' => $options['paymentMethodData']->getCard()->getNumber(), + 'expiry_year' => $options['paymentMethodData']->getCard()->getExpiryYear(), 'expiry_month' => $options['paymentMethodData']->getCard()->getExpiryMonth(), - 'csc' => $options['paymentMethodData']->getCard()->getCsc(), - 'cardholder' => $options['paymentMethodData']->getCard()->getCardholder(), + 'csc' => $options['paymentMethodData']->getCard()->getCsc(), + 'cardholder' => $options['paymentMethodData']->getCard()->getCardholder(), ); break; case PaymentMethodType::MOBILE_BALANCE: @@ -144,13 +146,13 @@ class CreatePaymentRequestSerializerTest extends TestCase break; case PaymentMethodType::B2B_SBERBANK: /** @var PaymentDataB2bSberbank $paymentMethodData */ - $paymentMethodData = $options['paymentMethodData']; + $paymentMethodData = $options['paymentMethodData']; $expected['payment_method_data']['payment_purpose'] = $paymentMethodData->getPaymentPurpose(); - $expected['payment_method_data']['vat_data'] = array( - 'type' => $paymentMethodData->getVatData()->getType(), - 'rate' => $paymentMethodData->getVatData()->getRate(), + $expected['payment_method_data']['vat_data'] = array( + 'type' => $paymentMethodData->getVatData()->getType(), + 'rate' => $paymentMethodData->getVatData()->getRate(), 'amount' => array( - 'value' => $paymentMethodData->getVatData()->getAmount()->getValue(), + 'value' => $paymentMethodData->getVatData()->getAmount()->getValue(), 'currency' => $paymentMethodData->getVatData()->getAmount()->getCurrency(), ), ); @@ -196,18 +198,18 @@ class CreatePaymentRequestSerializerTest extends TestCase if (!empty($options['airline'])) { $expected['airline'] = array( 'booking_reference' => $options['airline']['booking_reference'], - 'ticket_number' => $options['airline']['ticket_number'], - 'passengers' => array_map(function ($passenger) { + 'ticket_number' => $options['airline']['ticket_number'], + 'passengers' => array_map(function ($passenger) { return array( 'first_name' => $passenger['first_name'], - 'last_name' => $passenger['last_name'], + 'last_name' => $passenger['last_name'], ); }, $options['airline']['passengers']), - 'legs' => array_map(function ($leg) { + 'legs' => array_map(function ($leg) { return array( - 'departure_airport' => $leg['departure_airport'], + 'departure_airport' => $leg['departure_airport'], 'destination_airport' => $leg['destination_airport'], - 'departure_date' => $leg['departure_date'], + 'departure_date' => $leg['departure_date'], ); }, $options['airline']['legs']), ); @@ -252,7 +254,7 @@ class CreatePaymentRequestSerializerTest extends TestCase /** * @return array - * @throws \Exception + * @throws Exception */ public function validDataProvider() { @@ -269,45 +271,45 @@ class CreatePaymentRequestSerializerTest extends TestCase $passenger->setLastName(Random::str(10)); $airline->setPassengers(array($passenger)); - $result = array( + $result = array( array( array( - 'amount' => mt_rand(10, 100000), - 'paymentToken' => Random::str(36), + 'amount' => mt_rand(10, 100000), + 'paymentToken' => Random::str(36), 'receipt' => array( - 'items' => array( + 'items' => array( array( - 'description' => Random::str(10), - 'quantity' => (float)Random::int(1, 10), - 'amount' => array( - 'value' => (float)Random::int(100, 100), + 'description' => Random::str(10), + 'quantity' => (float)Random::int(1, 10), + 'amount' => array( + 'value' => (float)Random::int(100, 100), 'currency' => CurrencyCode::RUB, ), - 'vat_code' => Random::int(1, 6), + 'vat_code' => Random::int(1, 6), 'payment_subject' => PaymentSubject::COMMODITY, - 'payment_mode' => PaymentMode::PARTIAL_PREPAYMENT, + 'payment_mode' => PaymentMode::PARTIAL_PREPAYMENT, ) ), 'customer' => array( - 'email' => Random::str(10), + 'email' => Random::str(10), ), 'tax_system_code' => Random::int(1, 6), ), - 'description' => Random::str(10), - 'airline' => array( + 'description' => Random::str(10), + 'airline' => array( 'booking_reference' => Random::str(10), - 'ticket_number' => Random::int(10), - 'passengers' => array( + 'ticket_number' => Random::int(10), + 'passengers' => array( array( 'first_name' => Random::str(10, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), - 'last_name' => Random::str(10, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), + 'last_name' => Random::str(10, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), ), ), - 'legs' => array( + 'legs' => array( array( - 'departure_airport' => Random::str(3, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), + 'departure_airport' => Random::str(3, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), 'destination_airport' => Random::str(3, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), - 'departure_date' => "2020-01-01", + 'departure_date' => "2020-01-01", ), ), ), @@ -340,7 +342,7 @@ class CreatePaymentRequestSerializerTest extends TestCase new ConfirmationAttributesRedirect(), new ConfirmationAttributesMobileApplication(), ); - $paymentData = array( + $paymentData = array( new PaymentDataSbp(), new PaymentDataApplePay(), new PaymentDataGooglePay(), @@ -373,10 +375,10 @@ class CreatePaymentRequestSerializerTest extends TestCase $paymentDataB2bSberbank = new PaymentDataB2bSberbank(); $paymentDataB2bSberbank->setPaymentPurpose(Random::str(10)); $paymentDataB2bSberbank->setVatData(array( - 'type' => VatDataType::CALCULATED, - 'rate' => VatDataRate::RATE_10, + 'type' => VatDataType::CALCULATED, + 'rate' => VatDataRate::RATE_10, 'amount' => array( - 'value' => Random::int(1, 10000), + 'value' => Random::int(1, 10000), 'currency' => CurrencyCode::USD, ), )); @@ -387,18 +389,18 @@ class CreatePaymentRequestSerializerTest extends TestCase $confirmations[1]->setReturnUrl(Random::str(10)); $confirmations[2]->setReturnUrl(Random::str(10)); foreach ($paymentData as $i => $paymentMethodData) { - $request = array( - 'accountId' => uniqid(), - 'gatewayId' => uniqid(), - 'amount' => mt_rand(0, 100000), - 'currency' => CurrencyCode::RUB, - 'referenceId' => uniqid(), + $request = array( + 'accountId' => uniqid(), + 'gatewayId' => uniqid(), + 'amount' => mt_rand(0, 100000), + 'currency' => CurrencyCode::RUB, + 'referenceId' => uniqid(), 'paymentMethodData' => $paymentData[$i], - 'confirmation' => Random::value($confirmations), + 'confirmation' => Random::value($confirmations), 'savePaymentMethod' => Random::bool(), - 'capture' => mt_rand(0, 1) ? true : false, - 'clientIp' => long2ip(mt_rand(0, pow(2, 32))), - 'metadata' => array('test' => uniqid()), + 'capture' => mt_rand(0, 1) ? true : false, + 'clientIp' => long2ip(mt_rand(0, pow(2, 32))), + 'metadata' => array('test' => uniqid()), 'receipt' => array( 'items' => $this->getReceiptItem($i + 1), 'customer' => array( @@ -407,7 +409,7 @@ class CreatePaymentRequestSerializerTest extends TestCase ), 'tax_system_code' => Random::int(1, 6), ), - 'airline' => $airline, + 'airline' => $airline, 'deal' => array( 'id' => Random::str(36, 50), 'settlements' => array() @@ -423,22 +425,22 @@ class CreatePaymentRequestSerializerTest extends TestCase /** * @param $count * @return array - * @throws \Exception + * @throws Exception */ private function getReceiptItem($count) { $result = array(); for ($i = 0; $i < $count; $i++) { $result[] = array( - 'description' => Random::str(10), - 'quantity' => (float)Random::float(1, 100), - 'amount' => array( - 'value' => (float)Random::int(1, 100), + 'description' => Random::str(10), + 'quantity' => (float)Random::float(1, 100), + 'amount' => array( + 'value' => (float)Random::int(1, 100), 'currency' => CurrencyCode::RUB, ), - 'vat_code' => Random::int(1, 6), + 'vat_code' => Random::int(1, 6), 'payment_subject' => PaymentSubject::COMMODITY, - 'payment_mode' => PaymentMode::PARTIAL_PREPAYMENT, + 'payment_mode' => PaymentMode::PARTIAL_PREPAYMENT, ); } diff --git a/tests/Request/Payments/CreatePaymentRequestTest.php b/tests/Request/Payments/CreatePaymentRequestTest.php index 1c48bc02..12bb8a59 100644 --- a/tests/Request/Payments/CreatePaymentRequestTest.php +++ b/tests/Request/Payments/CreatePaymentRequestTest.php @@ -25,7 +25,9 @@ namespace Tests\YooKassa\Request\Payments; +use Exception; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\ConfirmationAttributes\ConfirmationAttributesExternal; use YooKassa\Model\ConfirmationType; @@ -89,11 +91,11 @@ class CreatePaymentRequestTest extends TestCase /** * @dataProvider invalidRecipientDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidRecipient($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePaymentRequest(); $instance->setRecipient($value); } @@ -202,33 +204,33 @@ class CreatePaymentRequestTest extends TestCase /** * @dataProvider invalidPaymentTokenDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidPaymentToken($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePaymentRequest(); $instance->setPaymentToken($value); } /** * @dataProvider invalidPaymentTokenDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidPaymentToken($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePaymentRequest(); $instance->paymentToken = $value; } /** * @dataProvider invalidPaymentTokenDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidPayment_token($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePaymentRequest(); $instance->payment_token = $value; } @@ -298,33 +300,33 @@ class CreatePaymentRequestTest extends TestCase /** * @dataProvider invalidPaymentMethodIdDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidPaymentMethodId($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePaymentRequest(); $instance->setPaymentMethodId($value); } /** * @dataProvider invalidPaymentMethodIdDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidPaymentMethodId($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePaymentRequest(); $instance->paymentMethodId = $value; } /** * @dataProvider invalidPaymentMethodIdDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidPayment_method_id($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePaymentRequest(); $instance->payment_method_id = $value; } @@ -371,11 +373,11 @@ class CreatePaymentRequestTest extends TestCase /** * @dataProvider invalidPaymentDataDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidPaymentData($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePaymentRequest(); $instance->setPaymentMethodData($value); } @@ -432,11 +434,11 @@ class CreatePaymentRequestTest extends TestCase /** * @dataProvider invalidConfirmationAttributesDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidConfirmationAttributes($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePaymentRequest(); $instance->setConfirmation($value); } @@ -483,11 +485,11 @@ class CreatePaymentRequestTest extends TestCase /** * @dataProvider invalidBooleanDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidCreateRecurring($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePaymentRequest(); $instance->setSavePaymentMethod($value); } @@ -534,11 +536,11 @@ class CreatePaymentRequestTest extends TestCase /** * @dataProvider invalidBooleanDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidCapture($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePaymentRequest(); $instance->setCapture($value); } @@ -585,11 +587,11 @@ class CreatePaymentRequestTest extends TestCase /** * @dataProvider invalidClientIpDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidClientIp($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePaymentRequest(); $instance->setClientIp($value); } @@ -598,7 +600,7 @@ class CreatePaymentRequestTest extends TestCase { return array( array(array()), - array(new \stdClass()), + array(new stdClass()), array(true), array(false), ); @@ -652,11 +654,11 @@ class CreatePaymentRequestTest extends TestCase /** * @dataProvider invalidMerchantCustomerIdDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidMerchantCustomerId($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePaymentRequest(); $instance->setMerchantCustomerId($value); } @@ -665,7 +667,7 @@ class CreatePaymentRequestTest extends TestCase { return array( array(array()), - array(new \stdClass()), + array(new stdClass()), array(true), array(false), array(Random::str(Payment::MAX_LENGTH_MERCHANT_CUSTOMER_ID + 1)), @@ -688,7 +690,7 @@ class CreatePaymentRequestTest extends TestCase /** * @return array[] - * @throws \Exception + * @throws Exception */ public function validTransfers() { @@ -910,33 +912,33 @@ class CreatePaymentRequestTest extends TestCase /** * @dataProvider invalidMetadataDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidMetadata($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePaymentRequest(); $instance->setMetadata($value); } /** * @dataProvider invalidMetadataDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidDeal($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePaymentRequest(); $instance->setDeal($value); } /** * @dataProvider invalidFraudDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidFraudData($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePaymentRequest(); $instance->setFraudData($value); } @@ -1019,18 +1021,18 @@ class CreatePaymentRequestTest extends TestCase ), 'airline' => array( 'booking_reference' => 'IIIKRV', - 'ticket_number' => '12342123413', - 'passengers' => array( + 'ticket_number' => '12342123413', + 'passengers' => array( array( 'first_name' => 'SERGEI', - 'last_name' => 'IVANOV', + 'last_name' => 'IVANOV', ), ), - 'legs' => array( + 'legs' => array( array( - 'departure_airport' => 'LED', + 'departure_airport' => 'LED', 'destination_airport' => 'AMS', - 'departure_date' => '2018-06-20', + 'departure_date' => '2018-06-20', ), ), ), @@ -1100,7 +1102,7 @@ class CreatePaymentRequestTest extends TestCase array(true), array(1), array(Random::str(10)), - array(new \stdClass()), + array(new stdClass()), ); } @@ -1109,7 +1111,7 @@ class CreatePaymentRequestTest extends TestCase return array( array(false), array(true), - array(new \stdClass()), + array(new stdClass()), array(array()), array(Random::str(32)), ); @@ -1120,7 +1122,7 @@ class CreatePaymentRequestTest extends TestCase return array( array(false), array(true), - array(new \stdClass()), + array(new stdClass()), array(array()), array(Random::str(CreatePaymentRequest::MAX_LENGTH_PAYMENT_TOKEN + 1)), ); @@ -1131,7 +1133,7 @@ class CreatePaymentRequestTest extends TestCase return array( array(false), array(true), - array(new \stdClass()), + array(new stdClass()), array(array()), ); } @@ -1144,7 +1146,7 @@ class CreatePaymentRequestTest extends TestCase array(true), array(1), array(Random::str(10)), - array(new \stdClass()), + array(new stdClass()), ); } @@ -1156,7 +1158,7 @@ class CreatePaymentRequestTest extends TestCase array(true), array(1), array(Random::str(10)), - array(new \stdClass()), + array(new stdClass()), ); } @@ -1175,7 +1177,7 @@ class CreatePaymentRequestTest extends TestCase return array( array(false), array(true), - array(new \stdClass()), + array(new stdClass()), array(Random::str(16, 30, '0123456789')), ); } @@ -1184,7 +1186,7 @@ class CreatePaymentRequestTest extends TestCase { return array( array(array()), - array(new \stdClass()), + array(new stdClass()), array('test'), ); } diff --git a/tests/Request/Payments/CreatePaymentResponseTest.php b/tests/Request/Payments/CreatePaymentResponseTest.php index 3d8cf231..9339affc 100644 --- a/tests/Request/Payments/CreatePaymentResponseTest.php +++ b/tests/Request/Payments/CreatePaymentResponseTest.php @@ -27,7 +27,7 @@ namespace Tests\YooKassa\Request\Payments; use YooKassa\Request\Payments\CreatePaymentResponse; -class CreatePaymentResponseTest extends AbstractPaymentResponseTest +class CreatePaymentResponseTest extends AbstractPaymentResponseTestCase { protected function getTestInstance($options) { diff --git a/tests/Request/Payments/Payment/CancelResponseTest.php b/tests/Request/Payments/Payment/CancelResponseTest.php index 80f6da18..a639554c 100644 --- a/tests/Request/Payments/Payment/CancelResponseTest.php +++ b/tests/Request/Payments/Payment/CancelResponseTest.php @@ -25,10 +25,10 @@ namespace Tests\YooKassa\Request\Payments\Payment; -use Tests\YooKassa\Request\Payments\AbstractPaymentResponseTest; +use Tests\YooKassa\Request\Payments\AbstractPaymentResponseTestCase; use YooKassa\Request\Payments\Payment\CancelResponse; -class CancelResponseTest extends AbstractPaymentResponseTest +class CancelResponseTest extends AbstractPaymentResponseTestCase { protected function getTestInstance($options) { diff --git a/tests/Request/Payments/Payment/CreateCaptureRequestBuilderTest.php b/tests/Request/Payments/Payment/CreateCaptureRequestBuilderTest.php index 69fac283..c068ab15 100644 --- a/tests/Request/Payments/Payment/CreateCaptureRequestBuilderTest.php +++ b/tests/Request/Payments/Payment/CreateCaptureRequestBuilderTest.php @@ -27,6 +27,7 @@ namespace Tests\YooKassa\Request\Payments\Payment; use Exception; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\AmountInterface; use YooKassa\Model\CurrencyCode; @@ -117,7 +118,7 @@ class CreateCaptureRequestBuilderTest extends TestCase self::assertEquals($amount->getCurrency(), $instance->getAmount()->getCurrency()); $builder->setAmount(array( - 'value' => $amount->getValue(), + 'value' => $amount->getValue(), 'currency' => $amount->getCurrency(), )); $instance = $builder->build(); @@ -129,12 +130,12 @@ class CreateCaptureRequestBuilderTest extends TestCase /** * @dataProvider invalidAmountDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidAmount($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreateCaptureRequestBuilder(); $builder->setAmount($value); } @@ -157,12 +158,12 @@ class CreateCaptureRequestBuilderTest extends TestCase /** * @dataProvider invalidCurrencyDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidCurrency($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreateCaptureRequestBuilder(); $builder->setCurrency($value); } @@ -259,12 +260,12 @@ class CreateCaptureRequestBuilderTest extends TestCase /** * @dataProvider invalidItemsDataProvider - * @expectedException \InvalidArgumentException * * @param $items */ public function testSetInvalidReceiptItems($items) { + $this->expectException('InvalidArgumentException'); $builder = new CreateCaptureRequestBuilder(); $builder->setReceiptItems($items); } @@ -275,18 +276,18 @@ class CreateCaptureRequestBuilderTest extends TestCase array( array( array( - 'price' => 1, + 'price' => 1, 'quantity' => 1.4, - 'vatCode' => 3, + 'vatCode' => 3, ), ), ), array( array( array( - 'title' => 'test', + 'title' => 'test', 'quantity' => 1.4, - 'vatCode' => 3, + 'vatCode' => 3, ), ), ), @@ -294,18 +295,18 @@ class CreateCaptureRequestBuilderTest extends TestCase array( array( 'description' => 'test', - 'quantity' => 1.4, - 'vatCode' => 3, + 'quantity' => 1.4, + 'vatCode' => 3, ), ), ), array( array( array( - 'title' => 'test', - 'price' => 123, + 'title' => 'test', + 'price' => 123, 'quantity' => 1.4, - 'vatCode' => 15, + 'vatCode' => 15, ), ), ), @@ -313,8 +314,8 @@ class CreateCaptureRequestBuilderTest extends TestCase array( array( 'description' => 'test', - 'price' => 123, - 'quantity' => -1.4, + 'price' => 123, + 'quantity' => -1.4, ), ), ), @@ -344,12 +345,12 @@ class CreateCaptureRequestBuilderTest extends TestCase /** * @dataProvider invalidEmailDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidEmail($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreateCaptureRequestBuilder(); $builder->setReceiptEmail($value); } @@ -378,12 +379,12 @@ class CreateCaptureRequestBuilderTest extends TestCase /** * @dataProvider invalidPhoneDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidPhone($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreateCaptureRequestBuilder(); $builder->setReceiptPhone($value); } @@ -412,12 +413,12 @@ class CreateCaptureRequestBuilderTest extends TestCase /** * @dataProvider invalidVatIdDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidTaxSystemId($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreateCaptureRequestBuilder(); $builder->setTaxSystemCode($value); } @@ -432,15 +433,15 @@ class CreateCaptureRequestBuilderTest extends TestCase ), 'items' => array( array( - 'description' => 'test', - 'quantity' => 123, - 'amount' => array( - 'value' => 321, + 'description' => 'test', + 'quantity' => 123, + 'amount' => array( + 'value' => 321, 'currency' => 'USD', ), - 'vat_code' => Random::int(1, 6), + 'vat_code' => Random::int(1, 6), 'payment_subject' => PaymentSubject::COMMODITY, - 'payment_mode' => PaymentMode::PARTIAL_PREPAYMENT, + 'payment_mode' => PaymentMode::PARTIAL_PREPAYMENT, ), ), ); @@ -468,12 +469,12 @@ class CreateCaptureRequestBuilderTest extends TestCase /** * @dataProvider invalidReceiptDataProvider - * @expectedException \InvalidArgumentException * * @param mixed $value */ public function testSetInvalidReceipt($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreateCaptureRequestBuilder(); $builder->setReceipt($value); } @@ -487,7 +488,7 @@ class CreateCaptureRequestBuilderTest extends TestCase array(1), array(1.1), array('test'), - array(new \stdClass()), + array(new stdClass()), ); } @@ -498,7 +499,7 @@ class CreateCaptureRequestBuilderTest extends TestCase */ public function testBuild($options) { - $builder = new CreateCaptureRequestBuilder(); + $builder = new CreateCaptureRequestBuilder(); $instance = $builder->build($options); if (!empty($options['amount'])) { self::assertNotNull($instance->getAmount()); @@ -520,19 +521,19 @@ class CreateCaptureRequestBuilderTest extends TestCase $result = array( array( array( - 'amount' => null, - 'currency' => Random::value(CurrencyCode::getValidValues()), - 'receiptItems' => array( + 'amount' => null, + 'currency' => Random::value(CurrencyCode::getValidValues()), + 'receiptItems' => array( array( - 'title' => 'test', + 'title' => 'test', 'quantity' => mt_rand(1, 100), - 'price' => mt_rand(1, 100), - 'vatCode' => mt_rand(1, 6), + 'price' => mt_rand(1, 100), + 'vatCode' => mt_rand(1, 6), ), $receiptItem, ), - 'receiptEmail' => Random::str(32), - 'receiptPhone' => null, + 'receiptEmail' => Random::str(32), + 'receiptPhone' => null, 'taxSystemCode' => null, 'transfers' => null, 'deal' => null, @@ -541,12 +542,12 @@ class CreateCaptureRequestBuilderTest extends TestCase ), ); for ($i = 0; $i < 10; $i++) { - $request = array( - 'receiptItems' => array(), - 'amount' => Random::int(1, 1000000), - 'currency' => Random::value(CurrencyCode::getValidValues()), - 'receiptEmail' => null, - 'receiptPhone' => Random::str(10, '0123456789'), + $request = array( + 'receiptItems' => array(), + 'amount' => Random::int(1, 1000000), + 'currency' => Random::value(CurrencyCode::getValidValues()), + 'receiptEmail' => null, + 'receiptPhone' => Random::str(10, '0123456789'), 'taxSystemCode' => Random::int(1, 6), 'transfers' => array( new Transfer(array( @@ -581,7 +582,7 @@ class CreateCaptureRequestBuilderTest extends TestCase return array( array(-1), array(Random::str(10)), - array(new \stdClass()), + array(new stdClass()), array(true), array(false), ); @@ -594,7 +595,7 @@ class CreateCaptureRequestBuilderTest extends TestCase array(null), array(''), array(-1), - array(new \stdClass()), + array(new stdClass()), array(Random::str(10)), array(true), array(false), @@ -607,14 +608,14 @@ class CreateCaptureRequestBuilderTest extends TestCase array(array()), array(true), array(false), - array(new \stdClass()), + array(new stdClass()), ); } public function invalidPhoneDataProvider() { return array( - array(new \stdClass()), + array(new stdClass()), array(array()), array(true), array(false), @@ -627,7 +628,7 @@ class CreateCaptureRequestBuilderTest extends TestCase array(array()), array(true), array(false), - array(new \stdClass()), + array(new stdClass()), array(0), array(7), array(Random::int(-100, -1)), @@ -644,7 +645,7 @@ class CreateCaptureRequestBuilderTest extends TestCase return array( array(true), array(false), - array(new \stdClass()), + array(new stdClass()), array(0), array(7), array(Random::int(-100, -1)), @@ -654,11 +655,11 @@ class CreateCaptureRequestBuilderTest extends TestCase /** * @dataProvider invalidDealDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidDeal($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreateCaptureRequestBuilder(); $builder->setDeal($value); } diff --git a/tests/Request/Payments/Payment/CreateCaptureRequestSerializerTest.php b/tests/Request/Payments/Payment/CreateCaptureRequestSerializerTest.php index 0d83d4af..dcd9dc06 100644 --- a/tests/Request/Payments/Payment/CreateCaptureRequestSerializerTest.php +++ b/tests/Request/Payments/Payment/CreateCaptureRequestSerializerTest.php @@ -217,7 +217,7 @@ class CreateCaptureRequestSerializerTest extends TestCase 'phone' => Random::str(12, '0123456789'), 'email' => Random::str(10), 'full_name' => Random::str(1, 256), - 'inn' => Random::str(12, 12, '1234567890') + 'inn' => Random::str(12, 12, '1234567890') ), 'tax_system_code' => Random::int(1, 6), ), @@ -230,7 +230,7 @@ class CreateCaptureRequestSerializerTest extends TestCase ); for ($i = 0; $i < 10; $i++) { $request = array( - 'amount' => array( + 'amount' => array( 'value' => (float)mt_rand(1, 1000000), 'currency' => $currencies[mt_rand(0, count($currencies) - 1)], ), diff --git a/tests/Request/Payments/Payment/CreateCaptureRequestTest.php b/tests/Request/Payments/Payment/CreateCaptureRequestTest.php index 032078d3..c668307a 100644 --- a/tests/Request/Payments/Payment/CreateCaptureRequestTest.php +++ b/tests/Request/Payments/Payment/CreateCaptureRequestTest.php @@ -193,18 +193,18 @@ class CreateCaptureRequestTest extends TestCase ) : null, 'airline' => Random::bool() ? array( 'booking_reference' => Random::str(3, 10), - 'ticket_number' => Random::str(10, '0123456789'), - 'passengers' => array( + 'ticket_number' => Random::str(10, '0123456789'), + 'passengers' => array( array( 'first_name' => Random::str(3, 10), - 'last_name' => Random::str(3, 10), + 'last_name' => Random::str(3, 10), ), ), - 'legs' => array( + 'legs' => array( array( - 'departure_airport' => Random::str(3, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), + 'departure_airport' => Random::str(3, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), 'destination_airport' => Random::str(3, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), - 'departure_date' => date('Y-m-d', Random::int(11111111, time())), + 'departure_date' => date('Y-m-d', Random::int(11111111, time())), ), ), ) : null diff --git a/tests/Request/Payments/Payment/CreateCaptureResponseTest.php b/tests/Request/Payments/Payment/CreateCaptureResponseTest.php index 1c1caf10..57730d41 100644 --- a/tests/Request/Payments/Payment/CreateCaptureResponseTest.php +++ b/tests/Request/Payments/Payment/CreateCaptureResponseTest.php @@ -25,10 +25,10 @@ namespace Tests\YooKassa\Request\Payments\Payment; -use Tests\YooKassa\Request\Payments\AbstractPaymentResponseTest; +use Tests\YooKassa\Request\Payments\AbstractPaymentResponseTestCase; use YooKassa\Request\Payments\Payment\CreateCaptureResponse; -class CreateCaptureResponseTest extends AbstractPaymentResponseTest +class CreateCaptureResponseTest extends AbstractPaymentResponseTestCase { protected function getTestInstance($options) { diff --git a/tests/Request/Payments/PaymentResponseTest.php b/tests/Request/Payments/PaymentResponseTest.php index bf85cfe8..ffc90e7e 100644 --- a/tests/Request/Payments/PaymentResponseTest.php +++ b/tests/Request/Payments/PaymentResponseTest.php @@ -27,7 +27,7 @@ namespace Tests\YooKassa\Request\Payments; use YooKassa\Request\Payments\PaymentResponse; -class PaymentResponseTest extends AbstractPaymentResponseTest +class PaymentResponseTest extends AbstractPaymentResponseTestCase { protected function getTestInstance($options) { diff --git a/tests/Request/Payments/PaymentsRequestBuilderTest.php b/tests/Request/Payments/PaymentsRequestBuilderTest.php index 40890f51..74a0ecbb 100644 --- a/tests/Request/Payments/PaymentsRequestBuilderTest.php +++ b/tests/Request/Payments/PaymentsRequestBuilderTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Request\Payments; +use Exception; use PHPUnit\Framework\TestCase; use YooKassa\Model\PaymentMethodType; use YooKassa\Model\PaymentStatus; @@ -75,7 +76,7 @@ class PaymentsRequestBuilderTest extends TestCase /** * @dataProvider validDataProvider * @param $options - * @throws \Exception + * @throws Exception */ public function testSetCreatedGt($options) { @@ -96,7 +97,7 @@ class PaymentsRequestBuilderTest extends TestCase /** * @dataProvider validDataProvider * @param $options - * @throws \Exception + * @throws Exception */ public function testSetCreatedLte($options) { @@ -157,7 +158,7 @@ class PaymentsRequestBuilderTest extends TestCase /** * @dataProvider validDataProvider * @param $options - * @throws \Exception + * @throws Exception */ public function testSetCapturedGt($options) { @@ -178,7 +179,7 @@ class PaymentsRequestBuilderTest extends TestCase /** * @dataProvider validDataProvider * @param $options - * @throws \Exception + * @throws Exception */ public function testSetCapturedLte($options) { @@ -279,56 +280,56 @@ class PaymentsRequestBuilderTest extends TestCase public function validDataProvider() { - $result = array( + $result = array( array( array( - 'createdAtGte' => null, - 'createdAtGt' => null, - 'createdAtLte' => null, - 'createdAtLt' => null, - 'capturedAtGte' => null, - 'capturedAtGt' => null, - 'capturedAtLte' => null, - 'capturedAtLt' => null, - 'paymentMethod' => null, - 'status' => null, - 'limit' => null, - 'cursor' => null, + 'createdAtGte' => null, + 'createdAtGt' => null, + 'createdAtLte' => null, + 'createdAtLt' => null, + 'capturedAtGte' => null, + 'capturedAtGt' => null, + 'capturedAtLte' => null, + 'capturedAtLt' => null, + 'paymentMethod' => null, + 'status' => null, + 'limit' => null, + 'cursor' => null, ), ), array( array( - 'createdAtGte' => '', - 'createdAtGt' => '', - 'createdAtLte' => '', - 'createdAtLt' => '', - 'capturedAtGte' => '', - 'capturedAtGt' => '', - 'capturedAtLte' => '', - 'capturedAtLt' => '', - 'paymentMethod' => '', - 'status' => '', - 'limit' => 0, - 'cursor' => '', + 'createdAtGte' => '', + 'createdAtGt' => '', + 'createdAtLte' => '', + 'createdAtLt' => '', + 'capturedAtGte' => '', + 'capturedAtGt' => '', + 'capturedAtLte' => '', + 'capturedAtLt' => '', + 'paymentMethod' => '', + 'status' => '', + 'limit' => 0, + 'cursor' => '', ), ), ); $statuses = PaymentStatus::getValidValues(); - $methods = PaymentMethodType::getValidValues(); + $methods = PaymentMethodType::getValidValues(); for ($i = 0; $i < 10; $i++) { - $request = array( - 'createdAtGte' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'createdAtGt' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'createdAtLte' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'createdAtLt' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'capturedAtGte' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'capturedAtGt' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'capturedAtLte' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'capturedAtLt' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'paymentMethod' => $methods[mt_rand(0, count($methods) - 1)], - 'status' => $statuses[mt_rand(0, count($statuses) - 1)], - 'limit' => mt_rand(1, 100), - 'cursor' => $this->randomString(mt_rand(1, 30)), + $request = array( + 'createdAtGte' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'createdAtGt' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'createdAtLte' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'createdAtLt' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'capturedAtGte' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'capturedAtGt' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'capturedAtLte' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'capturedAtLt' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'paymentMethod' => $methods[mt_rand(0, count($methods) - 1)], + 'status' => $statuses[mt_rand(0, count($statuses) - 1)], + 'limit' => mt_rand(1, 100), + 'cursor' => $this->randomString(mt_rand(1, 30)), ); $result[] = array($request); } @@ -344,7 +345,7 @@ class PaymentsRequestBuilderTest extends TestCase if ($any) { $char = chr(mt_rand(32, 126)); } else { - $rnd = mt_rand(0, strlen($chars) - 1); + $rnd = mt_rand(0, strlen($chars) - 1); $char = substr($chars, $rnd, 1); } $result .= $char; diff --git a/tests/Request/Payments/PaymentsRequestSerializerTest.php b/tests/Request/Payments/PaymentsRequestSerializerTest.php index 6d895f9c..d5dbd4ae 100644 --- a/tests/Request/Payments/PaymentsRequestSerializerTest.php +++ b/tests/Request/Payments/PaymentsRequestSerializerTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Request\Payments; +use DateTime; use PHPUnit\Framework\TestCase; use YooKassa\Model\PaymentMethodType; use YooKassa\Model\PaymentStatus; @@ -34,18 +35,18 @@ use YooKassa\Request\Payments\PaymentsRequestSerializer; class PaymentsRequestSerializerTest extends TestCase { private $fieldMap = array( - 'createdAtGte' => 'created_at.gte', - 'createdAtGt' => 'created_at.gt', - 'createdAtLte' => 'created_at.lte', - 'createdAtLt' => 'created_at.lt', - 'capturedAtGte' => 'captured_at.gte', - 'capturedAtGt' => 'captured_at.gt', - 'capturedAtLte' => 'captured_at.lte', - 'capturedAtLt' => 'captured_at.lt', - 'status' => 'status', - 'paymentMethod' => 'payment_method', - 'limit' => 'limit', - 'cursor' => 'cursor', + 'createdAtGte' => 'created_at.gte', + 'createdAtGt' => 'created_at.gt', + 'createdAtLte' => 'created_at.lte', + 'createdAtLt' => 'created_at.lt', + 'capturedAtGte' => 'captured_at.gte', + 'capturedAtGt' => 'captured_at.gt', + 'capturedAtLte' => 'captured_at.lte', + 'capturedAtLt' => 'captured_at.lt', + 'status' => 'status', + 'paymentMethod' => 'payment_method', + 'limit' => 'limit', + 'cursor' => 'cursor', ); /** @@ -55,14 +56,14 @@ class PaymentsRequestSerializerTest extends TestCase public function testSerialize($options) { $serializer = new PaymentsRequestSerializer(); - $data = $serializer->serialize(PaymentsRequest::builder()->build($options)); + $data = $serializer->serialize(PaymentsRequest::builder()->build($options)); $expected = array(); foreach ($this->fieldMap as $field => $mapped) { if (isset($options[$field])) { $value = $options[$field]; if (!empty($value)) { - $expected[$mapped] = $value instanceof \DateTime ? $value->format(YOOKASSA_DATE) : $value; + $expected[$mapped] = $value instanceof DateTime ? $value->format(YOOKASSA_DATE) : $value; } } } @@ -71,43 +72,43 @@ class PaymentsRequestSerializerTest extends TestCase public function validDataProvider() { - $result = array( + $result = array( array( array(), ), array( array( - 'createdAtGte' => '', - 'createdAtGt' => '', - 'createdAtLte' => '', - 'createdAtLt' => '', - 'capturedAtGte' => '', - 'capturedAtGt' => '', - 'capturedAtLte' => '', - 'capturedAtLt' => '', - 'paymentMethod' => '', - 'status' => '', - 'limit' => 0, - 'cursor' => '', + 'createdAtGte' => '', + 'createdAtGt' => '', + 'createdAtLte' => '', + 'createdAtLt' => '', + 'capturedAtGte' => '', + 'capturedAtGt' => '', + 'capturedAtLte' => '', + 'capturedAtLt' => '', + 'paymentMethod' => '', + 'status' => '', + 'limit' => 0, + 'cursor' => '', ), ), ); $statuses = PaymentStatus::getValidValues(); - $methods = PaymentMethodType::getValidValues(); + $methods = PaymentMethodType::getValidValues(); for ($i = 0; $i < 10; $i++) { - $request = array( - 'createdAtGte' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'createdAtGt' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'createdAtLte' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'createdAtLt' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'capturedAtGte' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'capturedAtGt' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'capturedAtLte' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'capturedAtLt' => date(YOOKASSA_DATE, mt_rand(1, time())), - 'paymentMethod' => $methods[mt_rand(0, count($methods) - 1)], - 'status' => $statuses[mt_rand(0, count($statuses) - 1)], - 'limit' => mt_rand(1, 100), - 'cursor' => $this->randomString(mt_rand(2, 30)), + $request = array( + 'createdAtGte' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'createdAtGt' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'createdAtLte' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'createdAtLt' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'capturedAtGte' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'capturedAtGt' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'capturedAtLte' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'capturedAtLt' => date(YOOKASSA_DATE, mt_rand(1, time())), + 'paymentMethod' => $methods[mt_rand(0, count($methods) - 1)], + 'status' => $statuses[mt_rand(0, count($statuses) - 1)], + 'limit' => mt_rand(1, 100), + 'cursor' => $this->randomString(mt_rand(2, 30)), ); $result[] = array($request); } @@ -123,7 +124,7 @@ class PaymentsRequestSerializerTest extends TestCase if ($any) { $char = chr(mt_rand(32, 126)); } else { - $rnd = mt_rand(0, strlen($chars) - 1); + $rnd = mt_rand(0, strlen($chars) - 1); $char = substr($chars, $rnd, 1); } $result .= $char; diff --git a/tests/Request/Payments/PaymentsRequestTest.php b/tests/Request/Payments/PaymentsRequestTest.php index 80781a9a..48f9d68b 100644 --- a/tests/Request/Payments/PaymentsRequestTest.php +++ b/tests/Request/Payments/PaymentsRequestTest.php @@ -25,7 +25,9 @@ namespace Tests\YooKassa\Request\Payments; +use DateTime; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Helpers\StringObject; use YooKassa\Model\PaymentMethodType; @@ -54,11 +56,11 @@ class PaymentsRequestTest extends TestCase /** * @dataProvider invalidPageDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidCursor($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCursor($value); } @@ -73,11 +75,11 @@ class PaymentsRequestTest extends TestCase /** * @dataProvider invalidPaymentMethodDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidPaymentMethod($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setPaymentMethod($value); } @@ -97,8 +99,8 @@ class PaymentsRequestTest extends TestCase 'capturedAtLte', 'capturedAtLt', ); - $expected = null; - if ($value instanceof \DateTime) { + $expected = null; + if ($value instanceof DateTime) { $expected = $value->format(YOOKASSA_DATE); } elseif (is_numeric($value)) { $expected = date(YOOKASSA_DATE, $value); @@ -106,87 +108,87 @@ class PaymentsRequestTest extends TestCase $expected = $value; } foreach ($properties as $property) { - $this->getterAndSetterTest($value, $property, empty($expected) ? null : new \DateTime($expected)); + $this->getterAndSetterTest($value, $property, empty($expected) ? null : new DateTime($expected)); } } /** * @dataProvider invalidDateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidCreatedAtGte($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCreatedAtGte($value); } /** * @dataProvider invalidDateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidCreatedAtGt($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCreatedAtGt($value); } /** * @dataProvider invalidDateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidCreatedAtLte($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCreatedAtLte($value); } /** * @dataProvider invalidDateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidCreatedAtLt($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCreatedAtLt($value); } /** * @dataProvider invalidDateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidCapturedAtGte($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCapturedAtGte($value); } /** * @dataProvider invalidDateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidCapturedAtGt($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCapturedAtGt($value); } /** * @dataProvider invalidDateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidCapturedAtLte($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCapturedAtLte($value); } /** * @dataProvider invalidDateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidCapturedAtLt($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCapturedAtLt($value); } @@ -202,11 +204,11 @@ class PaymentsRequestTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidLimit($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setLimit($value); } @@ -221,11 +223,11 @@ class PaymentsRequestTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidStatus($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setStatus($value); } @@ -284,7 +286,7 @@ class PaymentsRequestTest extends TestCase array(''), array(Random::int(0, time())), array(date(YOOKASSA_DATE, Random::int(0, time()))), - array(new \DateTime()), + array(new DateTime()), ); } @@ -313,7 +315,7 @@ class PaymentsRequestTest extends TestCase { return array( array(array()), - array(new \stdClass()), + array(new stdClass()), array(true), array(false), ); @@ -323,7 +325,7 @@ class PaymentsRequestTest extends TestCase { $result = array( array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(10)), array(Random::bytes(10)), array(-1), @@ -338,7 +340,7 @@ class PaymentsRequestTest extends TestCase array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(35)), array(Random::str(37)), array(new StringObject(Random::str(10))), @@ -351,7 +353,7 @@ class PaymentsRequestTest extends TestCase array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(35)), array(Random::str(37)), array(new StringObject(Random::str(10))), @@ -363,7 +365,7 @@ class PaymentsRequestTest extends TestCase { return array( array(array()), - array(new \stdClass()), + array(new stdClass()), array(true), array(false), ); @@ -373,7 +375,7 @@ class PaymentsRequestTest extends TestCase { $getter = 'get' . ucfirst($property); $setter = 'set' . ucfirst($property); - $has = 'has' . ucfirst($property); + $has = 'has' . ucfirst($property); $instance = $this->getTestInstance(); @@ -394,7 +396,7 @@ class PaymentsRequestTest extends TestCase if ($testHas) { self::assertTrue($instance->{$has}()); } - if ($expected instanceof \DateTime) { + if ($expected instanceof DateTime) { self::assertEquals($expected->getTimestamp(), $instance->{$getter}()->getTimestamp()); self::assertEquals($expected->getTimestamp(), $instance->{$property}->getTimestamp()); } else { @@ -421,7 +423,7 @@ class PaymentsRequestTest extends TestCase if ($testHas) { self::assertTrue($instance->{$has}()); } - if ($expected instanceof \DateTime) { + if ($expected instanceof DateTime) { self::assertEquals($expected->getTimestamp(), $instance->{$getter}()->getTimestamp()); self::assertEquals($expected->getTimestamp(), $instance->{$property}->getTimestamp()); } else { diff --git a/tests/Request/Payments/PaymentsResponseTest.php b/tests/Request/Payments/PaymentsResponseTest.php index cd9c00b3..19e69d54 100644 --- a/tests/Request/Payments/PaymentsResponseTest.php +++ b/tests/Request/Payments/PaymentsResponseTest.php @@ -92,10 +92,10 @@ class PaymentsResponseTest extends TestCase /** * @dataProvider invalidDataProvider * @param array $options - * @expectedException \InvalidArgumentException */ public function testInvalidData($options) { + $this->expectException('InvalidArgumentException'); new PaymentsResponse($options); } diff --git a/tests/Request/Payouts/AbstractPayoutResponseTest.php b/tests/Request/Payouts/AbstractPayoutResponseTestCase.php similarity index 95% rename from tests/Request/Payouts/AbstractPayoutResponseTest.php rename to tests/Request/Payouts/AbstractPayoutResponseTestCase.php index dec16b1a..d57ad84d 100644 --- a/tests/Request/Payouts/AbstractPayoutResponseTest.php +++ b/tests/Request/Payouts/AbstractPayoutResponseTestCase.php @@ -34,7 +34,7 @@ use YooKassa\Model\Payout\PayoutCancellationDetailsReasonCode; use YooKassa\Model\PayoutStatus; use YooKassa\Request\Payouts\PayoutResponse; -abstract class AbstractPayoutResponseTest extends TestCase +abstract class AbstractPayoutResponseTestCase extends TestCase { /** * @param $options @@ -198,7 +198,7 @@ abstract class AbstractPayoutResponseTest extends TestCase 'status' => Random::value(PayoutStatus::getValidValues()), 'amount' => array('value' => Random::int(1, 10000), 'currency' => 'RUB'), 'description' => Random::str(1, Payout::MAX_LENGTH_DESCRIPTION), - 'payout_destination' => $payoutDestinations[Random::value(array(PaymentMethodType::YOO_MONEY,PaymentMethodType::BANK_CARD))], + 'payout_destination' => $payoutDestinations[Random::value(array(PaymentMethodType::YOO_MONEY, PaymentMethodType::BANK_CARD))], 'created_at' => date(YOOKASSA_DATE, mt_rand(111111111, time())), 'test' => true, 'deal' => array('id' => Random::str(36, 50)), @@ -213,9 +213,9 @@ abstract class AbstractPayoutResponseTest extends TestCase array( 'id' => Random::str(36, 50), 'status' => Random::value(PayoutStatus::getValidValues()), - 'amount' => array('value' => Random::int(1, 10000), 'currency' => 'RUB'), + 'amount' => array('value' => Random::int(1, 10000), 'currency' => 'RUB'), 'description' => Random::str(1, Payout::MAX_LENGTH_DESCRIPTION), - 'payout_destination' => $payoutDestinations[Random::value(array(PaymentMethodType::YOO_MONEY,PaymentMethodType::BANK_CARD))], + 'payout_destination' => $payoutDestinations[Random::value(array(PaymentMethodType::YOO_MONEY, PaymentMethodType::BANK_CARD))], 'created_at' => date(YOOKASSA_DATE, mt_rand(1, time())), 'test' => true, 'metadata' => null, @@ -227,10 +227,10 @@ abstract class AbstractPayoutResponseTest extends TestCase $payment = array( 'id' => Random::str(36, 50), 'status' => Random::value(PayoutStatus::getValidValues()), - 'amount' => array('value' => Random::int(1, 10000), 'currency' => 'RUB'), + 'amount' => array('value' => Random::int(1, 10000), 'currency' => 'RUB'), 'description' => ($i == 0 ? null : ($i == 1 ? '' : ($i == 2 ? Random::str(Payout::MAX_LENGTH_DESCRIPTION) : Random::str(1, Payout::MAX_LENGTH_DESCRIPTION)))), - 'payout_destination' => $payoutDestinations[Random::value(array(PaymentMethodType::YOO_MONEY,PaymentMethodType::BANK_CARD))], + 'payout_destination' => $payoutDestinations[Random::value(array(PaymentMethodType::YOO_MONEY, PaymentMethodType::BANK_CARD))], 'created_at' => date(YOOKASSA_DATE, mt_rand(1, time())), 'test' => (bool)($i % 2), 'metadata' => array(Random::str(3, 128, 'abcdefghijklmnopqrstuvwxyz') => Random::str(1, 512)), diff --git a/tests/Request/Payouts/CreatePayoutRequestBuilderTest.php b/tests/Request/Payouts/CreatePayoutRequestBuilderTest.php index 91a1a2d3..7a454a84 100644 --- a/tests/Request/Payouts/CreatePayoutRequestBuilderTest.php +++ b/tests/Request/Payouts/CreatePayoutRequestBuilderTest.php @@ -28,6 +28,7 @@ namespace Tests\YooKassa\Request\Payouts; use Exception; use InvalidArgumentException; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\AmountInterface; use YooKassa\Model\CurrencyCode; @@ -173,7 +174,7 @@ class CreatePayoutRequestBuilderTest extends TestCase if (!($options['amount'] instanceof AmountInterface)) { $builder->setAmount(array( - 'value' => $options['amount'], + 'value' => $options['amount'], 'currency' => 'EUR', )); $instance = $builder->build($this->getRequiredData('amount')); @@ -182,13 +183,13 @@ class CreatePayoutRequestBuilderTest extends TestCase } /** - * @expectedException InvalidArgumentException * @dataProvider invalidAmountDataProvider * * @param $value */ public function testSetInvalidAmount($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreatePayoutRequestBuilder(); $builder->setAmount($value); } @@ -295,7 +296,7 @@ class CreatePayoutRequestBuilderTest extends TestCase array(1), array(1.1), array('test'), - array(new \stdClass()), + array(new stdClass()), ); } @@ -326,14 +327,14 @@ class CreatePayoutRequestBuilderTest extends TestCase $result = array( array( array( - 'description' => null, - 'amount' => new MonetaryAmount(Random::int(1, 1000)), - 'currency' => Random::value(CurrencyCode::getValidValues()), - 'payoutToken' => uniqid('', true), - 'paymentMethodId' => null, + 'description' => null, + 'amount' => new MonetaryAmount(Random::int(1, 1000)), + 'currency' => Random::value(CurrencyCode::getValidValues()), + 'payoutToken' => uniqid('', true), + 'paymentMethodId' => null, 'payoutDestinationData' => null, - 'confirmation' => null, - 'metadata' => null, + 'confirmation' => null, + 'metadata' => null, 'deal' => array( 'id' => Random::str(36, 50), ), @@ -343,13 +344,13 @@ class CreatePayoutRequestBuilderTest extends TestCase ), array( array( - 'description' => '', - 'amount' => new MonetaryAmount(Random::int(1, 1000)), - 'currency' => Random::value(CurrencyCode::getValidValues()), - 'payoutToken' => null, - 'paymentMethodId' => '', + 'description' => '', + 'amount' => new MonetaryAmount(Random::int(1, 1000)), + 'currency' => Random::value(CurrencyCode::getValidValues()), + 'payoutToken' => null, + 'paymentMethodId' => '', 'payoutDestinationData' => Random::value($payoutDestinationData), - 'metadata' => array(), + 'metadata' => array(), 'deal' => array( 'id' => Random::str(36, 50), ), @@ -365,14 +366,14 @@ class CreatePayoutRequestBuilderTest extends TestCase ); for ($i = 0; $i < 10; $i++) { $even = (bool)($i % 2); - $request = array( - 'description' => uniqid('', true), - 'amount' => mt_rand(1, 100000), - 'currency' => CurrencyCode::RUB, - 'paymentMethodId' => uniqid('', true), - 'payoutToken' => $even ? null : uniqid('', true), + $request = array( + 'description' => uniqid('', true), + 'amount' => mt_rand(1, 100000), + 'currency' => CurrencyCode::RUB, + 'paymentMethodId' => uniqid('', true), + 'payoutToken' => $even ? null : uniqid('', true), 'payoutDestinationData' => $even ? Random::value($payoutDestinationData) : null, - 'metadata' => array('test' => 'test'), + 'metadata' => array('test' => 'test'), 'deal' => array( 'id' => Random::str(36, 50), ), @@ -399,7 +400,7 @@ class CreatePayoutRequestBuilderTest extends TestCase array(-1), array(true), array(false), - array(new \stdClass()), + array(new stdClass()), array(0), ); } @@ -425,20 +426,20 @@ class CreatePayoutRequestBuilderTest extends TestCase } /** - * @expectedException InvalidArgumentException */ public function testSetInvalidTypeDescription() { + $this->expectException('InvalidArgumentException'); $builder = new CreatePayoutRequestBuilder(); $builder->setDescription(true); } /** - * @expectedException InvalidArgumentException */ public function testSetInvalidLengthDescription() { - $builder = new CreatePayoutRequestBuilder(); + $this->expectException('InvalidArgumentException'); + $builder = new CreatePayoutRequestBuilder(); $description = Random::str(Payout::MAX_LENGTH_DESCRIPTION + 1); $builder->setDescription($description); } @@ -452,7 +453,7 @@ class CreatePayoutRequestBuilderTest extends TestCase return array( array(true), array(false), - array(new \stdClass()), + array(new stdClass()), array(0), array(7), array(Random::int(-100, -1)), @@ -462,11 +463,11 @@ class CreatePayoutRequestBuilderTest extends TestCase /** * @dataProvider invalidDealDataProvider - * @expectedException InvalidArgumentException * @param $value */ public function testSetInvalidDeal($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreatePayoutRequestBuilder(); $builder->setDeal($value); } @@ -480,7 +481,7 @@ class CreatePayoutRequestBuilderTest extends TestCase return array( array(true), array(false), - array(new \stdClass()), + array(new stdClass()), array(0), array(7), array(Random::int(-100, -1)), @@ -490,11 +491,11 @@ class CreatePayoutRequestBuilderTest extends TestCase /** * @dataProvider invalidSelfEmployedProvider - * @expectedException InvalidArgumentException * @param $value */ public function testSetInvalidSelfEmployed($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreatePayoutRequestBuilder(); $builder->setSelfEmployed($value); } diff --git a/tests/Request/Payouts/CreatePayoutRequestSerializerTest.php b/tests/Request/Payouts/CreatePayoutRequestSerializerTest.php index 0e9b5e70..25486616 100644 --- a/tests/Request/Payouts/CreatePayoutRequestSerializerTest.php +++ b/tests/Request/Payouts/CreatePayoutRequestSerializerTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Request\Payouts; +use Exception; use PHPUnit\Framework\TestCase; use YooKassa\Helpers\Random; use YooKassa\Model\CurrencyCode; @@ -50,8 +51,8 @@ class CreatePayoutRequestSerializerTest extends TestCase public function testSerialize($options) { $serializer = new CreatePayoutRequestSerializer(); - $instance = CreatePayoutRequest::builder()->build($options); - $data = $serializer->serialize($instance); + $instance = CreatePayoutRequest::builder()->build($options); + $data = $serializer->serialize($instance); $request = new CreatePayoutRequest($options); $expected = $request->toArray(); @@ -61,7 +62,7 @@ class CreatePayoutRequestSerializerTest extends TestCase /** * @return array - * @throws \Exception + * @throws Exception */ public function validDataProvider() { @@ -109,7 +110,7 @@ class CreatePayoutRequestSerializerTest extends TestCase 'deal' => $even ? new PayoutDealInfo(array('id' => Random::str(36, 50))) : array('id' => Random::str(36, 50)), 'payment_method_id' => Random::str(5, 128), 'self_employed' => $even ? new PayoutSelfEmployedInfo(array('id' => Random::str(36, 50))) : array('id' => Random::str(36, 50)), - 'receipt_data' => $even ? new IncomeReceiptData(array('service_name' => Random::str(36, 50), 'amount' => new MonetaryAmount(Random::int(1, 1000000)))) : array('service_name' => Random::str(36, 50), 'amount' => array('value' => Random::int(1, 1000000).'.00', 'currency' => CurrencyCode::RUB)), + 'receipt_data' => $even ? new IncomeReceiptData(array('service_name' => Random::str(36, 50), 'amount' => new MonetaryAmount(Random::int(1, 1000000)))) : array('service_name' => Random::str(36, 50), 'amount' => array('value' => Random::int(1, 1000000) . '.00', 'currency' => CurrencyCode::RUB)), 'personal_data' => array($even ? new PayoutPersonalData(array('id' => Random::str(36, 50))) : array('id' => Random::str(36, 50))), ); $result[] = array($request); diff --git a/tests/Request/Payouts/CreatePayoutRequestTest.php b/tests/Request/Payouts/CreatePayoutRequestTest.php index 1ce7070d..1e2ec7b6 100644 --- a/tests/Request/Payouts/CreatePayoutRequestTest.php +++ b/tests/Request/Payouts/CreatePayoutRequestTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Request\Payouts; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\CurrencyCode; use YooKassa\Model\Deal\PayoutDealInfo; @@ -61,11 +62,11 @@ class CreatePayoutRequestTest extends TestCase /** * @dataProvider invalidAmountDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidAmountToken($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePayoutRequest(); $instance->setAmount($value); } @@ -135,22 +136,22 @@ class CreatePayoutRequestTest extends TestCase /** * @dataProvider invalidPayoutTokenDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidPayoutToken($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePayoutRequest(); $instance->setPayoutToken($value); } /** * @dataProvider invalidPayoutTokenDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidPayoutToken($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePayoutRequest(); $instance->payoutToken = $value; } @@ -220,33 +221,33 @@ class CreatePayoutRequestTest extends TestCase /** * @dataProvider invalidPaymentMethodIdDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidPaymentMethodId($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePayoutRequest(); $instance->setPaymentMethodId($value); } /** * @dataProvider invalidPaymentMethodIdDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidPaymentMethodId($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePayoutRequest(); $instance->paymentMethodId = $value; } /** * @dataProvider invalidPaymentMethodIdDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidPayout_token($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePayoutRequest(); $instance->payment_method_id = $value; } @@ -299,11 +300,11 @@ class CreatePayoutRequestTest extends TestCase /** * @dataProvider invalidPayoutDestinationDataDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidPayoutDestinationData($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePayoutRequest(); $instance->setPayoutDestinationData($value); } @@ -352,11 +353,11 @@ class CreatePayoutRequestTest extends TestCase /** * @dataProvider invalidDescriptionDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidDescription($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePayoutRequest(); $instance->setDescription($value); } @@ -408,11 +409,11 @@ class CreatePayoutRequestTest extends TestCase /** * @dataProvider invalidDealDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidDeal($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePayoutRequest(); $instance->setDeal($value); } @@ -470,11 +471,11 @@ class CreatePayoutRequestTest extends TestCase /** * @dataProvider invalidSelfEmployedDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidSelfEmployed($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePayoutRequest(); $instance->setSelfEmployed($value); } @@ -532,11 +533,11 @@ class CreatePayoutRequestTest extends TestCase /** * @dataProvider invalidReceiptDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidReceiptData($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePayoutRequest(); $instance->setReceiptData($value); } @@ -605,11 +606,11 @@ class CreatePayoutRequestTest extends TestCase /** * @dataProvider invalidPersonalDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidPersonalData($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePayoutRequest(); $instance->setPersonalData($value); } @@ -661,11 +662,11 @@ class CreatePayoutRequestTest extends TestCase /** * @dataProvider invalidMetadataDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidMetadata($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePayoutRequest(); $instance->setMetadata($value); } @@ -758,7 +759,7 @@ class CreatePayoutRequestTest extends TestCase 'deal' => ($i % 2) ? new PayoutDealInfo(array('id' => Random::str(36, 50))) : array('id' => Random::str(36, 50)), 'payment_method_id' => Random::str(5, 128), 'self_employed' => ($i % 2) ? new PayoutSelfEmployedInfo(array('id' => Random::str(36, 50))) : array('id' => Random::str(36, 50)), - 'receipt_data' => ($i % 2) ? new IncomeReceiptData(array('service_name' => Random::str(36, 50), 'amount' => new MonetaryAmount(Random::int(1, 1000000)))) : array('service_name' => Random::str(36, 50), 'amount' => array('value' => Random::int(1, 1000000).'.00', 'currency' => CurrencyCode::RUB)), + 'receipt_data' => ($i % 2) ? new IncomeReceiptData(array('service_name' => Random::str(36, 50), 'amount' => new MonetaryAmount(Random::int(1, 1000000)))) : array('service_name' => Random::str(36, 50), 'amount' => array('value' => Random::int(1, 1000000) . '.00', 'currency' => CurrencyCode::RUB)), 'personal_data' => array(($i % 2) ? new PayoutPersonalData(array('id' => Random::str(36, 50))) : array('id' => Random::str(36, 50))), ); $result[] = array($request); @@ -773,7 +774,7 @@ class CreatePayoutRequestTest extends TestCase array(''), array(false), array(true), - array(new \stdClass()), + array(new stdClass()), ); } @@ -782,7 +783,7 @@ class CreatePayoutRequestTest extends TestCase return array( array(false), array(true), - array(new \stdClass()), + array(new stdClass()), array(array()), ); } @@ -795,7 +796,7 @@ class CreatePayoutRequestTest extends TestCase array(true), array(1), array(Random::str(10)), - array(new \stdClass()), + array(new stdClass()), ); } @@ -814,7 +815,7 @@ class CreatePayoutRequestTest extends TestCase return array( array(false), array(true), - array(new \stdClass()), + array(new stdClass()), array(Random::str(Payout::MAX_LENGTH_DESCRIPTION + 1)), ); } @@ -824,7 +825,7 @@ class CreatePayoutRequestTest extends TestCase return array( array(false), array(true), - array(new \stdClass()), + array(new stdClass()), array(Random::str(10)), ); } @@ -834,7 +835,7 @@ class CreatePayoutRequestTest extends TestCase return array( array(false), array(true), - array(new \stdClass()), + array(new stdClass()), ); } @@ -843,7 +844,7 @@ class CreatePayoutRequestTest extends TestCase return array( array(false), array(true), - array(new \stdClass()), + array(new stdClass()), array(Random::str(10)), ); } @@ -853,7 +854,7 @@ class CreatePayoutRequestTest extends TestCase return array( array(false), array(true), - array(new \stdClass()), + array(new stdClass()), array(Random::str(10)), ); } @@ -863,9 +864,9 @@ class CreatePayoutRequestTest extends TestCase return array( array(false), array(true), - array(new \stdClass()), + array(new stdClass()), array(Random::str(10)), - array(array(new \stdClass())), + array(array(new stdClass())), ); } diff --git a/tests/Request/Payouts/IncomeReceiptDataTest.php b/tests/Request/Payouts/IncomeReceiptDataTest.php index bfe94ea4..fcf8654f 100644 --- a/tests/Request/Payouts/IncomeReceiptDataTest.php +++ b/tests/Request/Payouts/IncomeReceiptDataTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Request\Payouts; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\MonetaryAmount; use YooKassa\Model\Payout\IncomeReceipt; @@ -69,11 +70,11 @@ class IncomeReceiptDataTest extends TestCase /** * @dataProvider invalidServiceNameDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidServiceName($value) { + $this->expectException('InvalidArgumentException'); $instance = new IncomeReceiptData(); $instance->setServiceName($value); } @@ -92,11 +93,11 @@ class IncomeReceiptDataTest extends TestCase /** * @dataProvider invalidAmountDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidAmountToken($value) { + $this->expectException('InvalidArgumentException'); $instance = new IncomeReceiptData(); $instance->setAmount($value); } @@ -108,7 +109,7 @@ class IncomeReceiptDataTest extends TestCase array(''), array(false), array(true), - array(new \stdClass()), + array(new stdClass()), ); } } diff --git a/tests/Request/Payouts/PayoutDestinationData/AbstractPayoutDestinationDataTest.php b/tests/Request/Payouts/PayoutDestinationData/AbstractPayoutDestinationDataTestCase.php similarity index 92% rename from tests/Request/Payouts/PayoutDestinationData/AbstractPayoutDestinationDataTest.php rename to tests/Request/Payouts/PayoutDestinationData/AbstractPayoutDestinationDataTestCase.php index 4b2fbe20..0e8e390b 100644 --- a/tests/Request/Payouts/PayoutDestinationData/AbstractPayoutDestinationDataTest.php +++ b/tests/Request/Payouts/PayoutDestinationData/AbstractPayoutDestinationDataTestCase.php @@ -26,10 +26,11 @@ namespace Tests\YooKassa\Request\Payouts\PayoutDestinationData; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Request\Payouts\PayoutDestinationData\AbstractPayoutDestinationData; -abstract class AbstractPayoutDestinationDataTest extends TestCase +abstract class AbstractPayoutDestinationDataTestCase extends TestCase { /** * @return AbstractPayoutDestinationData @@ -52,11 +53,11 @@ abstract class AbstractPayoutDestinationDataTest extends TestCase /** * @dataProvider invalidTypeDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testInvalidType($value) { + $this->expectException('InvalidArgumentException'); new TestPaymentData($value); } @@ -68,7 +69,7 @@ abstract class AbstractPayoutDestinationDataTest extends TestCase array(Random::str(40)), array(0), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } } diff --git a/tests/Request/Payouts/PayoutDestinationData/PayoutDestinationDataBankCardTest.php b/tests/Request/Payouts/PayoutDestinationData/PayoutDestinationDataBankCardTest.php index 845ea766..1741997f 100644 --- a/tests/Request/Payouts/PayoutDestinationData/PayoutDestinationDataBankCardTest.php +++ b/tests/Request/Payouts/PayoutDestinationData/PayoutDestinationDataBankCardTest.php @@ -25,12 +25,14 @@ namespace Tests\YooKassa\Request\Payouts\PayoutDestinationData; +use DateTime; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\PaymentMethodType; use YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataBankCard; use YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataBankCardCard; -class PayoutDestinationDataBankCardTest extends AbstractPayoutDestinationDataTest +class PayoutDestinationDataBankCardTest extends AbstractPayoutDestinationDataTestCase { /** * @return PayoutDestinationDataBankCard @@ -97,21 +99,21 @@ class PayoutDestinationDataBankCardTest extends AbstractPayoutDestinationDataTes /** * @dataProvider invalidCardDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidCard($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setCard($value); } /** * @dataProvider invalidCardDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidCard($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->card = $value; } @@ -136,11 +138,11 @@ class PayoutDestinationDataBankCardTest extends AbstractPayoutDestinationDataTes array(-1), array('5'), array(true), - array(new \stdClass()), - array(new \DateTime()), + array(new stdClass()), + array(new DateTime()), array(array('number' => '')), array(array('number' => null)), - array(array('number' => new \DateTime())), + array(array('number' => new DateTime())), array(array('number' => Random::str(16))), ); } diff --git a/tests/Request/Payouts/PayoutDestinationData/PayoutDestinationDataFactoryTest.php b/tests/Request/Payouts/PayoutDestinationData/PayoutDestinationDataFactoryTest.php index ad821001..06b4cb90 100644 --- a/tests/Request/Payouts/PayoutDestinationData/PayoutDestinationDataFactoryTest.php +++ b/tests/Request/Payouts/PayoutDestinationData/PayoutDestinationDataFactoryTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Request\Payouts\PayoutDestinationData; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\Payout\PayoutDestinationType; use YooKassa\Model\PaymentMethodType; @@ -55,11 +56,11 @@ class PayoutDestinationDataFactoryTest extends TestCase /** * @dataProvider invalidTypeDataProvider - * @expectedException \InvalidArgumentException * @param $type */ public function testInvalidFactory($type) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->factory($type); } @@ -93,11 +94,11 @@ class PayoutDestinationDataFactoryTest extends TestCase /** * @dataProvider invalidDataArrayDataProvider - * @expectedException \InvalidArgumentException * @param $options */ public function testInvalidFactoryFromArray($options) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->factoryFromArray($options); } @@ -121,7 +122,7 @@ class PayoutDestinationDataFactoryTest extends TestCase array(-1), array('5'), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(10)), ); } @@ -129,7 +130,7 @@ class PayoutDestinationDataFactoryTest extends TestCase public function validArrayDataProvider() { $result = array( - array( + array( array( 'type' => PaymentMethodType::BANK_CARD, 'card' => new PayoutDestinationDataBankCardCard(), @@ -141,7 +142,7 @@ class PayoutDestinationDataFactoryTest extends TestCase 'account_number' => Random::str(11, 33, '1234567890') ), ), - ); + ); foreach (PayoutDestinationType::getEnabledValues() as $value) { $result[] = array(array('type' => $value)); } diff --git a/tests/Request/Payouts/PayoutDestinationData/PayoutDestinationDataSbpTest.php b/tests/Request/Payouts/PayoutDestinationData/PayoutDestinationDataSbpTest.php index bc68e8f4..9b8861f4 100644 --- a/tests/Request/Payouts/PayoutDestinationData/PayoutDestinationDataSbpTest.php +++ b/tests/Request/Payouts/PayoutDestinationData/PayoutDestinationDataSbpTest.php @@ -25,11 +25,13 @@ namespace Tests\YooKassa\Request\Payouts\PayoutDestinationData; +use DateTime; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\PaymentMethodType; use YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataSbp; -class PayoutDestinationDataSbpTest extends AbstractPayoutDestinationDataTest +class PayoutDestinationDataSbpTest extends AbstractPayoutDestinationDataTestCase { /** * @return PayoutDestinationDataSbp @@ -82,21 +84,21 @@ class PayoutDestinationDataSbpTest extends AbstractPayoutDestinationDataTest /** * @dataProvider invalidPhoneDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidPhone($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setPhone($value); } /** * @dataProvider invalidPhoneDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidPhone($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->phone = $value; } @@ -140,21 +142,21 @@ class PayoutDestinationDataSbpTest extends AbstractPayoutDestinationDataTest /** * @dataProvider invalidBankIdDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidBankId($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setBankId($value); } /** * @dataProvider invalidBankIdDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidBankId($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->bankId = $value; } @@ -173,8 +175,8 @@ class PayoutDestinationDataSbpTest extends AbstractPayoutDestinationDataTest array(null), array(''), array(true), - array(new \stdClass()), - array(new \DateTime()), + array(new stdClass()), + array(new DateTime()), ); } @@ -193,8 +195,8 @@ class PayoutDestinationDataSbpTest extends AbstractPayoutDestinationDataTest array(null), array(''), array(true), - array(new \stdClass()), - array(new \DateTime()), + array(new stdClass()), + array(new DateTime()), array(Random::str(13)), ); } diff --git a/tests/Request/Payouts/PayoutDestinationData/PayoutDestinationDataYooMoneyTest.php b/tests/Request/Payouts/PayoutDestinationData/PayoutDestinationDataYooMoneyTest.php index fc217291..5908e281 100644 --- a/tests/Request/Payouts/PayoutDestinationData/PayoutDestinationDataYooMoneyTest.php +++ b/tests/Request/Payouts/PayoutDestinationData/PayoutDestinationDataYooMoneyTest.php @@ -25,11 +25,13 @@ namespace Tests\YooKassa\Request\Payouts\PayoutDestinationData; +use DateTime; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\PaymentMethodType; use YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataYooMoney; -class PayoutDestinationDataYooMoneyTest extends AbstractPayoutDestinationDataTest +class PayoutDestinationDataYooMoneyTest extends AbstractPayoutDestinationDataTestCase { /** * @return PayoutDestinationDataYooMoney @@ -87,21 +89,21 @@ class PayoutDestinationDataYooMoneyTest extends AbstractPayoutDestinationDataTes /** * @dataProvider invalidAccountNumberDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidAccountNumber($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->setAccountNumber($value); } /** * @dataProvider invalidAccountNumberDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidAccountNumber($value) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance()->account_number = $value; } @@ -123,8 +125,8 @@ class PayoutDestinationDataYooMoneyTest extends AbstractPayoutDestinationDataTes array(null), array(Random::str(34, 50, '0123456789')), array(true), - array(new \stdClass()), - array(new \DateTime()), + array(new stdClass()), + array(new DateTime()), array(Random::str(1, 10, '0123456789')), ); } diff --git a/tests/Request/Payouts/PayoutPersonalDataTest.php b/tests/Request/Payouts/PayoutPersonalDataTest.php index 66eae0a5..5a6a3bdd 100644 --- a/tests/Request/Payouts/PayoutPersonalDataTest.php +++ b/tests/Request/Payouts/PayoutPersonalDataTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Request\Payouts; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Request\Payouts\PayoutPersonalData; @@ -66,22 +67,22 @@ class PayoutPersonalDataTest extends TestCase /** * @dataProvider invalidIdDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidId($value) { + $this->expectException('InvalidArgumentException'); $instance = new PayoutPersonalData(); $instance->setId($value); } /** * @dataProvider invalidIdDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidId($value) { + $this->expectException('InvalidArgumentException'); $instance = new PayoutPersonalData(); $instance->id = $value; } @@ -91,7 +92,7 @@ class PayoutPersonalDataTest extends TestCase return array( array(false), array(true), - array(new \stdClass()), + array(new stdClass()), array(array()), array(Random::str(1, 35)), array(Random::str(51, 60)), diff --git a/tests/Request/Payouts/PayoutResponseTest.php b/tests/Request/Payouts/PayoutResponseTest.php index 6fce960a..26ed79e4 100644 --- a/tests/Request/Payouts/PayoutResponseTest.php +++ b/tests/Request/Payouts/PayoutResponseTest.php @@ -27,7 +27,7 @@ namespace Tests\YooKassa\Request\Payouts; use YooKassa\Request\Payouts\PayoutResponse; -class PayoutResponseTest extends AbstractPayoutResponseTest +class PayoutResponseTest extends AbstractPayoutResponseTestCase { protected function getTestInstance($options) { diff --git a/tests/Request/Payouts/PayoutSelfEmployedInfoTest.php b/tests/Request/Payouts/PayoutSelfEmployedInfoTest.php index 5583a940..ae2d326c 100644 --- a/tests/Request/Payouts/PayoutSelfEmployedInfoTest.php +++ b/tests/Request/Payouts/PayoutSelfEmployedInfoTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Request\Payouts; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Request\Payouts\PayoutSelfEmployedInfo; @@ -66,22 +67,22 @@ class PayoutSelfEmployedInfoTest extends TestCase /** * @dataProvider invalidIdDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidId($value) { + $this->expectException('InvalidArgumentException'); $instance = new PayoutSelfEmployedInfo(); $instance->setId($value); } /** * @dataProvider invalidIdDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidId($value) { + $this->expectException('InvalidArgumentException'); $instance = new PayoutSelfEmployedInfo(); $instance->id = $value; } @@ -91,7 +92,7 @@ class PayoutSelfEmployedInfoTest extends TestCase return array( array(false), array(true), - array(new \stdClass()), + array(new stdClass()), array(array()), array(Random::str(1, 35)), array(Random::str(51, 60)), diff --git a/tests/Request/PersonalData/CreatePersonalDataRequestTest.php b/tests/Request/PersonalData/CreatePersonalDataRequestTest.php index de13b278..150c2616 100644 --- a/tests/Request/PersonalData/CreatePersonalDataRequestTest.php +++ b/tests/Request/PersonalData/CreatePersonalDataRequestTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Request\PersonalData; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\Metadata; use YooKassa\Model\PersonalData\PersonalDataType; @@ -79,11 +80,11 @@ class CreatePersonalDataRequestTest extends TestCase /** * @dataProvider invalidLastNameDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidLastName($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePersonalDataRequest(); $instance->setLastName($value); } @@ -133,11 +134,11 @@ class CreatePersonalDataRequestTest extends TestCase /** * @dataProvider invalidFirstNameDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidFirstName($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePersonalDataRequest(); $instance->setFirstName($value); } @@ -186,11 +187,11 @@ class CreatePersonalDataRequestTest extends TestCase /** * @dataProvider invalidMiddleNameDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidMiddleName($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePersonalDataRequest(); $instance->setMiddleName($value); } @@ -242,22 +243,22 @@ class CreatePersonalDataRequestTest extends TestCase /** * @dataProvider invalidMetadataDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidMetadata($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePersonalDataRequest(); $instance->setMetadata($value); } /** * @dataProvider invalidTypeDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidType($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePersonalDataRequest(); $instance->setType($value); } @@ -329,7 +330,7 @@ class CreatePersonalDataRequestTest extends TestCase return array( array(false), array(true), - array(new \stdClass()), + array(new stdClass()), array(Random::str(10)), ); } @@ -351,7 +352,7 @@ class CreatePersonalDataRequestTest extends TestCase array(''), array(false), array(true), - array(new \stdClass()), + array(new stdClass()), array(Random::str(CreatePersonalDataRequest::MAX_LENGTH_LAST_NAME + 1)), ); } @@ -361,7 +362,7 @@ class CreatePersonalDataRequestTest extends TestCase return array( array(false), array(true), - array(new \stdClass()), + array(new stdClass()), array(Random::str(CreatePersonalDataRequest::MAX_LENGTH_LAST_NAME + 1)), ); } @@ -373,7 +374,7 @@ class CreatePersonalDataRequestTest extends TestCase array(''), array(false), array(true), - array(new \stdClass()), + array(new stdClass()), array(Random::str(CreatePersonalDataRequest::MAX_LENGTH_FIRST_NAME + 1)), ); } diff --git a/tests/Request/Receipts/AbstractReceiptResponseTest.php b/tests/Request/Receipts/AbstractReceiptResponseTestCase.php similarity index 99% rename from tests/Request/Receipts/AbstractReceiptResponseTest.php rename to tests/Request/Receipts/AbstractReceiptResponseTestCase.php index cc6e0e3b..9e44a2e3 100644 --- a/tests/Request/Receipts/AbstractReceiptResponseTest.php +++ b/tests/Request/Receipts/AbstractReceiptResponseTestCase.php @@ -39,7 +39,7 @@ use YooKassa\Request\Receipts\ReceiptResponseInterface; use YooKassa\Request\Receipts\ReceiptResponseItem; use YooKassa\Request\Receipts\ReceiptResponseItemInterface; -abstract class AbstractReceiptResponseTest extends TestCase +abstract class AbstractReceiptResponseTestCase extends TestCase { protected $type; @@ -135,7 +135,8 @@ abstract class AbstractReceiptResponseTest extends TestCase self::assertCount(count($options['receipt_industry_details']), $instance->getReceiptIndustryDetails()); - foreach ($instance->getReceiptIndustryDetails() as $index => $item) { /** @var IndustryDetails $item */ + foreach ($instance->getReceiptIndustryDetails() as $index => $item) { + /** @var IndustryDetails $item */ self::assertTrue($item instanceof IndustryDetails); self::assertArrayHasKey($index, $options['receipt_industry_details']); self::assertEquals($options['receipt_industry_details'][$index]['federal_id'], $item->getFederalId()); diff --git a/tests/Request/Receipts/CreatePostReceiptRequestBuilderTest.php b/tests/Request/Receipts/CreatePostReceiptRequestBuilderTest.php index 365eb474..708daa2e 100644 --- a/tests/Request/Receipts/CreatePostReceiptRequestBuilderTest.php +++ b/tests/Request/Receipts/CreatePostReceiptRequestBuilderTest.php @@ -25,7 +25,9 @@ namespace Tests\YooKassa\Request\Receipts; +use Exception; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\CurrencyCode; use YooKassa\Model\MonetaryAmount; @@ -60,7 +62,7 @@ class CreatePostReceiptRequestBuilderTest extends TestCase } } - /** + /** * @dataProvider validDataProvider * * @param $options @@ -82,7 +84,7 @@ class CreatePostReceiptRequestBuilderTest extends TestCase * @dataProvider validDataProvider * * @param $options - * @throws \Exception + * @throws Exception */ public function testSetCustomer($options) { @@ -103,12 +105,12 @@ class CreatePostReceiptRequestBuilderTest extends TestCase /** * @dataProvider invalidCustomerDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidCustomer($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreatePostReceiptRequestBuilder(); $builder->setCustomer($value); } @@ -160,12 +162,12 @@ class CreatePostReceiptRequestBuilderTest extends TestCase /** * @dataProvider invalidVatIdDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidType($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreatePostReceiptRequestBuilder(); $builder->setType($value); } @@ -191,12 +193,12 @@ class CreatePostReceiptRequestBuilderTest extends TestCase /** * @dataProvider invalidBooleanDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidSend($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreatePostReceiptRequestBuilder(); $builder->setType($value); } @@ -222,12 +224,12 @@ class CreatePostReceiptRequestBuilderTest extends TestCase /** * @dataProvider invalidVatIdDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidTaxSystemId($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreatePostReceiptRequestBuilder(); $builder->setTaxSystemCode($value); } @@ -236,7 +238,7 @@ class CreatePostReceiptRequestBuilderTest extends TestCase * @dataProvider validDataProvider * * @param $options - * @throws \Exception + * @throws Exception */ public function testSetAdditionalUserProps($options) { @@ -257,12 +259,12 @@ class CreatePostReceiptRequestBuilderTest extends TestCase /** * @dataProvider invalidAdditionalUserPropsDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidAdditionalProps($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreatePostReceiptRequestBuilder(); $builder->setAdditionalUserProps($value); } @@ -271,7 +273,7 @@ class CreatePostReceiptRequestBuilderTest extends TestCase * @dataProvider validDataProvider * * @param $options - * @throws \Exception + * @throws Exception */ public function testSetReceiptIndustryDetails($options) { @@ -288,12 +290,12 @@ class CreatePostReceiptRequestBuilderTest extends TestCase /** * @dataProvider invalidReceiptIndustryDetailsDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidReceiptIndustryDetails($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreatePostReceiptRequestBuilder(); $builder->setReceiptIndustryDetails($value); } @@ -302,7 +304,7 @@ class CreatePostReceiptRequestBuilderTest extends TestCase * @dataProvider validDataProvider * * @param $options - * @throws \Exception + * @throws Exception */ public function testSetReceiptOperationalDetails($options) { @@ -323,12 +325,12 @@ class CreatePostReceiptRequestBuilderTest extends TestCase /** * @dataProvider invalidReceiptOperationalDetailsDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidReceiptOperationalDetails($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreatePostReceiptRequestBuilder(); $builder->setReceiptOperationalDetails($value); } @@ -522,7 +524,7 @@ class CreatePostReceiptRequestBuilderTest extends TestCase array(-1), array(true), array(false), - array(new \stdClass()), + array(new stdClass()), array(0), ); } @@ -542,7 +544,7 @@ class CreatePostReceiptRequestBuilderTest extends TestCase array(array()), array(true), array(false), - array(new \stdClass()), + array(new stdClass()), array(0), array(7), array(Random::int(-100, -1)), @@ -554,7 +556,7 @@ class CreatePostReceiptRequestBuilderTest extends TestCase { return array( array(array()), - array(new \stdClass()), + array(new stdClass()), array('test'), ); } @@ -562,7 +564,7 @@ class CreatePostReceiptRequestBuilderTest extends TestCase public function invalidAdditionalUserPropsDataProvider() { return array( - array(new \stdClass()), + array(new stdClass()), array('test'), array(array( 'name' => null, @@ -590,7 +592,7 @@ class CreatePostReceiptRequestBuilderTest extends TestCase public function invalidReceiptOperationalDetailsDataProvider() { return array( - array(new \stdClass()), + array(new stdClass()), array(true), array(Random::str(1, 100)), ); @@ -599,11 +601,11 @@ class CreatePostReceiptRequestBuilderTest extends TestCase public function invalidReceiptIndustryDetailsDataProvider() { return array( - array(new \stdClass()), + array(new stdClass()), array( array( - new \stdClass(), - new \stdClass(), + new stdClass(), + new stdClass(), ) ), array(true), diff --git a/tests/Request/Receipts/CreatePostReceiptRequestSerializerTest.php b/tests/Request/Receipts/CreatePostReceiptRequestSerializerTest.php index 77ef8593..9ecd2814 100644 --- a/tests/Request/Receipts/CreatePostReceiptRequestSerializerTest.php +++ b/tests/Request/Receipts/CreatePostReceiptRequestSerializerTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Request\Payments; +use Exception; use PHPUnit\Framework\TestCase; use YooKassa\Helpers\Random; use YooKassa\Model\CurrencyCode; @@ -157,7 +158,7 @@ class CreatePostReceiptRequestSerializerTest extends TestCase /** * @param int $count * @return array - * @throws \Exception + * @throws Exception */ private function getReceiptItems($count) { @@ -186,7 +187,7 @@ class CreatePostReceiptRequestSerializerTest extends TestCase /** * @param int $count * @return array - * @throws \Exception + * @throws Exception */ private function getSettlements($count) { diff --git a/tests/Request/Receipts/CreatePostReceiptRequestTest.php b/tests/Request/Receipts/CreatePostReceiptRequestTest.php index 51f9f40f..640aab1f 100644 --- a/tests/Request/Receipts/CreatePostReceiptRequestTest.php +++ b/tests/Request/Receipts/CreatePostReceiptRequestTest.php @@ -25,7 +25,9 @@ namespace Tests\YooKassa\Request\Receipts; +use Exception; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Common\Exceptions\EmptyPropertyValueException; use YooKassa\Helpers\Random; use YooKassa\Model\Airline; @@ -85,11 +87,11 @@ class CreatePostReceiptRequestTest extends TestCase /** * @dataProvider invalidCustomerDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidCustomer($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePostReceiptRequest(); $instance->setCustomer($value); } @@ -113,11 +115,11 @@ class CreatePostReceiptRequestTest extends TestCase /** * @dataProvider invalidTypeDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidType($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePostReceiptRequest(); $instance->setType($value); } @@ -153,10 +155,10 @@ class CreatePostReceiptRequestTest extends TestCase self::assertFalse($instance->validate()); $instance->setSettlements(array( - new Settlement(array( - 'type' => SettlementType::PREPAYMENT, - 'amount' => new ReceiptItemAmount(10, 'RUB'))) - )); + new Settlement(array( + 'type' => SettlementType::PREPAYMENT, + 'amount' => new ReceiptItemAmount(10, 'RUB'))) + )); self::assertFalse($instance->validate()); $instance->setItems(array()); @@ -222,7 +224,7 @@ class CreatePostReceiptRequestTest extends TestCase /** * @dataProvider fromArraySettlementDataProvider * @param array $options - * @throws \Exception + * @throws Exception */ public function testSettlementFromArray($options) { @@ -242,12 +244,11 @@ class CreatePostReceiptRequestTest extends TestCase /** * @dataProvider invalidSetsDataProvider - * @expectedException \InvalidArgumentException - * @expectedException EmptyPropertyValueException * @param $value */ public function testSetInvalidItems($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePostReceiptRequest(); $instance->setItems($value); } @@ -261,11 +262,11 @@ class CreatePostReceiptRequestTest extends TestCase /** * @dataProvider invalidTaxSystemCodeDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidTaxSystemCode($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePostReceiptRequest(); $instance->setTaxSystemCode($value); } @@ -279,12 +280,11 @@ class CreatePostReceiptRequestTest extends TestCase /** * @dataProvider invalidSetsDataProvider - * @expectedException \InvalidArgumentException - * @expectedException EmptyPropertyValueException * @param $value */ public function testSetInvalidSettlements($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePostReceiptRequest(); $instance->setSettlements($value); } @@ -309,12 +309,11 @@ class CreatePostReceiptRequestTest extends TestCase /** * @dataProvider invalidSetOnBehalfOfDataProvider - * @expectedException \InvalidArgumentException - * @expectedException EmptyPropertyValueException * @param $value */ public function testSetInvalidOnBehalfOf($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePostReceiptRequest(); $instance->setOnBehalfOf($value); } @@ -345,11 +344,11 @@ class CreatePostReceiptRequestTest extends TestCase /** * @dataProvider invalidBooleanDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidSend($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreatePostReceiptRequest(); $instance->setSend($value); } @@ -404,7 +403,7 @@ class CreatePostReceiptRequestTest extends TestCase /** * @return \array[][][] - * @throws \Exception + * @throws Exception */ public function fromArraySettlementDataProvider() { @@ -419,7 +418,7 @@ class CreatePostReceiptRequestTest extends TestCase /** * @return array - * @throws \Exception + * @throws Exception */ private function generateSettlements() { @@ -436,7 +435,7 @@ class CreatePostReceiptRequestTest extends TestCase /** * @param $true * @return array|Settlement - * @throws \Exception + * @throws Exception */ private function generateSettlement($true) { @@ -543,7 +542,7 @@ class CreatePostReceiptRequestTest extends TestCase /** * @return array - * @throws \Exception + * @throws Exception */ public function validDataProvider() { @@ -643,7 +642,7 @@ class CreatePostReceiptRequestTest extends TestCase array(true), array(1), array(Random::str(10)), - array(new \stdClass()), + array(new stdClass()), ); } @@ -654,7 +653,7 @@ class CreatePostReceiptRequestTest extends TestCase array(true), array(1), array(Random::str(10)), - array(new \stdClass()) + array(new stdClass()) ); } @@ -683,7 +682,7 @@ class CreatePostReceiptRequestTest extends TestCase { return array( array(array()), - array(new \stdClass()), + array(new stdClass()), array('test'), ); } @@ -692,7 +691,7 @@ class CreatePostReceiptRequestTest extends TestCase { return array( array(null), - array(new \stdClass()), + array(new stdClass()), ); } } diff --git a/tests/Request/Receipts/PaymentReceiptResponseTest.php b/tests/Request/Receipts/PaymentReceiptResponseTest.php index 315fe2e5..67d867c0 100644 --- a/tests/Request/Receipts/PaymentReceiptResponseTest.php +++ b/tests/Request/Receipts/PaymentReceiptResponseTest.php @@ -25,6 +25,8 @@ namespace Tests\YooKassa\Request\Receipts; +use Exception; +use stdClass; use YooKassa\Common\Exceptions\InvalidPropertyValueException; use YooKassa\Common\Exceptions\InvalidPropertyValueTypeException; use YooKassa\Helpers\Random; @@ -33,7 +35,7 @@ use YooKassa\Model\SettlementInterface; use YooKassa\Request\Receipts\PaymentReceiptResponse; use YooKassa\Request\Receipts\ReceiptResponseItemInterface; -class PaymentReceiptResponseTest extends AbstractReceiptResponseTest +class PaymentReceiptResponseTest extends AbstractReceiptResponseTestCase { protected $type = 'payment'; @@ -46,17 +48,17 @@ class PaymentReceiptResponseTest extends AbstractReceiptResponseTest { $array = array( Random::str(30), - new \stdClass(), + new stdClass(), array(), - new \stdClass(), - new \Exception(), + new stdClass(), + new Exception(), new Airline(), Random::str(40), array(new Airline()), ); $options['payment_id'] = !$this->valid ? (Random::value($array)) - : Random::value(array( null, '', Random::str(PaymentReceiptResponse::LENGTH_PAYMENT_ID))); + : Random::value(array(null, '', Random::str(PaymentReceiptResponse::LENGTH_PAYMENT_ID))); return $options; } @@ -158,10 +160,10 @@ class PaymentReceiptResponseTest extends AbstractReceiptResponseTest /** * @dataProvider invalidAllDataProvider * @param array $options - * @expectedException \InvalidArgumentException */ public function testInvalidIdData($options) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(null); $instance->setId($options); } @@ -169,10 +171,10 @@ class PaymentReceiptResponseTest extends AbstractReceiptResponseTest /** * @dataProvider invalidAllDataProvider * @param array $options - * @expectedException \InvalidArgumentException */ public function testInvalidTypeData($options) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(null); $instance->setType($options); } @@ -180,10 +182,10 @@ class PaymentReceiptResponseTest extends AbstractReceiptResponseTest /** * @dataProvider invalidBoolDataProvider * @param array $options - * @expectedException \InvalidArgumentException */ public function testInvalidObjectIdData($options) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(null); $instance->setObjectId($options); } @@ -191,10 +193,10 @@ class PaymentReceiptResponseTest extends AbstractReceiptResponseTest /** * @dataProvider invalidAllDataProvider * @param array $options - * @expectedException \InvalidArgumentException */ public function testInvalidStatusIdData($options) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(null); $instance->setStatus($options); } @@ -202,10 +204,10 @@ class PaymentReceiptResponseTest extends AbstractReceiptResponseTest /** * @dataProvider invalidBoolDataProvider * @param array $options - * @expectedException \InvalidArgumentException */ public function testInvalidFiscalDocumentNumberData($options) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(null); $instance->setFiscalDocumentNumber($options); } @@ -213,10 +215,10 @@ class PaymentReceiptResponseTest extends AbstractReceiptResponseTest /** * @dataProvider invalidItemsSettlementsDataProvider * @param array $options - * @expectedException \InvalidArgumentException */ public function testInvalidItemsData($options) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(null); $instance->setItems($options); } @@ -224,10 +226,10 @@ class PaymentReceiptResponseTest extends AbstractReceiptResponseTest /** * @dataProvider invalidItemsSettlementsDataProvider * @param array $options - * @expectedException \InvalidArgumentException */ public function testInvalidSettlementsData($options) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(null); $instance->setSettlements($options); } @@ -235,10 +237,10 @@ class PaymentReceiptResponseTest extends AbstractReceiptResponseTest /** * @dataProvider invalidAllDataProvider * @param array $options - * @expectedException \InvalidArgumentException */ public function testInvalidTaxSystemCodeData($options) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(null); $instance->setTaxSystemCode($options); } @@ -246,10 +248,10 @@ class PaymentReceiptResponseTest extends AbstractReceiptResponseTest /** * @dataProvider invalidBoolNullDataProvider * @param array $options - * @expectedException \InvalidArgumentException */ public function testInvalidOnBehalfOfData($options) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(null); $instance->setOnBehalfOf($options); } @@ -257,10 +259,10 @@ class PaymentReceiptResponseTest extends AbstractReceiptResponseTest /** * @dataProvider invalidFromArray * @param array $options - * @expectedException \InvalidArgumentException */ public function testInvalidFromArray($options) { + $this->expectException('InvalidArgumentException'); $this->getTestInstance($options); } } diff --git a/tests/Request/Receipts/ReceiptResponseFactoryTest.php b/tests/Request/Receipts/ReceiptResponseFactoryTest.php index 289547b9..9d1dc5a6 100644 --- a/tests/Request/Receipts/ReceiptResponseFactoryTest.php +++ b/tests/Request/Receipts/ReceiptResponseFactoryTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Request\Receipts; +use stdClass; use YooKassa\Model\Receipt\SettlementType; use YooKassa\Model\ReceiptType; use YooKassa\Request\Receipts\ReceiptResponseFactory; @@ -35,10 +36,10 @@ class ReceiptResponseFactoryTest extends TestCase /** * @dataProvider invalidFactoryDataProvider * @param array $value - * @expectedException \InvalidArgumentException */ public function testInvalidFactory($value) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptResponseFactory(); $instance->factory($value); } @@ -48,7 +49,7 @@ class ReceiptResponseFactoryTest extends TestCase return array( array(array()), array( - array('type' => new \stdClass())), + array('type' => new stdClass())), array( array('type' => SettlementType::POSTPAYMENT)), array( diff --git a/tests/Request/Receipts/ReceiptResponseItemTest.php b/tests/Request/Receipts/ReceiptResponseItemTest.php index e6c55d10..2a625f1e 100644 --- a/tests/Request/Receipts/ReceiptResponseItemTest.php +++ b/tests/Request/Receipts/ReceiptResponseItemTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Request\Receipts; +use stdClass; use YooKassa\Common\Exceptions\EmptyPropertyValueException; use YooKassa\Helpers\ProductCode; use YooKassa\Helpers\Random; @@ -313,11 +314,10 @@ class ReceiptResponseItemTest extends TestCase * @dataProvider invalidCountryOfOriginCodeDataProvider * @param array $options * - * @expectedException \InvalidArgumentException - * @expectedException EmptyPropertyValueException */ public function testSetCountryOfOriginCodeInvalidData($options) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptResponseItem(); $instance->setCountryOfOriginCode($options); } @@ -410,11 +410,10 @@ class ReceiptResponseItemTest extends TestCase /** * @dataProvider invalidDescriptionDataProvider * @param $options - * @expectedException \InvalidArgumentException - * @expectedException EmptyPropertyValueException */ public function testSetDescriptionInvalidData($options) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptResponseItem(); $instance->setDescription($options); } @@ -422,11 +421,10 @@ class ReceiptResponseItemTest extends TestCase /** * @dataProvider invalidQuantityDataProvider * @param $options - * @expectedException \InvalidArgumentException - * @expectedException EmptyPropertyValueException */ public function testSetQuantityInvalidData($options) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptResponseItem(); $instance->setQuantity($options); } @@ -434,11 +432,10 @@ class ReceiptResponseItemTest extends TestCase /** * @dataProvider invalidMeasureDataProvider * @param $options - * @expectedException \InvalidArgumentException - * @expectedException EmptyPropertyValueException */ public function testSetMeasureInvalidData($options) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptResponseItem(); $instance->setMeasure($options); } @@ -446,11 +443,10 @@ class ReceiptResponseItemTest extends TestCase /** * @dataProvider invalidVatCodeDataProvider * @param $options - * @expectedException \InvalidArgumentException - * @expectedException EmptyPropertyValueException */ public function testSetVatCodeInvalidData($options) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptResponseItem(); $instance->setVatCode($options); } @@ -458,10 +454,10 @@ class ReceiptResponseItemTest extends TestCase /** * @dataProvider invalidExciseDataProvider * @param $options - * @expectedException \InvalidArgumentException */ public function testSetExciseInvalidData($options) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptResponseItem(); $instance->setExcise($options); } @@ -469,10 +465,10 @@ class ReceiptResponseItemTest extends TestCase /** * @dataProvider invalidProductCodeDataProvider * @param $options - * @expectedException \InvalidArgumentException */ public function testSetProductCodeInvalidData($options) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptResponseItem(); $instance->setProductCode($options); } @@ -480,11 +476,10 @@ class ReceiptResponseItemTest extends TestCase /** * @dataProvider invalidPaymentDataProvider * @param $options - * @expectedException \InvalidArgumentException - * @expectedException EmptyPropertyValueException */ public function testSetPaymentSubjectInvalidData($options) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptResponseItem(); $instance->setPaymentSubject($options); } @@ -492,11 +487,10 @@ class ReceiptResponseItemTest extends TestCase /** * @dataProvider invalidPaymentDataProvider * @param $options - * @expectedException \InvalidArgumentException - * @expectedException EmptyPropertyValueException */ public function testSetPaymentModeInvalidData($options) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptResponseItem(); $instance->setPaymentMode($options); } @@ -504,11 +498,10 @@ class ReceiptResponseItemTest extends TestCase /** * @dataProvider invalidSupplierDataProvider * @param $options - * @expectedException \InvalidArgumentException - * @expectedException EmptyPropertyValueException */ public function testSetSupplierInvalidData($options) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptResponseItem(); $instance->setSupplier($options); } @@ -516,11 +509,10 @@ class ReceiptResponseItemTest extends TestCase /** * @dataProvider invalidAgentTypeDataProvider * @param $options - * @expectedException \InvalidArgumentException - * @expectedException EmptyPropertyValueException */ public function testSetAgentTypeInvalidData($options) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptResponseItem(); $instance->setAgentType($options); } @@ -528,11 +520,10 @@ class ReceiptResponseItemTest extends TestCase /** * @dataProvider invalidMarkCodeInfoDataProvider * @param $options - * @expectedException \InvalidArgumentException - * @expectedException EmptyPropertyValueException */ public function testSetMarkCodeInfoInvalidData($options) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptResponseItem(); $instance->setMarkCodeInfo($options); } @@ -540,11 +531,10 @@ class ReceiptResponseItemTest extends TestCase /** * @dataProvider invalidMarkModeDataProvider * @param $options - * @expectedException \InvalidArgumentException - * @expectedException EmptyPropertyValueException */ public function testSetMarkModeInvalidData($options) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptResponseItem(); $instance->setMarkMode($options); } @@ -552,35 +542,34 @@ class ReceiptResponseItemTest extends TestCase /** * @dataProvider invalidMarkQuantityDataProvider * @param $options - * @expectedException \InvalidArgumentException - * @expectedException EmptyPropertyValueException */ public function testSetMarkQuantityInvalidData($options) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptResponseItem(); $instance->setMarkQuantity($options); } /** * @dataProvider invalidCustomsDeclarationNumberDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidCustomsDeclarationNumber($value) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptResponseItem(); $instance->customsDeclarationNumber = $value; } /** * @dataProvider invalidCustomsDeclarationNumberDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetterInvalidCustomsDeclarationNumber($value) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptResponseItem(); $instance->setCustomsDeclarationNumber($value); } @@ -634,11 +623,11 @@ class ReceiptResponseItemTest extends TestCase )), 'country_of_origin_code' => Random::value(array('RU', 'US', 'CN')), 'customs_declaration_number' => Random::value(array( - null, - '', - Random::str(1), - Random::str(2, 31), - Random::str(32), + null, + '', + Random::str(1), + Random::str(2, 31), + Random::str(32), )), 'mark_code_info' => array( 'mark_code_raw' => '010460406000590021N4N57RTCBUZTQ\u001d2403054002410161218\u001d1424010191ffd0\u001g92tIAF/YVpU4roQS3M/m4z78yFq0nc/WsSmLeX6QkF/YVWwy5IMYAeiQ91Xa2m/fFSJcOkb2N+uUUtfr4n0mOX0Q==', @@ -694,7 +683,7 @@ class ReceiptResponseItemTest extends TestCase return array( array(array()), array(true), - array(new \stdClass()), + array(new stdClass()), array(Random::str(10)), ); } @@ -722,7 +711,7 @@ class ReceiptResponseItemTest extends TestCase array(new StringObject('')), array(true), array(false), - array(new \stdClass()), + array(new stdClass()), array(array()), array(Random::str(2, 96, 'GHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_+-=`~?><:"\'')), array(Random::str(97, 100, '0123456789ABCDEF ')), @@ -777,7 +766,7 @@ class ReceiptResponseItemTest extends TestCase array(1.0), array(1), array(true), - array(new \stdClass()), + array(new stdClass()), ); } @@ -787,7 +776,7 @@ class ReceiptResponseItemTest extends TestCase array(1.0), array(1), array(true), - array(new \stdClass()), + array(new stdClass()), array(Random::str(1, 10)), ); } @@ -797,7 +786,7 @@ class ReceiptResponseItemTest extends TestCase return array( array(true), array(false), - array(new \stdClass()), + array(new stdClass()), array(array()), array(Random::str(33, 64)), ); @@ -809,8 +798,8 @@ class ReceiptResponseItemTest extends TestCase array(1.0), array(1), array(true), - array(new \stdClass()), - array(array(new \stdClass())), + array(new stdClass()), + array(array(new stdClass())), ); } } diff --git a/tests/Request/Receipts/ReceiptsRequestTest.php b/tests/Request/Receipts/ReceiptsRequestTest.php index 6a40e98c..e56d0582 100644 --- a/tests/Request/Receipts/ReceiptsRequestTest.php +++ b/tests/Request/Receipts/ReceiptsRequestTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Request\Receipts; +use DateTime; use YooKassa\Helpers\Random; use YooKassa\Model\Receipt\SettlementType; use YooKassa\Model\ReceiptRegistrationStatus; @@ -190,10 +191,10 @@ class ReceiptsRequestTest extends TestCase /** * @dataProvider invalidLimitDataProvider * @param $value - * @expectedException \InvalidArgumentException */ public function testInvalidLimitData($value) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptsRequest(); $instance->setLimit($value); } @@ -201,10 +202,10 @@ class ReceiptsRequestTest extends TestCase /** * @dataProvider invalidCursorDataProvider * @param $value - * @expectedException \InvalidArgumentException */ public function testInvalidCursorData($value) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptsRequest(); $instance->setCursor($value); } @@ -212,10 +213,10 @@ class ReceiptsRequestTest extends TestCase /** * @dataProvider invalidStatusDataProvider * @param $value - * @expectedException \InvalidArgumentException */ public function testInvalidStatusData($value) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptsRequest(); $instance->setStatus($value); } @@ -223,10 +224,10 @@ class ReceiptsRequestTest extends TestCase /** * @dataProvider invalidDateDataProvider * @param $value - * @expectedException \InvalidArgumentException */ public function testInvalidCreatedAtLtData($value) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptsRequest(); $instance->setCreatedAtLt($value); } @@ -235,10 +236,10 @@ class ReceiptsRequestTest extends TestCase /** * @dataProvider invalidDateDataProvider * @param $value - * @expectedException \InvalidArgumentException */ public function testInvalidCreatedAtLteData($value) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptsRequest(); $instance->setCreatedAtLte($value); } @@ -246,10 +247,10 @@ class ReceiptsRequestTest extends TestCase /** * @dataProvider invalidDateDataProvider * @param $value - * @expectedException \InvalidArgumentException */ public function testInvalidCreatedAtGtData($value) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptsRequest(); $instance->setCreatedAtGt($value); } @@ -257,10 +258,10 @@ class ReceiptsRequestTest extends TestCase /** * @dataProvider invalidDateDataProvider * @param $value - * @expectedException \InvalidArgumentException */ public function testInvalidCreatedAtGteData($value) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptsRequest(); $instance->setCreatedAtGte($value); } @@ -268,10 +269,10 @@ class ReceiptsRequestTest extends TestCase /** * @dataProvider invalidIdDataProvider * @param $value - * @expectedException \InvalidArgumentException */ public function testInvalidPaymentIdData($value) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptsRequest(); $instance->setPaymentId($value); } @@ -279,10 +280,10 @@ class ReceiptsRequestTest extends TestCase /** * @dataProvider invalidIdDataProvider * @param $value - * @expectedException \InvalidArgumentException */ public function testInvalidRefundIdData($value) { + $this->expectException('InvalidArgumentException'); $instance = new ReceiptsRequest(); $instance->setRefundId($value); } @@ -340,7 +341,7 @@ class ReceiptsRequestTest extends TestCase { return array( array(SettlementType::POSTPAYMENT), - array(new \DateTime('')) + array(new DateTime('')) ); } diff --git a/tests/Request/Receipts/ReceiptsResponseTest.php b/tests/Request/Receipts/ReceiptsResponseTest.php index e7c92736..bcacb626 100644 --- a/tests/Request/Receipts/ReceiptsResponseTest.php +++ b/tests/Request/Receipts/ReceiptsResponseTest.php @@ -25,6 +25,7 @@ namespace YooKassa\Request\Receipts; +use Exception; use PHPUnit\Framework\TestCase; use YooKassa\Helpers\Random; use YooKassa\Helpers\UUID; @@ -36,7 +37,7 @@ class ReceiptsResponseTest extends TestCase /** * @dataProvider validDataProvider * @param array $options - * @throws \Exception + * @throws Exception */ public function testGetType($options) { @@ -49,7 +50,7 @@ class ReceiptsResponseTest extends TestCase /** * @dataProvider validDataProvider * @param array $options - * @throws \Exception + * @throws Exception */ public function testGetItems($options) { diff --git a/tests/Request/Receipts/RefundReceiptResponseTest.php b/tests/Request/Receipts/RefundReceiptResponseTest.php index 778d5c7c..0381efe0 100644 --- a/tests/Request/Receipts/RefundReceiptResponseTest.php +++ b/tests/Request/Receipts/RefundReceiptResponseTest.php @@ -25,13 +25,15 @@ namespace Tests\YooKassa\Request\Receipts; +use Exception; +use stdClass; use YooKassa\Common\Exceptions\InvalidPropertyValueException; use YooKassa\Common\Exceptions\InvalidPropertyValueTypeException; use YooKassa\Helpers\Random; use YooKassa\Model\Airline; use YooKassa\Request\Receipts\RefundReceiptResponse; -class RefundReceiptResponseTest extends AbstractReceiptResponseTest +class RefundReceiptResponseTest extends AbstractReceiptResponseTestCase { protected $type = 'refund'; @@ -44,17 +46,17 @@ class RefundReceiptResponseTest extends AbstractReceiptResponseTest { $array = array( Random::str(30), - new \stdClass(), + new stdClass(), array(), - new \stdClass(), - new \Exception(), + new stdClass(), + new Exception(), new Airline(), Random::str(40), array(new Airline()) ); $options['refund_id'] = !$this->valid ? (Random::value($array)) - : Random::value(array( null, '', Random::str(RefundReceiptResponse::LENGTH_REFUND_ID))); + : Random::value(array(null, '', Random::str(RefundReceiptResponse::LENGTH_REFUND_ID))); return $options; } diff --git a/tests/Request/Receipts/SimpleReceiptResponseTest.php b/tests/Request/Receipts/SimpleReceiptResponseTest.php index b75de829..a193e7fe 100644 --- a/tests/Request/Receipts/SimpleReceiptResponseTest.php +++ b/tests/Request/Receipts/SimpleReceiptResponseTest.php @@ -27,7 +27,7 @@ namespace Tests\YooKassa\Request\Receipts; use YooKassa\Request\Receipts\SimpleReceiptResponse; -class SimpleReceiptResponseTest extends AbstractReceiptResponseTest +class SimpleReceiptResponseTest extends AbstractReceiptResponseTestCase { protected $type = 'simple'; diff --git a/tests/Request/Refunds/AbstractRefundResponseTest.php b/tests/Request/Refunds/AbstractRefundResponseTestCase.php similarity index 97% rename from tests/Request/Refunds/AbstractRefundResponseTest.php rename to tests/Request/Refunds/AbstractRefundResponseTestCase.php index 6fba4264..35ceceab 100644 --- a/tests/Request/Refunds/AbstractRefundResponseTest.php +++ b/tests/Request/Refunds/AbstractRefundResponseTestCase.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Request\Refunds; +use DateTime; use PHPUnit\Framework\TestCase; use YooKassa\Helpers\Random; use YooKassa\Model\AmountInterface; @@ -37,7 +38,7 @@ use YooKassa\Model\RefundStatus; use YooKassa\Model\Source; use YooKassa\Request\Refunds\AbstractRefundResponse; -abstract class AbstractRefundResponseTest extends TestCase +abstract class AbstractRefundResponseTestCase extends TestCase { /** * @param array $options @@ -82,7 +83,7 @@ abstract class AbstractRefundResponseTest extends TestCase public function testGetCreatedAt($options) { $instance = $this->getTestInstance($options); - self::assertTrue($instance->getCreatedAt() instanceof \DateTime); + self::assertTrue($instance->getCreatedAt() instanceof DateTime); self::assertEquals($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); } diff --git a/tests/Request/Refunds/CreateRefundRequestBuilderTest.php b/tests/Request/Refunds/CreateRefundRequestBuilderTest.php index 0b6d4cee..9c4a74e7 100644 --- a/tests/Request/Refunds/CreateRefundRequestBuilderTest.php +++ b/tests/Request/Refunds/CreateRefundRequestBuilderTest.php @@ -25,7 +25,10 @@ namespace Tests\YooKassa\Request\Refunds; +use Exception; use PHPUnit\Framework\TestCase; +use RuntimeException; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\AmountInterface; use YooKassa\Model\CurrencyCode; @@ -50,7 +53,7 @@ class CreateRefundRequestBuilderTest extends TestCase $builder = new CreateRefundRequestBuilder(); try { $builder->build(array('amountValue' => mt_rand(1, 100))); - } catch (\RuntimeException $e) { + } catch (RuntimeException $e) { $builder->setPaymentId($options['paymentId']); $instance = $builder->build(array('amount' => mt_rand(1, 100))); self::assertEquals($options['paymentId'], $instance->getPaymentId()); @@ -64,14 +67,14 @@ class CreateRefundRequestBuilderTest extends TestCase * @dataProvider validDataProvider * * @param $options - * @throws \Exception + * @throws Exception */ public function testSetAmountValue($options) { $builder = new CreateRefundRequestBuilder(); try { $builder->build(array('paymentId' => Random::str(36))); - } catch (\RuntimeException $e) { + } catch (RuntimeException $e) { $builder->setAmount($options['amount']); $instance = $builder->build(array('paymentId' => Random::str(36))); if ($options['amount'] instanceof AmountInterface) { @@ -83,14 +86,14 @@ class CreateRefundRequestBuilderTest extends TestCase if ($options['amount'] instanceof AmountInterface) { $builder->setAmount(array( - 'value' => $options['amount']->getValue(), + 'value' => $options['amount']->getValue(), 'currency' => 'USD', )); $instance = $builder->build(array('paymentId' => Random::str(36))); self::assertEquals($options['amount']->getValue(), $instance->getAmount()->getValue()); } else { $builder->setAmount(array( - 'value' => $options['amount'], + 'value' => $options['amount'], 'currency' => 'USD', )); $instance = $builder->build(array('paymentId' => Random::str(36))); @@ -106,7 +109,7 @@ class CreateRefundRequestBuilderTest extends TestCase * @dataProvider validDataProvider * * @param $options - * @throws \Exception + * @throws Exception */ public function testSetAmountCurrency($options) { @@ -115,7 +118,7 @@ class CreateRefundRequestBuilderTest extends TestCase $builder->setCurrency($options['currency']); $instance = $builder->build(array( 'paymentId' => Random::str(36), - 'amount' => mt_rand(1, 100), + 'amount' => mt_rand(1, 100), )); self::assertEquals($options['currency'], $instance->getAmount()->getCurrency()); } @@ -124,21 +127,21 @@ class CreateRefundRequestBuilderTest extends TestCase * @dataProvider validDataProvider * * @param $options - * @throws \Exception + * @throws Exception */ public function testSetComment($options) { - $builder = new CreateRefundRequestBuilder(); + $builder = new CreateRefundRequestBuilder(); $instance = $builder->build(array( 'paymentId' => Random::str(36), - 'amount' => mt_rand(1, 100), + 'amount' => mt_rand(1, 100), )); self::assertNull($instance->getDescription()); $builder->setDescription($options['description']); $instance = $builder->build(array( 'paymentId' => Random::str(36), - 'amount' => mt_rand(1, 100), + 'amount' => mt_rand(1, 100), )); if (empty($options['description'])) { self::assertNull($instance->getDescription()); @@ -154,7 +157,7 @@ class CreateRefundRequestBuilderTest extends TestCase */ public function testBuild($options) { - $builder = new CreateRefundRequestBuilder(); + $builder = new CreateRefundRequestBuilder(); $instance = $builder->build($options); self::assertEquals($options['paymentId'], $instance->getPaymentId()); @@ -175,7 +178,7 @@ class CreateRefundRequestBuilderTest extends TestCase * @dataProvider validDataProvider * * @param $options - * @throws \Exception + * @throws Exception */ public function testSetReceiptItems($options) { @@ -197,7 +200,7 @@ class CreateRefundRequestBuilderTest extends TestCase * @dataProvider validDataProvider * * @param $options - * @throws \Exception + * @throws Exception */ public function testAddReceiptItems($options) { @@ -233,7 +236,7 @@ class CreateRefundRequestBuilderTest extends TestCase * @dataProvider validDataProvider * * @param $options - * @throws \Exception + * @throws Exception */ public function testAddReceiptShipping($options) { @@ -266,18 +269,18 @@ class CreateRefundRequestBuilderTest extends TestCase /** * @dataProvider invalidItemsDataProvider - * @expectedException \InvalidArgumentException * * @param $items */ public function testSetInvalidReceiptItems($items) { + $this->expectException('InvalidArgumentException'); $builder = new CreateRefundRequestBuilder(); $builder->setReceiptItems($items); } /** - * @throws \Exception + * @throws Exception */ public function testSetReceipt() { @@ -289,15 +292,15 @@ class CreateRefundRequestBuilderTest extends TestCase ), 'items' => array( array( - 'description' => 'test', - 'quantity' => 123, - 'amount' => array( - 'value' => 321, + 'description' => 'test', + 'quantity' => 123, + 'amount' => array( + 'value' => 321, 'currency' => 'USD', ), - 'vat_code' => Random::int(1, 6), + 'vat_code' => Random::int(1, 6), 'payment_subject' => PaymentSubject::COMMODITY, - 'payment_mode' => PaymentMode::PARTIAL_PREPAYMENT, + 'payment_mode' => PaymentMode::PARTIAL_PREPAYMENT, ), ), ); @@ -325,12 +328,12 @@ class CreateRefundRequestBuilderTest extends TestCase /** * @dataProvider invalidReceiptDataProvider - * @expectedException \InvalidArgumentException * * @param mixed $value */ public function testSetInvalidReceipt($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreateRefundRequestBuilder(); $builder->setReceipt($value); } @@ -347,7 +350,7 @@ class CreateRefundRequestBuilderTest extends TestCase array(1), array(1.1), array('test'), - array(new \stdClass()), + array(new stdClass()), ); } @@ -360,18 +363,18 @@ class CreateRefundRequestBuilderTest extends TestCase array( array( array( - 'price' => 1, + 'price' => 1, 'quantity' => 1.4, - 'vatCode' => 3, + 'vatCode' => 3, ), ), ), array( array( array( - 'title' => 'test', + 'title' => 'test', 'quantity' => 1.4, - 'vatCode' => 3, + 'vatCode' => 3, ), ), ), @@ -379,18 +382,18 @@ class CreateRefundRequestBuilderTest extends TestCase array( array( 'description' => 'test', - 'quantity' => 1.4, - 'vatCode' => 3, + 'quantity' => 1.4, + 'vatCode' => 3, ), ), ), array( array( array( - 'title' => 'test', - 'price' => 123, + 'title' => 'test', + 'price' => 123, 'quantity' => 1.4, - 'vatCode' => 15, + 'vatCode' => 15, ), ), ), @@ -398,16 +401,16 @@ class CreateRefundRequestBuilderTest extends TestCase array( array( 'description' => 'test', - 'price' => 123, - 'quantity' => -1.4, + 'price' => 123, + 'quantity' => -1.4, ), ), ), array( array( array( - 'title' => 'test', - 'price' => 1, + 'title' => 'test', + 'price' => 1, 'vatCode' => 7, ), ), @@ -419,7 +422,7 @@ class CreateRefundRequestBuilderTest extends TestCase * @dataProvider validDataProvider * * @param $options - * @throws \Exception + * @throws Exception */ public function testSetReceiptEmail($options) { @@ -439,12 +442,12 @@ class CreateRefundRequestBuilderTest extends TestCase /** * @dataProvider invalidEmailDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidEmail($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreateRefundRequestBuilder(); $builder->setReceiptEmail($value); } @@ -453,7 +456,7 @@ class CreateRefundRequestBuilderTest extends TestCase * @dataProvider validDataProvider * * @param $options - * @throws \Exception + * @throws Exception */ public function testSetReceiptPhone($options) { @@ -474,12 +477,12 @@ class CreateRefundRequestBuilderTest extends TestCase /** * @dataProvider invalidPhoneDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidPhone($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreateRefundRequestBuilder(); $builder->setReceiptPhone($value); } @@ -488,7 +491,7 @@ class CreateRefundRequestBuilderTest extends TestCase * @dataProvider validDataProvider * * @param $options - * @throws \Exception + * @throws Exception */ public function testSetReceiptTaxSystemCode($options) { @@ -509,12 +512,12 @@ class CreateRefundRequestBuilderTest extends TestCase /** * @dataProvider invalidVatIdDataProvider - * @expectedException \InvalidArgumentException * * @param $value */ public function testSetInvalidTaxSystemId($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreateRefundRequestBuilder(); $builder->setTaxSystemCode($value); } @@ -522,20 +525,20 @@ class CreateRefundRequestBuilderTest extends TestCase /** * @return array - * @throws \Exception + * @throws Exception */ public function validDataProvider() { $result = array( array( array( - 'paymentId' => Random::str(36), - 'amount' => mt_rand(1, 999999), - 'currency' => Random::value(CurrencyCode::getValidValues()), - 'description' => null, - 'receiptItems' => array(), - 'receiptEmail' => null, - 'receiptPhone' => null, + 'paymentId' => Random::str(36), + 'amount' => mt_rand(1, 999999), + 'currency' => Random::value(CurrencyCode::getValidValues()), + 'description' => null, + 'receiptItems' => array(), + 'receiptEmail' => null, + 'receiptPhone' => null, 'taxSystemCode' => Random::int(1, 6), 'sources' => array( new Source(array( @@ -560,16 +563,16 @@ class CreateRefundRequestBuilderTest extends TestCase ), array( array( - 'paymentId' => Random::str(36), - 'amount' => new MonetaryAmount( + 'paymentId' => Random::str(36), + 'amount' => new MonetaryAmount( Random::int(1, 999999), Random::value(CurrencyCode::getValidValues()) ), - 'currency' => Random::value(CurrencyCode::getValidValues()), - 'description' => '', - 'receiptItems' => array(), - 'receiptEmail' => '', - 'receiptPhone' => '', + 'currency' => Random::value(CurrencyCode::getValidValues()), + 'description' => '', + 'receiptItems' => array(), + 'receiptEmail' => '', + 'receiptPhone' => '', 'taxSystemCode' => Random::int(1, 6), 'sources' => array( new Source(array( @@ -585,13 +588,13 @@ class CreateRefundRequestBuilderTest extends TestCase ), ), ); - $items = array( + $items = array( new ReceiptItem(), array( - 'title' => 'test', - 'price' => Random::int(1, 999999), + 'title' => 'test', + 'price' => Random::int(1, 999999), 'quantity' => Random::int(1, 9999), - 'vatCode' => Random::int(1, 6), + 'vatCode' => Random::int(1, 6), ), ); $items[0]->setDescription('test1'); @@ -599,14 +602,14 @@ class CreateRefundRequestBuilderTest extends TestCase $items[0]->setPrice(new MonetaryAmount(Random::int(1, 999999))); $items[0]->setVatCode(Random::int(1, 6)); for ($i = 0; $i < 10; $i++) { - $request = array( - 'paymentId' => Random::str(36), - 'amount' => mt_rand(1, 999999), - 'currency' => Random::value(CurrencyCode::getValidValues()), - 'description' => uniqid('', true), - 'receiptItems' => $items, - 'receiptEmail' => uniqid('', true), - 'receiptPhone' => Random::str(4, 15, '0123456789'), + $request = array( + 'paymentId' => Random::str(36), + 'amount' => mt_rand(1, 999999), + 'currency' => Random::value(CurrencyCode::getValidValues()), + 'description' => uniqid('', true), + 'receiptItems' => $items, + 'receiptEmail' => uniqid('', true), + 'receiptPhone' => Random::str(4, 15, '0123456789'), 'taxSystemCode' => Random::int(1, 6), 'sources' => array( new Source(array( @@ -636,13 +639,13 @@ class CreateRefundRequestBuilderTest extends TestCase /** * @return array - * @throws \Exception + * @throws Exception */ private function getRequiredData() { return array( 'paymentId' => Random::str(36), - 'amount' => mt_rand(1, 100), + 'amount' => mt_rand(1, 100), ); } @@ -655,7 +658,7 @@ class CreateRefundRequestBuilderTest extends TestCase array(array()), array(true), array(false), - array(new \stdClass()), + array(new stdClass()), ); } @@ -665,7 +668,7 @@ class CreateRefundRequestBuilderTest extends TestCase public function invalidPhoneDataProvider() { return array( - array(new \stdClass()), + array(new stdClass()), array(array()), array(true), array(false), @@ -674,7 +677,7 @@ class CreateRefundRequestBuilderTest extends TestCase /** * @return array - * @throws \Exception + * @throws Exception */ public function invalidVatIdDataProvider() { @@ -682,7 +685,7 @@ class CreateRefundRequestBuilderTest extends TestCase array(array()), array(true), array(false), - array(new \stdClass()), + array(new stdClass()), array(0), array(7), array(Random::int(-100, -1)), @@ -694,7 +697,7 @@ class CreateRefundRequestBuilderTest extends TestCase * @dataProvider validDataProvider * * @param $options - * @throws \Exception + * @throws Exception */ public function testSetDeal($options) { @@ -714,14 +717,14 @@ class CreateRefundRequestBuilderTest extends TestCase /** * @return array - * @throws \Exception + * @throws Exception */ public function invalidDealDataProvider() { return array( array(true), array(false), - array(new \stdClass()), + array(new stdClass()), array(0), array(7), array(Random::int(-100, -1)), @@ -731,11 +734,11 @@ class CreateRefundRequestBuilderTest extends TestCase /** * @dataProvider invalidDealDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidDeal($value) { + $this->expectException('InvalidArgumentException'); $builder = new CreatePaymentRequestBuilder(); $builder->setDeal($value); } diff --git a/tests/Request/Refunds/CreateRefundRequestSerializerTest.php b/tests/Request/Refunds/CreateRefundRequestSerializerTest.php index 0ec136e5..c53e07ca 100644 --- a/tests/Request/Refunds/CreateRefundRequestSerializerTest.php +++ b/tests/Request/Refunds/CreateRefundRequestSerializerTest.php @@ -51,7 +51,7 @@ class CreateRefundRequestSerializerTest extends TestCase $expected = array( 'payment_id' => $options['paymentId'], 'amount' => array( - 'value' => $options['amount'], + 'value' => $options['amount'], 'currency' => $options['currency'], ), ); diff --git a/tests/Request/Refunds/CreateRefundRequestTest.php b/tests/Request/Refunds/CreateRefundRequestTest.php index c2f9cca8..5340dfce 100644 --- a/tests/Request/Refunds/CreateRefundRequestTest.php +++ b/tests/Request/Refunds/CreateRefundRequestTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Request\Refunds; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\Deal\RefundDealData; use YooKassa\Model\Deal\SettlementPayoutPaymentType; @@ -66,22 +67,22 @@ class CreateRefundRequestTest extends TestCase /** * @dataProvider invalidPaymentIdDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidPaymentId($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreateRefundRequest(); $instance->setPaymentId($value); } /** * @dataProvider invalidPaymentIdDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidPaymentId($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreateRefundRequest(); $instance->paymentId = $value; } @@ -95,7 +96,7 @@ class CreateRefundRequestTest extends TestCase $instance = new CreateRefundRequest(); self::assertNull($instance->getAmount()); - self::assertNull($instance->amount, $instance->getAmount()); + self::assertNull($instance->amount); $instance->setAmount($options['amount']); @@ -156,22 +157,22 @@ class CreateRefundRequestTest extends TestCase /** * @dataProvider invalidDescriptionDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidDescription($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreateRefundRequest(); $instance->setDescription($value); } /** * @dataProvider invalidDescriptionDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidDescription($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreateRefundRequest(); $instance->description = $value; } @@ -228,22 +229,22 @@ class CreateRefundRequestTest extends TestCase /** * @dataProvider invalidDealDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidDeal($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreateRefundRequest(); $instance->setDeal($value); } /** * @dataProvider invalidDealDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidDeal($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreateRefundRequest(); $instance->deal = $value; } @@ -289,22 +290,22 @@ class CreateRefundRequestTest extends TestCase /** * @dataProvider invalidReceiptDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidReceipt($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreateRefundRequest(); $instance->setReceipt($value); } /** * @dataProvider invalidReceiptDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidReceipt($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreateRefundRequest(); $instance->receipt = $value; } @@ -317,11 +318,11 @@ class CreateRefundRequestTest extends TestCase /** * @dataProvider invalidSourceDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testInvalidSetSources($value) { + $this->expectException('InvalidArgumentException'); $instance = new CreateRefundRequest(); $instance->setSources($value); } @@ -393,7 +394,7 @@ class CreateRefundRequestTest extends TestCase array('test'), array(true), array(false), - array(new \stdClass()), + array(new stdClass()), ); } @@ -404,7 +405,7 @@ class CreateRefundRequestTest extends TestCase array(null), array(array()), array(1), - array(new \stdClass()), + array(new stdClass()), array(Random::str(35)), array(Random::str(37)), ); @@ -414,7 +415,7 @@ class CreateRefundRequestTest extends TestCase { return array( array(array()), - array(new \stdClass()), + array(new stdClass()), ); } @@ -422,7 +423,7 @@ class CreateRefundRequestTest extends TestCase { return array( array(1), - array(array(new \stdClass())), + array(array(new stdClass())), ); } @@ -430,7 +431,7 @@ class CreateRefundRequestTest extends TestCase { return array( array(Random::str(35)), - array(new \stdClass()), + array(new stdClass()), ); } } diff --git a/tests/Request/Refunds/CreateRefundResponseTest.php b/tests/Request/Refunds/CreateRefundResponseTest.php index a8b705cd..3c5470a0 100644 --- a/tests/Request/Refunds/CreateRefundResponseTest.php +++ b/tests/Request/Refunds/CreateRefundResponseTest.php @@ -27,7 +27,7 @@ namespace Tests\YooKassa\Request\Refunds; use YooKassa\Request\Refunds\CreateRefundResponse; -class CreateRefundResponseTest extends AbstractRefundResponseTest +class CreateRefundResponseTest extends AbstractRefundResponseTestCase { /** * @param array $options diff --git a/tests/Request/Refunds/RefundResponseTest.php b/tests/Request/Refunds/RefundResponseTest.php index b6c96087..309bbc7c 100644 --- a/tests/Request/Refunds/RefundResponseTest.php +++ b/tests/Request/Refunds/RefundResponseTest.php @@ -27,7 +27,7 @@ namespace Tests\YooKassa\Request\Refunds; use YooKassa\Request\Refunds\RefundResponse; -class RefundResponseTest extends AbstractRefundResponseTest +class RefundResponseTest extends AbstractRefundResponseTestCase { /** * @param array $options diff --git a/tests/Request/Refunds/RefundsRequestSerializerTest.php b/tests/Request/Refunds/RefundsRequestSerializerTest.php index e9a230cd..47f4615a 100644 --- a/tests/Request/Refunds/RefundsRequestSerializerTest.php +++ b/tests/Request/Refunds/RefundsRequestSerializerTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Request\Refunds; +use DateTime; use PHPUnit\Framework\TestCase; use YooKassa\Model\RefundStatus; use YooKassa\Request\Refunds\RefundsRequest; @@ -33,14 +34,14 @@ use YooKassa\Request\Refunds\RefundsRequestSerializer; class RefundsRequestSerializerTest extends TestCase { private $fieldMap = array( - 'paymentId' => 'payment_id', - 'createdAtGte' => 'created_at.gte', - 'createdAtGt' => 'created_at.gt', - 'createdAtLte' => 'created_at.lte', - 'createdAtLt' => 'created_at.lt', - 'status' => 'status', - 'cursor' => 'cursor', - 'limit' => 'limit', + 'paymentId' => 'payment_id', + 'createdAtGte' => 'created_at.gte', + 'createdAtGt' => 'created_at.gt', + 'createdAtLte' => 'created_at.lte', + 'createdAtLt' => 'created_at.lt', + 'status' => 'status', + 'cursor' => 'cursor', + 'limit' => 'limit', ); /** @@ -57,7 +58,7 @@ class RefundsRequestSerializerTest extends TestCase if (isset($options[$field])) { $value = $options[$field]; if (!empty($value)) { - $expected[$mapped] = $value instanceof \DateTime ? $value->format(YOOKASSA_DATE) : $value; + $expected[$mapped] = $value instanceof DateTime ? $value->format(YOOKASSA_DATE) : $value; } } } diff --git a/tests/Request/Refunds/RefundsRequestTest.php b/tests/Request/Refunds/RefundsRequestTest.php index 6d0a2ea8..ae9fe99c 100644 --- a/tests/Request/Refunds/RefundsRequestTest.php +++ b/tests/Request/Refunds/RefundsRequestTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Request\Refunds; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Helpers\StringObject; use YooKassa\Model\RefundStatus; @@ -76,22 +77,22 @@ class RefundsRequestTest extends TestCase /** * @dataProvider invalidPaymentIdDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidPaymentId($value) { + $this->expectException('InvalidArgumentException'); $instance = new RefundsRequest(); $instance->setPaymentId($value); } /** * @dataProvider invalidPaymentIdDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidPaymentId($value) { + $this->expectException('InvalidArgumentException'); $instance = new RefundsRequest(); $instance->paymentId = $value; } @@ -105,7 +106,7 @@ class RefundsRequestTest extends TestCase array(array()), array(true), array(false), - array(new \stdClass()), + array(new stdClass()), ); } @@ -151,22 +152,22 @@ class RefundsRequestTest extends TestCase /** * @dataProvider invalidDateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidCreatedGte($value) { + $this->expectException('InvalidArgumentException'); $instance = new RefundsRequest(); $instance->setCreatedAtGte($value); } /** * @dataProvider invalidDateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidCreatedGte($value) { + $this->expectException('InvalidArgumentException'); $instance = new RefundsRequest(); $instance->createdAtGte = $value; } @@ -213,22 +214,22 @@ class RefundsRequestTest extends TestCase /** * @dataProvider invalidDateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidCreatedGt($value) { + $this->expectException('InvalidArgumentException'); $instance = new RefundsRequest(); $instance->setCreatedAtGt($value); } /** * @dataProvider invalidDateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidCreatedGt($value) { + $this->expectException('InvalidArgumentException'); $instance = new RefundsRequest(); $instance->createdAtGt = $value; } @@ -275,22 +276,22 @@ class RefundsRequestTest extends TestCase /** * @dataProvider invalidDateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidCreatedLte($value) { + $this->expectException('InvalidArgumentException'); $instance = new RefundsRequest(); $instance->setCreatedAtLte($value); } /** * @dataProvider invalidDateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidCreatedLte($value) { + $this->expectException('InvalidArgumentException'); $instance = new RefundsRequest(); $instance->createdAtLte = $value; } @@ -337,22 +338,22 @@ class RefundsRequestTest extends TestCase /** * @dataProvider invalidDateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetInvalidCreatedLt($value) { + $this->expectException('InvalidArgumentException'); $instance = new RefundsRequest(); $instance->setCreatedAtLt($value); } /** * @dataProvider invalidDateDataProvider - * @expectedException \InvalidArgumentException * @param mixed $value */ public function testSetterInvalidCreatedLt($value) { + $this->expectException('InvalidArgumentException'); $instance = new RefundsRequest(); $instance->createdAtLt = $value; } @@ -399,22 +400,22 @@ class RefundsRequestTest extends TestCase /** * @dataProvider invalidStatusDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidStatus($value) { + $this->expectException('InvalidArgumentException'); $instance = new RefundsRequest(); $instance->setStatus($value); } /** * @dataProvider invalidStatusDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidStatus($value) { + $this->expectException('InvalidArgumentException'); $instance = new RefundsRequest(); $instance->status = $value; self::assertEquals($value, $instance->status); @@ -433,11 +434,11 @@ class RefundsRequestTest extends TestCase /** * @dataProvider invalidLimitDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidLimit($value) { + $this->expectException('InvalidArgumentException'); $instance = new RefundsRequest(); $instance->setLimit($value); } @@ -485,22 +486,22 @@ class RefundsRequestTest extends TestCase /** * @dataProvider invalidNextCursorDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidCursor($value) { + $this->expectException('InvalidArgumentException'); $instance = new RefundsRequest(); $instance->setCursor($value); } /** * @dataProvider invalidNextCursorDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidCursor($value) { + $this->expectException('InvalidArgumentException'); $instance = new RefundsRequest(); $instance->cursor = $value; } @@ -569,7 +570,7 @@ class RefundsRequestTest extends TestCase array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(1, 10)), array(new StringObject(Random::str(1, 10))), ); @@ -587,7 +588,7 @@ class RefundsRequestTest extends TestCase { return array( array(array()), - array(new \stdClass()), + array(new stdClass()), array(-1), array(RefundsRequest::MAX_LIMIT_VALUE + 1), ); @@ -597,7 +598,7 @@ class RefundsRequestTest extends TestCase { $result = array( array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(10)), array(Random::bytes(10)), array(-1), @@ -612,7 +613,7 @@ class RefundsRequestTest extends TestCase array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } @@ -622,7 +623,7 @@ class RefundsRequestTest extends TestCase array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(35)), array(Random::str(37)), array(new StringObject(Random::str(10))), @@ -635,7 +636,7 @@ class RefundsRequestTest extends TestCase array(true), array(false), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(35)), array(Random::str(37)), array(new StringObject(Random::str(10))), diff --git a/tests/Request/SelfEmployed/AbstractConfirmationTest.php b/tests/Request/SelfEmployed/AbstractConfirmationTestCase.php similarity index 91% rename from tests/Request/SelfEmployed/AbstractConfirmationTest.php rename to tests/Request/SelfEmployed/AbstractConfirmationTestCase.php index 4e9f6105..ca10e826 100644 --- a/tests/Request/SelfEmployed/AbstractConfirmationTest.php +++ b/tests/Request/SelfEmployed/AbstractConfirmationTestCase.php @@ -25,11 +25,13 @@ namespace Tests\YooKassa\Request\SelfEmployed; +use Exception; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmation; -abstract class AbstractConfirmationTest extends TestCase +abstract class AbstractConfirmationTestCase extends TestCase { /** * @return SelfEmployedRequestConfirmation @@ -52,17 +54,17 @@ abstract class AbstractConfirmationTest extends TestCase /** * @dataProvider invalidTypeDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testInvalidType($value) { + $this->expectException('InvalidArgumentException'); new TestConfirmation($value); } /** * @return array - * @throws \Exception + * @throws Exception */ public function invalidTypeDataProvider() { @@ -72,7 +74,7 @@ abstract class AbstractConfirmationTest extends TestCase array(Random::str(40)), array(0), array(array()), - array(new \stdClass()), + array(new stdClass()), ); } } diff --git a/tests/Request/SelfEmployed/ConfirmationFactoryTest.php b/tests/Request/SelfEmployed/ConfirmationFactoryTest.php index 1c53accd..151179fa 100644 --- a/tests/Request/SelfEmployed/ConfirmationFactoryTest.php +++ b/tests/Request/SelfEmployed/ConfirmationFactoryTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Request\SelfEmployed; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\SelfEmployed\SelfEmployedConfirmationType; use YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmation; @@ -56,11 +57,11 @@ class ConfirmationFactoryTest extends TestCase /** * @dataProvider invalidTypeDataProvider - * @expectedException \InvalidArgumentException * @param $type */ public function testInvalidFactory($type) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->factory($type); } @@ -94,11 +95,11 @@ class ConfirmationFactoryTest extends TestCase /** * @dataProvider invalidDataArrayDataProvider - * @expectedException \InvalidArgumentException * @param $options */ public function testInvalidFactoryFromArray($options) { + $this->expectException('InvalidArgumentException'); $instance = $this->getTestInstance(); $instance->factoryFromArray($options); } @@ -122,7 +123,7 @@ class ConfirmationFactoryTest extends TestCase array(-1), array('5'), array(array()), - array(new \stdClass()), + array(new stdClass()), array(Random::str(10)), ); } @@ -135,7 +136,7 @@ class ConfirmationFactoryTest extends TestCase 'type' => SelfEmployedConfirmationType::REDIRECT, ), ), - ); + ); foreach (SelfEmployedConfirmationType::getValidValues() as $value) { $result[] = array(array('type' => $value)); } diff --git a/tests/Request/SelfEmployed/ConfirmationRedirectTest.php b/tests/Request/SelfEmployed/ConfirmationRedirectTest.php index 4407b059..7dc47f0d 100644 --- a/tests/Request/SelfEmployed/ConfirmationRedirectTest.php +++ b/tests/Request/SelfEmployed/ConfirmationRedirectTest.php @@ -28,7 +28,7 @@ namespace Tests\YooKassa\Request\SelfEmployed; use YooKassa\Model\SelfEmployed\SelfEmployedConfirmationType; use YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmationRedirect; -class ConfirmationRedirectTest extends AbstractConfirmationTest +class ConfirmationRedirectTest extends AbstractConfirmationTestCase { /** * @return SelfEmployedRequestConfirmationRedirect diff --git a/tests/Request/SelfEmployed/SelfEmployedRequestTest.php b/tests/Request/SelfEmployed/SelfEmployedRequestTest.php index 879f397e..4e72fef3 100644 --- a/tests/Request/SelfEmployed/SelfEmployedRequestTest.php +++ b/tests/Request/SelfEmployed/SelfEmployedRequestTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Request\SelfEmployed; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\SelfEmployed\SelfEmployedConfirmationType; use YooKassa\Request\SelfEmployed\SelfEmployedRequest; @@ -55,11 +56,11 @@ class SelfEmployedRequestTest extends TestCase /** * @dataProvider invalidItnDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidItn($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployedRequest(); $instance->setItn($value); } @@ -108,11 +109,11 @@ class SelfEmployedRequestTest extends TestCase /** * @dataProvider invalidPhoneDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidPhone($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployedRequest(); $instance->setPhone($value); } @@ -164,11 +165,11 @@ class SelfEmployedRequestTest extends TestCase /** * @dataProvider invalidConfirmationDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidConfirmation($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployedRequest(); $instance->setConfirmation($value); } @@ -231,7 +232,7 @@ class SelfEmployedRequestTest extends TestCase return array( array(false), array(true), - array(new \stdClass()), + array(new stdClass()), ); } @@ -240,7 +241,7 @@ class SelfEmployedRequestTest extends TestCase return array( array(false), array(true), - array(new \stdClass()), + array(new stdClass()), ); } @@ -249,7 +250,7 @@ class SelfEmployedRequestTest extends TestCase return array( array(false), array(true), - array(new \stdClass()), + array(new stdClass()), array(Random::str(10)), ); } diff --git a/tests/Request/SelfEmployed/SelfEmployedResponseTest.php b/tests/Request/SelfEmployed/SelfEmployedResponseTest.php index 64413b40..0bebaaab 100644 --- a/tests/Request/SelfEmployed/SelfEmployedResponseTest.php +++ b/tests/Request/SelfEmployed/SelfEmployedResponseTest.php @@ -26,6 +26,7 @@ namespace Tests\YooKassa\Request\SelfEmployed; use PHPUnit\Framework\TestCase; +use stdClass; use YooKassa\Helpers\Random; use YooKassa\Model\SelfEmployed\SelfEmployedConfirmationFactory; use YooKassa\Model\SelfEmployed\SelfEmployedConfirmationType; @@ -57,22 +58,22 @@ class SelfEmployedResponseTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidId($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployedResponse(); $instance->setId($value['id']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidId($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployedResponse(); $instance->id = $value['id']; } @@ -100,22 +101,22 @@ class SelfEmployedResponseTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidStatus($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployedResponse(); $instance->setStatus($value['status']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidStatus($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployedResponse(); $instance->status = $value['status']; } @@ -144,10 +145,10 @@ class SelfEmployedResponseTest extends TestCase /** * @dataProvider invalidDataProvider * @param $value - * @expectedException \InvalidArgumentException */ public function testSetInvalidTest($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployedResponse(); $instance->setTest($value['test']); } @@ -155,10 +156,10 @@ class SelfEmployedResponseTest extends TestCase /** * @dataProvider invalidDataProvider * @param $value - * @expectedException \InvalidArgumentException */ public function testSetterInvalidTest($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployedResponse(); $instance->test = $value['test']; } @@ -187,10 +188,10 @@ class SelfEmployedResponseTest extends TestCase /** * @dataProvider invalidDataProvider * @param $value - * @expectedException \InvalidArgumentException */ public function testSetInvalidPhone($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployedResponse(); $instance->setPhone($value['phone']); } @@ -198,10 +199,10 @@ class SelfEmployedResponseTest extends TestCase /** * @dataProvider invalidDataProvider * @param $value - * @expectedException \InvalidArgumentException */ public function testSetterInvalidPhone($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployedResponse(); $instance->phone = $value['phone']; } @@ -230,10 +231,10 @@ class SelfEmployedResponseTest extends TestCase /** * @dataProvider invalidDataProvider * @param $value - * @expectedException \InvalidArgumentException */ public function testSetInvalidItn($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployedResponse(); $instance->setItn($value['itn']); } @@ -241,10 +242,10 @@ class SelfEmployedResponseTest extends TestCase /** * @dataProvider invalidDataProvider * @param $value - * @expectedException \InvalidArgumentException */ public function testSetterInvalidItn($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployedResponse(); $instance->itn = $value['itn']; } @@ -281,33 +282,33 @@ class SelfEmployedResponseTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetInvalidCreatedAt($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployedResponse(); $instance->setCreatedAt($value['created_at']); } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidCreatedAt($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployedResponse(); $instance->createdAt = $value['created_at']; } /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidCreated_at($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployedResponse(); $instance->created_at = $value['created_at']; } @@ -345,11 +346,11 @@ class SelfEmployedResponseTest extends TestCase /** * @dataProvider invalidDataProvider - * @expectedException \InvalidArgumentException * @param $value */ public function testSetterInvalidConfirmation($value) { + $this->expectException('InvalidArgumentException'); $instance = new SelfEmployedResponse(); $instance->confirmation = $value['confirmation']; } @@ -366,7 +367,7 @@ class SelfEmployedResponseTest extends TestCase 'status' => Random::value(SelfEmployedStatus::getValidValues()), 'test' => Random::bool(), 'itn' => null, - 'phone' => Random::str(11, 11,'0123456789'), + 'phone' => Random::str(11, 11, '0123456789'), 'created_at' => date(YOOKASSA_DATE, mt_rand(111111111, time())), 'confirmation' => array('type' => Random::value($confirmTypes)), ) @@ -376,7 +377,7 @@ class SelfEmployedResponseTest extends TestCase 'id' => Random::str(36, 50), 'status' => Random::value(SelfEmployedStatus::getValidValues()), 'test' => Random::bool(), - 'itn' => Random::str(11, 11,'0123456789'), + 'itn' => Random::str(11, 11, '0123456789'), 'phone' => null, 'created_at' => date(YOOKASSA_DATE, mt_rand(1, time())), 'confirmation' => null, @@ -388,8 +389,8 @@ class SelfEmployedResponseTest extends TestCase 'id' => Random::str(36, 50), 'status' => Random::value(SelfEmployedStatus::getValidValues()), 'test' => Random::bool(), - 'itn' => Random::str(11, 11,'0123456789'), - 'phone' => Random::str(11, 11,'0123456789'), + 'itn' => Random::str(11, 11, '0123456789'), + 'phone' => Random::str(11, 11, '0123456789'), 'created_at' => date(YOOKASSA_DATE, mt_rand(1, time())), 'confirmation' => $confirmFactory->factory(Random::value($confirmTypes)), ); @@ -406,7 +407,7 @@ class SelfEmployedResponseTest extends TestCase 'id' => null, 'test' => null, 'status' => null, - 'itn' => new \stdClass(), + 'itn' => new stdClass(), 'phone' => array(), 'created_at' => null, 'confirmation' => array('type' => null), @@ -418,24 +419,24 @@ class SelfEmployedResponseTest extends TestCase 'test' => 'null', 'status' => '', 'itn' => array(), - 'phone' => new \stdClass(), + 'phone' => new stdClass(), 'created_at' => array(), - 'confirmation' => new \stdClass(), + 'confirmation' => new stdClass(), ), ), ); for ($i = 0; $i < 10; $i++) { $selfEmployed = array( 'id' => Random::str($i < 5 ? mt_rand(1, 35) : mt_rand(51, 64)), - 'test' => $i % 2 ? Random::str(10) : new \stdClass(), + 'test' => $i % 2 ? Random::str(10) : new stdClass(), 'status' => Random::str(1, 35), - 'phone' => $i % 2 ? new \stdClass() : array(), - 'itn' => $i % 2 ? new \stdClass() : array(), + 'phone' => $i % 2 ? new stdClass() : array(), + 'itn' => $i % 2 ? new stdClass() : array(), 'created_at' => $i === 0 ? '23423-234-32' : -Random::int(), 'confirmation' => Random::value(array( array('type' => null), array('type' => true), - array('type' => new \stdClass()), + array('type' => new stdClass()), array('type' => array()), array('type' => 'fake'), )), diff --git a/tests/Request/Webhook/WebhookListResponseTest.php b/tests/Request/Webhook/WebhookListResponseTest.php index 4aa29283..901d4b6b 100644 --- a/tests/Request/Webhook/WebhookListResponseTest.php +++ b/tests/Request/Webhook/WebhookListResponseTest.php @@ -25,6 +25,7 @@ namespace Tests\YooKassa\Request\Webhook; +use Exception; use PHPUnit\Framework\TestCase; use YooKassa\Helpers\Random; use YooKassa\Model\NotificationEventType; @@ -36,7 +37,7 @@ class WebhookListResponseTest extends TestCase /** * @dataProvider validDataProvider * @param array $options - * @throws \Exception + * @throws Exception */ public function testGetType($options) { @@ -48,7 +49,7 @@ class WebhookListResponseTest extends TestCase /** * @dataProvider validDataProvider * @param array $options - * @throws \Exception + * @throws Exception */ public function testGetItems($options) {