Skip to content

Commit

Permalink
add test as an example to show how to pass in extra data in batch call (
Browse files Browse the repository at this point in the history
  • Loading branch information
bverbeken authored Dec 19, 2024
1 parent 5a9a47a commit 95ca915
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/Events/ChangeObjectStatusInBatchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ public function test()
self::assertEquals("lolzor", $objectInfo2->status);
}

public function testCanPassInExtraData()
{
$chartKey1 = $this->createTestChart();
$event1 = $this->seatsioClient->events->create($chartKey1);

$response = $this->seatsioClient->events->changeObjectStatusInBatch([
(new StatusChangeRequest())->setEvent($event1->key)->setObjects((new ObjectProperties("A-1"))->setExtraData(["foo" => "bar"]))->setStatus("lolzor"),
]);

self::assertEquals('lolzor', $response[0]->objects['A-1']->status);
$objectInfo1 = $this->seatsioClient->events->retrieveObjectInfo($event1->key, "A-1");
self::assertEquals("bar", $objectInfo1->extraData->foo);
}

public function testChannelKeys()
{
$chartKey = $this->createTestChart();
Expand Down

0 comments on commit 95ca915

Please sign in to comment.