| @@ 60-78 (lines=19) @@ | ||
| 57 | */ |
|
| 58 | private $precheckRequest; |
|
| 59 | ||
| 60 | protected function setUp() |
|
| 61 | { |
|
| 62 | $this->objectManager = $this->getObjectManager(); |
|
| 63 | ||
| 64 | $info = $this->getMockBuilder(Info::class)->disableOriginalConstructor()->getMock(); |
|
| 65 | $info->method('getAdditionalInformation')->willReturn('value'); |
|
| 66 | ||
| 67 | $toolkitHelper = $this->getMockBuilder(Toolkit::class)->disableOriginalConstructor()->getMock(); |
|
| 68 | $toolkitHelper->method('getAdditionalDataEntry')->willReturn('value'); |
|
| 69 | ||
| 70 | $checkoutSession = $this->getMockBuilder(Session::class)->disableOriginalConstructor()->setMethods(['getInstallmentWorkorderId'])->getMock(); |
|
| 71 | $checkoutSession->method('getInstallmentWorkorderId')->willReturn('WORKORDERID'); |
|
| 72 | ||
| 73 | $this->classToTest = $this->objectManager->getObject(ClassToTest::class, [ |
|
| 74 | 'toolkitHelper' => $toolkitHelper, |
|
| 75 | 'checkoutSession' => $checkoutSession, |
|
| 76 | ]); |
|
| 77 | $this->classToTest->setInfoInstance($info); |
|
| 78 | } |
|
| 79 | ||
| 80 | public function testGetAuthorizationMode() |
|
| 81 | { |
|
| @@ 49-69 (lines=21) @@ | ||
| 46 | */ |
|
| 47 | private $objectManager; |
|
| 48 | ||
| 49 | protected function setUp() |
|
| 50 | { |
|
| 51 | $this->objectManager = $this->getObjectManager(); |
|
| 52 | ||
| 53 | $resourceModel = $this->getMockBuilder(ResourceModel::class)->disableOriginalConstructor()->getMock(); |
|
| 54 | $resourceModel->method('getAppointedIdByTxid')->willReturn('12345'); |
|
| 55 | ||
| 56 | $transactionStatus = $this->getMockBuilder(TransactionStatus::class)->disableOriginalConstructor()->getMock(); |
|
| 57 | $transactionStatus->method('load')->willReturn($transactionStatus); |
|
| 58 | ||
| 59 | $transactionStatusFactory = $this->getMockBuilder(TransactionStatusFactory::class) |
|
| 60 | ->disableOriginalConstructor() |
|
| 61 | ->setMethods(['create']) |
|
| 62 | ->getMock(); |
|
| 63 | $transactionStatusFactory->method('create')->willReturn($transactionStatus); |
|
| 64 | ||
| 65 | $this->classToTest = $this->objectManager->getObject(ClassToTest::class, [ |
|
| 66 | 'resourceModel' => $resourceModel, |
|
| 67 | 'transactionStatusFactory' => $transactionStatusFactory |
|
| 68 | ]); |
|
| 69 | } |
|
| 70 | ||
| 71 | public function testGetAppointedByTxid() |
|
| 72 | { |
|