diff --git a/src/Events/StatusChange.php b/src/Events/StatusChange.php index 68e817e..5c21c11 100644 --- a/src/Events/StatusChange.php +++ b/src/Events/StatusChange.php @@ -36,4 +36,8 @@ class StatusChange * @var object */ public $extraData; -} \ No newline at end of file + /** + * @var StatusChangeOrigin + */ + public $origin; +} diff --git a/src/Events/StatusChangeOrigin.php b/src/Events/StatusChangeOrigin.php new file mode 100644 index 0000000..b55dfad --- /dev/null +++ b/src/Events/StatusChangeOrigin.php @@ -0,0 +1,17 @@ +status); self::assertEquals($event->id, $statusChange->eventId); self::assertEquals((object)["foo" => "bar"], $statusChange->extraData); + self::assertEquals("API_CALL", $statusChange->origin->type); + self::assertNotNull($statusChange->origin->ip); } public function testFilter() @@ -134,4 +136,4 @@ public function testSortDesc() self::assertEquals(["B-1", "A-3", "A-2", "A-1"], array_values($objectIds)); } -} \ No newline at end of file +}