|
@@ 48-57 (lines=10) @@
|
| 45 |
|
* @param \Exception $probableCause An exception that might be the cause of the failure |
| 46 |
|
* @throws GovernorAssertionError |
| 47 |
|
*/ |
| 48 |
|
public function reportDifferenceInStoredVsPublished(array $storedEvents, |
| 49 |
|
array $publishedEvents, \Exception $probableCause = null) |
| 50 |
|
{ |
| 51 |
|
$str = "The stored events do not match the published events."; |
| 52 |
|
$str .= $this->appendEventOverview($storedEvents, $publishedEvents, |
| 53 |
|
"Stored events", "Published events"); |
| 54 |
|
$str .= $this->appendProbableCause($probableCause); |
| 55 |
|
|
| 56 |
|
throw new GovernorAssertionError($str); |
| 57 |
|
} |
| 58 |
|
|
| 59 |
|
/** |
| 60 |
|
* Report an error in the ordering or count of events. This is typically a difference that can be shown to the user |
|
@@ 68-77 (lines=10) @@
|
| 65 |
|
* @param \Exception $probableCause An optional exception that might be the reason for wrong events |
| 66 |
|
* @throws GovernorAssertionError |
| 67 |
|
*/ |
| 68 |
|
public function reportWrongEvent(array $actualEvents, array $expectedEvents, |
| 69 |
|
\Exception $probableCause = null) |
| 70 |
|
{ |
| 71 |
|
$str = "The published events do not match the expected events"; |
| 72 |
|
$str .= $this->appendEventOverview($expectedEvents, $actualEvents, |
| 73 |
|
"Expected", "Actual"); |
| 74 |
|
$str .= $this->appendProbableCause($probableCause); |
| 75 |
|
|
| 76 |
|
throw new GovernorAssertionError($str); |
| 77 |
|
} |
| 78 |
|
|
| 79 |
|
/** |
| 80 |
|
* Report an error in the ordering or count of events. This is typically a difference that can be shown to the user |