Skip to content

Commit

Permalink
Switched to new venue types
Browse files Browse the repository at this point in the history
  • Loading branch information
mroloux committed Jul 15, 2024
1 parent ea20408 commit e99e4a7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions tests/Charts/CopyChartTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ class CopyChartTest extends SeatsioClientTest

public function test()
{
$chart = $this->seatsioClient->charts->create('my chart', 'BOOTHS');
$chart = $this->seatsioClient->charts->create('my chart', 'SIMPLE');

$copiedChart = $this->seatsioClient->charts->copy($chart->key);

self::assertEquals('my chart (copy)', $copiedChart->name);
self::assertNotEquals($chart->key, $copiedChart->key);
$retrievedChart = $this->seatsioClient->charts->retrievePublishedVersion($copiedChart->key);
self::assertEquals('BOOTHS', $retrievedChart->venueType);
self::assertEquals('SIMPLE', $retrievedChart->venueType);
}

}
}
12 changes: 6 additions & 6 deletions tests/Charts/CreateChartTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function testCreateChartWithDefaultParameters()
self::assertFalse($chart->archived);

$retrievedChart = $this->seatsioClient->charts->retrievePublishedVersion($chart->key);
self::assertEquals('MIXED', $retrievedChart->venueType);
self::assertEquals('SIMPLE', $retrievedChart->venueType);
self::assertEmpty($retrievedChart->categories->list);
}

Expand All @@ -31,17 +31,17 @@ public function testCreateChartWithName()

$retrievedChart = $this->seatsioClient->charts->retrievePublishedVersion($chart->key);
self::assertEquals('aChart', $retrievedChart->name);
self::assertEquals('MIXED', $retrievedChart->venueType);
self::assertEquals('SIMPLE', $retrievedChart->venueType);
self::assertEmpty($retrievedChart->categories->list);
}

public function testCreateChartWithVenueType()
{
$chart = $this->seatsioClient->charts->create(null, 'BOOTHS');
$chart = $this->seatsioClient->charts->create(null, 'SIMPLE');

$retrievedChart = $this->seatsioClient->charts->retrievePublishedVersion($chart->key);
self::assertEquals('Untitled chart', $retrievedChart->name);
self::assertEquals('BOOTHS', $retrievedChart->venueType);
self::assertEquals('SIMPLE', $retrievedChart->venueType);
self::assertEmpty($retrievedChart->categories->list);
}

Expand All @@ -54,7 +54,7 @@ public function testCreateChartWithCategoriesAsAssociativeArray()

$retrievedChart = $this->seatsioClient->charts->retrievePublishedVersion($chart->key);
self::assertEquals('Untitled chart', $retrievedChart->name);
self::assertEquals('MIXED', $retrievedChart->venueType);
self::assertEquals('SIMPLE', $retrievedChart->venueType);
self::assertEquals([(object)$cat1, (object)$cat2], $retrievedChart->categories->list);
}

Expand All @@ -71,7 +71,7 @@ public function testCreateChartWithCategoriesAsObjects()
];
$retrievedChart = $this->seatsioClient->charts->retrievePublishedVersion($chart->key);
self::assertEquals('Untitled chart', $retrievedChart->name);
self::assertEquals('MIXED', $retrievedChart->venueType);
self::assertEquals('SIMPLE', $retrievedChart->venueType);
self::assertEquals($expectedCategories, $retrievedChart->categories->list);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Charts/ListAllChartsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function testAllFieldsExpanded()
return $event->id;
});
self::assertEquals([$event2->id, $event1->id], array_values($eventIds));
self::assertEquals("ZONES", $charts->current()->venueType);
self::assertEquals("WITH_ZONES", $charts->current()->venueType);
self::assertEquals([new Zone("finishline", "Finish Line"), new Zone("midtrack", "Mid Track")], $charts->current()->zones);
self::assertNotNull($charts->current()->validation);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/Charts/RetrievePublishedVersionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ public function test()
$retrievedChart = $this->seatsioClient->charts->retrievePublishedVersion($chart->key);

self::assertEquals('Untitled chart', $retrievedChart->name);
self::assertEquals('MIXED', $retrievedChart->venueType);
self::assertEquals('SIMPLE', $retrievedChart->venueType);
self::assertEmpty($retrievedChart->categories->list);
self::assertNotEmpty($retrievedChart->subChart);
}

}
}

0 comments on commit e99e4a7

Please sign in to comment.