Code Duplication    Length = 19-20 lines in 3 locations

tests/Unit/PaytureInPayTerminalTest.php 3 locations

@@ 72-90 (lines=19) @@
69
        ];
70
    }
71
72
    public function testPaymentCharge(): void
73
    {
74
        $this->transport->expects($this->once())
75
            ->method('request')
76
            ->with(
77
                PaytureOperation::CHARGE(),
78
                'apim',
79
                [
80
                    'Key' => 'MerchantKey',
81
                    'OrderId' => 'Order-123',
82
                    'Amount' => 10000,
83
                    'Password' => 'MerchantPassword',
84
                ]
85
            )->willReturn('<Charge Success="True" Amount="10000"/>');
86
87
        $response = $this->terminal->charge('Order-123', 10000);
88
89
        self::assertTrue($response->isSuccess());
90
    }
91
92
    public function testPaymentUnblock(): void
93
    {
@@ 92-110 (lines=19) @@
89
        self::assertTrue($response->isSuccess());
90
    }
91
92
    public function testPaymentUnblock(): void
93
    {
94
        $this->transport->expects($this->once())
95
            ->method('request')
96
            ->with(
97
                PaytureOperation::UNBLOCK(),
98
                'apim',
99
                [
100
                    'Key' => 'MerchantKey',
101
                    'OrderId' => 'Order-123',
102
                    'Amount' => 10000,
103
                    'Password' => 'MerchantPassword',
104
                ]
105
            )->willReturn('<Unblock Success="True"/>');
106
107
        $response = $this->terminal->unblock('Order-123', 10000);
108
109
        self::assertTrue($response->isSuccess());
110
    }
111
112
    public function testPaymentRefund(): void
113
    {
@@ 112-131 (lines=20) @@
109
        self::assertTrue($response->isSuccess());
110
    }
111
112
    public function testPaymentRefund(): void
113
    {
114
        $this->transport->expects($this->once())
115
            ->method('request')
116
            ->with(
117
                PaytureOperation::REFUND(),
118
                'apim',
119
                [
120
                    'Key' => 'MerchantKey',
121
                    'OrderId' => 'Order-123',
122
                    'Amount' => 6000,
123
                    'Password' => 'MerchantPassword',
124
                ]
125
            )->willReturn('<Refund Success="True" NewAmount="4000"/>');
126
127
        $response = $this->terminal->refund('Order-123', 6000);
128
129
        self::assertTrue($response->isSuccess());
130
        self::assertEquals(4000, $response->getAmount());
131
    }
132
133
    public function testPaymentStatus(): void
134
    {