Skip to content

Commit

Permalink
tests - refactor KuveytPosRequestDataMapperTest
Browse files Browse the repository at this point in the history
  • Loading branch information
nuryagdym committed Mar 30, 2024
1 parent cec6841 commit 61bebda
Showing 1 changed file with 2 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@
use Mews\Pos\DataMapper\RequestDataMapper\KuveytPosRequestDataMapper;
use Mews\Pos\Entity\Account\KuveytPosAccount;
use Mews\Pos\Entity\Card\CreditCardInterface;
use Mews\Pos\Exceptions\BankClassNullException;
use Mews\Pos\Exceptions\BankNotFoundException;
use Mews\Pos\Exceptions\UnsupportedTransactionTypeException;
use Mews\Pos\Factory\AccountFactory;
use Mews\Pos\Factory\CreditCardFactory;
use Mews\Pos\Factory\CryptFactory;
use Mews\Pos\Factory\PosFactory;
use Mews\Pos\Gateways\KuveytPos;
use Mews\Pos\PosInterface;
use PHPUnit\Framework\TestCase;
Expand All @@ -27,24 +24,16 @@
*/
class KuveytPosRequestDataMapperTest extends TestCase
{
public KuveytPosAccount $account;
private KuveytPosAccount $account;

private CreditCardInterface $card;

private KuveytPosRequestDataMapper $requestDataMapper;

/**
* @return void
*
* @throws BankClassNullException
* @throws BankNotFoundException
*/
protected function setUp(): void
{
parent::setUp();

$config = require __DIR__.'/../../../../config/pos_test.php';

$this->account = AccountFactory::createKuveytPosAccount(
'kuveytpos',
'80',
Expand All @@ -54,10 +43,8 @@ protected function setUp(): void
);

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

$this->card = CreditCardFactory::createForGateway(
$pos,
$this->card = CreditCardFactory::create(
'4155650100416111',
25,
1,
Expand Down

0 comments on commit 61bebda

Please sign in to comment.