@@ 53-92 (lines=40) @@ | ||
50 | */ |
|
51 | private $info; |
|
52 | ||
53 | protected function setUp() |
|
54 | { |
|
55 | $this->objectManager = new ObjectManager($this); |
|
56 | ||
57 | $order = $this->getMockBuilder(Order::class)->disableOriginalConstructor()->getMock(); |
|
58 | $order->method('getPayoneTxid')->willReturn('12345'); |
|
59 | $order->method('getPayoneClearingReference')->willReturn('REFERENCE'); |
|
60 | ||
61 | $this->info = $this->getMockBuilder(Info::class) |
|
62 | ->disableOriginalConstructor() |
|
63 | ->setMethods(['getLastTransId', 'getOrder']) |
|
64 | ->getMock(); |
|
65 | $this->info->method('getOrder')->willReturn($order); |
|
66 | ||
67 | $transactionStatus = $this->getMockBuilder(TransactionStatus::class) |
|
68 | ->disableOriginalConstructor() |
|
69 | ->setMethods([ |
|
70 | 'getClearingBankcode', |
|
71 | 'getClearingBankaccountholder', |
|
72 | 'getClearingBankaccount', |
|
73 | 'getClearingBankiban', |
|
74 | 'getClearingBankbic', |
|
75 | 'getClearingBankname' |
|
76 | ]) |
|
77 | ->getMock(); |
|
78 | $transactionStatus->method('getClearingBankcode')->willReturn('12345'); |
|
79 | $transactionStatus->method('getClearingBankaccountholder')->willReturn('12345'); |
|
80 | $transactionStatus->method('getClearingBankaccount')->willReturn('12345'); |
|
81 | $transactionStatus->method('getClearingBankiban')->willReturn('12345'); |
|
82 | $transactionStatus->method('getClearingBankbic')->willReturn('12345'); |
|
83 | $transactionStatus->method('getClearingBankname')->willReturn('12345'); |
|
84 | ||
85 | $transactionStatusRepository = $this->getMockBuilder(TransactionStatusRepository::class)->disableOriginalConstructor()->getMock(); |
|
86 | $transactionStatusRepository->method('getAppointedByTxid')->willReturn($transactionStatus); |
|
87 | ||
88 | $this->classToTest = $this->objectManager->getObject(ClassToTest::class, [ |
|
89 | 'transactionStatusRepository' => $transactionStatusRepository |
|
90 | ]); |
|
91 | $this->classToTest->setInfo($this->info); |
|
92 | } |
|
93 | ||
94 | public function testPrepareSpecificInformation() |
|
95 | { |
@@ 53-91 (lines=39) @@ | ||
50 | */ |
|
51 | private $info; |
|
52 | ||
53 | protected function setUp() |
|
54 | { |
|
55 | $this->objectManager = new ObjectManager($this); |
|
56 | ||
57 | $order = $this->getMockBuilder(Order::class)->disableOriginalConstructor()->getMock(); |
|
58 | $order->method('getPayoneTxid')->willReturn('12345'); |
|
59 | ||
60 | $this->info = $this->getMockBuilder(Info::class) |
|
61 | ->disableOriginalConstructor() |
|
62 | ->setMethods(['getLastTransId', 'getOrder']) |
|
63 | ->getMock(); |
|
64 | $this->info->method('getOrder')->willReturn($order); |
|
65 | ||
66 | $transactionStatus = $this->getMockBuilder(TransactionStatus::class) |
|
67 | ->disableOriginalConstructor() |
|
68 | ->setMethods([ |
|
69 | 'getClearingBankcode', |
|
70 | 'getClearingBankaccountholder', |
|
71 | 'getClearingBankaccount', |
|
72 | 'getClearingBankiban', |
|
73 | 'getClearingBankbic', |
|
74 | 'getClearingBankname' |
|
75 | ]) |
|
76 | ->getMock(); |
|
77 | $transactionStatus->method('getClearingBankcode')->willReturn('12345'); |
|
78 | $transactionStatus->method('getClearingBankaccountholder')->willReturn('12345'); |
|
79 | $transactionStatus->method('getClearingBankaccount')->willReturn('12345'); |
|
80 | $transactionStatus->method('getClearingBankiban')->willReturn('12345'); |
|
81 | $transactionStatus->method('getClearingBankbic')->willReturn('12345'); |
|
82 | $transactionStatus->method('getClearingBankname')->willReturn('12345'); |
|
83 | ||
84 | $transactionStatusRepository = $this->getMockBuilder(TransactionStatusRepository::class)->disableOriginalConstructor()->getMock(); |
|
85 | $transactionStatusRepository->method('getAppointedByTxid')->willReturn($transactionStatus); |
|
86 | ||
87 | $this->classToTest = $this->objectManager->getObject(ClassToTest::class, [ |
|
88 | 'transactionStatusRepository' => $transactionStatusRepository |
|
89 | ]); |
|
90 | $this->classToTest->setInfo($this->info); |
|
91 | } |
|
92 | ||
93 | public function testPrepareSpecificInformation() |
|
94 | { |