|
@@ 112-119 (lines=8) @@
|
| 109 |
|
$whenNotSuppressed = null; |
| 110 |
|
$whenSuppressed = null; |
| 111 |
|
$chain->then( |
| 112 |
|
function(ErrorControlChainTest_Chain $chain) |
| 113 |
|
use(&$initialValue, &$whenNotSuppressed, &$whenSuppressed) { |
| 114 |
|
$initialValue = $chain->getDisplayErrors(); |
| 115 |
|
$chain->setSuppression(false); |
| 116 |
|
$whenNotSuppressed = $chain->getDisplayErrors(); |
| 117 |
|
$chain->setSuppression(true); |
| 118 |
|
$whenSuppressed = $chain->getDisplayErrors(); |
| 119 |
|
} |
| 120 |
|
)->execute(); |
| 121 |
|
|
| 122 |
|
// Disabled errors never un-disable |
|
@@ 135-142 (lines=8) @@
|
| 132 |
|
$whenNotSuppressed = null; |
| 133 |
|
$whenSuppressed = null; |
| 134 |
|
$chain->then( |
| 135 |
|
function(ErrorControlChainTest_Chain $chain) |
| 136 |
|
use(&$initialValue, &$whenNotSuppressed, &$whenSuppressed) { |
| 137 |
|
$initialValue = $chain->getDisplayErrors(); |
| 138 |
|
$chain->setSuppression(true); |
| 139 |
|
$whenSuppressed = $chain->getDisplayErrors(); |
| 140 |
|
$chain->setSuppression(false); |
| 141 |
|
$whenNotSuppressed = $chain->getDisplayErrors(); |
| 142 |
|
} |
| 143 |
|
)->execute(); |
| 144 |
|
|
| 145 |
|
// Errors can be suppressed an un-suppressed when initially enabled |