Test/Unit/Observer/AddPaypalExpressButtonTest.php 1 location
|
@@ 66-73 (lines=8) @@
|
| 63 |
|
]); |
| 64 |
|
} |
| 65 |
|
|
| 66 |
|
public function testExecutePaypalInactive() |
| 67 |
|
{ |
| 68 |
|
$this->paymentHelper->method('isPayPalExpressActive')->willReturn(false); |
| 69 |
|
$observer = $this->getMockBuilder(Observer::class)->disableOriginalConstructor()->getMock(); |
| 70 |
|
|
| 71 |
|
$result = $this->classToTest->execute($observer); |
| 72 |
|
$this->assertNull($result); |
| 73 |
|
} |
| 74 |
|
|
| 75 |
|
public function testExecutePaypalActive() |
| 76 |
|
{ |
Test/Unit/Observer/PredispatchCheckoutIndexTest.php 1 location
|
@@ 94-100 (lines=7) @@
|
| 91 |
|
]); |
| 92 |
|
} |
| 93 |
|
|
| 94 |
|
public function testExecute() |
| 95 |
|
{ |
| 96 |
|
$observer = $this->getMockBuilder(Observer::class)->disableOriginalConstructor()->getMock(); |
| 97 |
|
|
| 98 |
|
$result = $this->classToTest->execute($observer); |
| 99 |
|
$this->assertNull($result); |
| 100 |
|
} |
| 101 |
|
|
| 102 |
|
public function testExecuteException() |
| 103 |
|
{ |
Test/Unit/Observer/Transactionstatus/AppointedTest.php 1 location
|
@@ 89-96 (lines=8) @@
|
| 86 |
|
$this->assertNull($result); |
| 87 |
|
} |
| 88 |
|
|
| 89 |
|
public function testExecuteNoOrder() |
| 90 |
|
{ |
| 91 |
|
$observer = $this->getMockBuilder(Observer::class)->disableOriginalConstructor()->setMethods(['getOrder'])->getMock(); |
| 92 |
|
$observer->method('getOrder')->willReturn(null); |
| 93 |
|
|
| 94 |
|
$result = $this->classToTest->execute($observer); |
| 95 |
|
$this->assertNull($result); |
| 96 |
|
} |
| 97 |
|
} |
| 98 |
|
|
Test/Unit/Observer/Transactionstatus/PaidTest.php 1 location
|
@@ 78-85 (lines=8) @@
|
| 75 |
|
$this->assertNull($result); |
| 76 |
|
} |
| 77 |
|
|
| 78 |
|
public function testExecuteNoOrder() |
| 79 |
|
{ |
| 80 |
|
$observer = $this->getMockBuilder(Observer::class)->disableOriginalConstructor()->setMethods(['getOrder'])->getMock(); |
| 81 |
|
$observer->method('getOrder')->willReturn(null); |
| 82 |
|
|
| 83 |
|
$result = $this->classToTest->execute($observer); |
| 84 |
|
$this->assertNull($result); |
| 85 |
|
} |
| 86 |
|
} |
| 87 |
|
|