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