Test/Unit/Observer/AddPaypalExpressButtonTest.php 1 location
|
@@ 68-75 (lines=8) @@
|
| 65 |
|
]); |
| 66 |
|
} |
| 67 |
|
|
| 68 |
|
public function testExecutePaypalInactive() |
| 69 |
|
{ |
| 70 |
|
$this->paymentHelper->method('isPayPalExpressActive')->willReturn(false); |
| 71 |
|
$observer = $this->getMockBuilder(Observer::class)->disableOriginalConstructor()->getMock(); |
| 72 |
|
|
| 73 |
|
$result = $this->classToTest->execute($observer); |
| 74 |
|
$this->assertNull($result); |
| 75 |
|
} |
| 76 |
|
|
| 77 |
|
public function testExecutePaypalActive() |
| 78 |
|
{ |
Test/Unit/Observer/PredispatchCheckoutIndexTest.php 1 location
|
@@ 96-102 (lines=7) @@
|
| 93 |
|
]); |
| 94 |
|
} |
| 95 |
|
|
| 96 |
|
public function testExecute() |
| 97 |
|
{ |
| 98 |
|
$observer = $this->getMockBuilder(Observer::class)->disableOriginalConstructor()->getMock(); |
| 99 |
|
|
| 100 |
|
$result = $this->classToTest->execute($observer); |
| 101 |
|
$this->assertNull($result); |
| 102 |
|
} |
| 103 |
|
|
| 104 |
|
public function testExecuteLocalizedException() |
| 105 |
|
{ |
Test/Unit/Observer/CheckoutSubmitBeforeTest.php 1 location
|
@@ 297-304 (lines=8) @@
|
| 294 |
|
$this->assertNull($result); |
| 295 |
|
} |
| 296 |
|
|
| 297 |
|
public function testExecuteNoQuote() |
| 298 |
|
{ |
| 299 |
|
$observer = $this->getMockBuilder(Observer::class)->disableOriginalConstructor()->setMethods(['getQuote'])->getMock(); |
| 300 |
|
$observer->method('getQuote')->willReturn(null); |
| 301 |
|
|
| 302 |
|
$result = $this->classToTest->execute($observer); |
| 303 |
|
$this->assertNull($result); |
| 304 |
|
} |
| 305 |
|
|
| 306 |
|
public function testExecuteException() |
| 307 |
|
{ |
Test/Unit/Observer/Transactionstatus/AppointedTest.php 1 location
|
@@ 130-137 (lines=8) @@
|
| 127 |
|
$this->assertNull($result); |
| 128 |
|
} |
| 129 |
|
|
| 130 |
|
public function testExecuteNoOrder() |
| 131 |
|
{ |
| 132 |
|
$observer = $this->getMockBuilder(Observer::class)->disableOriginalConstructor()->setMethods(['getOrder'])->getMock(); |
| 133 |
|
$observer->method('getOrder')->willReturn(null); |
| 134 |
|
|
| 135 |
|
$result = $this->classToTest->execute($observer); |
| 136 |
|
$this->assertNull($result); |
| 137 |
|
} |
| 138 |
|
} |
| 139 |
|
|
Test/Unit/Observer/Transactionstatus/PaidTest.php 1 location
|
@@ 97-104 (lines=8) @@
|
| 94 |
|
$this->assertNull($result); |
| 95 |
|
} |
| 96 |
|
|
| 97 |
|
public function testExecuteNoOrder() |
| 98 |
|
{ |
| 99 |
|
$observer = $this->getMockBuilder(Observer::class)->disableOriginalConstructor()->setMethods(['getOrder'])->getMock(); |
| 100 |
|
$observer->method('getOrder')->willReturn(null); |
| 101 |
|
|
| 102 |
|
$result = $this->classToTest->execute($observer); |
| 103 |
|
$this->assertNull($result); |
| 104 |
|
} |
| 105 |
|
} |
| 106 |
|
|