expectException(InvalidArgumentException::class); $instance = new ReceiptResponseFactory(); $instance->factory($value); } public static function invalidFactoryDataProvider(): array { return [ [[]], [ ['type' => new stdClass()]], [ ['type' => SettlementType::POSTPAYMENT]], [ [ 'type' => ReceiptType::PAYMENT, 'refund_id' => 1, ], ], [ [ 'type' => ReceiptType::PAYMENT, 'payment_id' => 1, ], ], [ [ 'type' => ReceiptType::REFUND, 'payment_id' => 1, ], ], ]; } }