Code Duplication    Length = 13-14 lines in 2 locations

tests/Unit/Webhook/Message/PaymentMessageTest.php 1 location

@@ 114-127 (lines=14) @@
111
        static::assertTrue($message->isDryRun());
112
    }
113
114
    public function testEmptyFields()
115
    {
116
        $requestCopy = $this->request;
117
        unset(
118
            $requestCopy['custom_parameters'],
119
            $requestCopy['transaction']['dry_run'],
120
            $requestCopy['transaction']['external_id']
121
        );
122
        $message = new PaymentMessage($requestCopy);
123
124
        static::assertNull($message->getExternalPaymentId());
125
        static::assertSame([], $message->getCustomParameters());
126
        static::assertFalse($message->isDryRun());
127
    }
128
}
129

tests/Unit/Webhook/Message/UserBalanceMessageTest.php 1 location

@@ 48-60 (lines=13) @@
45
        static::assertSame($this->request['items_operation_type'], $message->getItemsOperationType());
46
    }
47
48
    public function testEmptyFields()
49
    {
50
        $requestCopy = $this->request;
51
        unset(
52
            $requestCopy['virtual_currency_balance'],
53
            $requestCopy['coupon'],
54
            $requestCopy['items_operation_type']
55
        );
56
        $message = new UserBalanceMessage($requestCopy);
57
        static::assertSame([], $message->getCoupon());
58
        static::assertSame([], $message->getVirtualCurrencyBalance());
59
        static::assertNull($message->getItemsOperationType());
60
    }
61
}
62