Добавлено поле refund_method в возвратах. Добавлено поле sbp_operation_id в PaymentMethodSbp

Добавлено поле `merchant_customer_bank_account` в объекте `FraudData`
Добавлен статус самозанятого `unregistered`
Добавлен список провайдеров онлайн-касс `FiscalizationProvider`
Добавлен объект Me с подобъектом `Fiscalization`
This commit is contained in:
Антон Н. Николаев
2023-12-11 15:15:42 +03:00
parent 747c1ec817
commit 31dc0221be
399 changed files with 7631 additions and 731 deletions
@@ -0,0 +1,49 @@
<?php
namespace Tests\YooKassa\Model\Refund\RefundMethod;
use InvalidArgumentException;
use PHPUnit\Framework\TestCase;
use YooKassa\Helpers\Random;
use YooKassa\Model\Refund\RefundMethod\AbstractRefundMethod;
abstract class AbstractTestRefundMethod extends TestCase
{
public function testGetType(): void
{
$instance = $this->getTestInstance();
self::assertEquals($this->getExpectedType(), $instance->getType());
}
/**
* @dataProvider invalidTypeDataProvider
*/
public function testInvalidType(mixed $value): void
{
$this->expectException(InvalidArgumentException::class);
new TestRefundData($value);
}
public static function invalidTypeDataProvider()
{
return [
[''],
[null],
[Random::str(40)],
[0],
];
}
abstract protected function getTestInstance(): AbstractRefundMethod;
abstract protected function getExpectedType(): string;
}
class TestRefundData extends AbstractRefundMethod
{
public function __construct($type)
{
parent::__construct([]);
$this->setType($type);
}
}