Skip to content

Commit 61bebda

Browse files
committed
tests - refactor KuveytPosRequestDataMapperTest
1 parent cec6841 commit 61bebda

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

tests/Unit/DataMapper/RequestDataMapper/KuveytPosRequestDataMapperTest.php

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,10 @@
99
use Mews\Pos\DataMapper\RequestDataMapper\KuveytPosRequestDataMapper;
1010
use Mews\Pos\Entity\Account\KuveytPosAccount;
1111
use Mews\Pos\Entity\Card\CreditCardInterface;
12-
use Mews\Pos\Exceptions\BankClassNullException;
13-
use Mews\Pos\Exceptions\BankNotFoundException;
1412
use Mews\Pos\Exceptions\UnsupportedTransactionTypeException;
1513
use Mews\Pos\Factory\AccountFactory;
1614
use Mews\Pos\Factory\CreditCardFactory;
1715
use Mews\Pos\Factory\CryptFactory;
18-
use Mews\Pos\Factory\PosFactory;
1916
use Mews\Pos\Gateways\KuveytPos;
2017
use Mews\Pos\PosInterface;
2118
use PHPUnit\Framework\TestCase;
@@ -27,24 +24,16 @@
2724
*/
2825
class KuveytPosRequestDataMapperTest extends TestCase
2926
{
30-
public KuveytPosAccount $account;
27+
private KuveytPosAccount $account;
3128

3229
private CreditCardInterface $card;
3330

3431
private KuveytPosRequestDataMapper $requestDataMapper;
3532

36-
/**
37-
* @return void
38-
*
39-
* @throws BankClassNullException
40-
* @throws BankNotFoundException
41-
*/
4233
protected function setUp(): void
4334
{
4435
parent::setUp();
4536

46-
$config = require __DIR__.'/../../../../config/pos_test.php';
47-
4837
$this->account = AccountFactory::createKuveytPosAccount(
4938
'kuveytpos',
5039
'80',
@@ -54,10 +43,8 @@ protected function setUp(): void
5443
);
5544

5645
$dispatcher = $this->createMock(EventDispatcherInterface::class);
57-
$pos = PosFactory::createPosGateway($this->account, $config, $dispatcher);
5846

59-
$this->card = CreditCardFactory::createForGateway(
60-
$pos,
47+
$this->card = CreditCardFactory::create(
6148
'4155650100416111',
6249
25,
6350
1,

0 commit comments

Comments
 (0)