PublicEventsTest.php 644 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace App\Tests\Application\Public;
  3. use App\Entity\Public\PublicEvent;
  4. use App\Tests\Application\OtWebTestCase;
  5. class PublicEventsTest extends OtWebTestCase
  6. {
  7. public function testEvents(): void
  8. {
  9. $this->get('/api/public/events');
  10. $this->validateCollectionSchema(PublicEvent::class);
  11. $this->assertJsonContains([
  12. '@context' => '/api/contexts/PublicEvent',
  13. '@id' => '/api/public/events',
  14. '@type' => 'hydra:Collection',
  15. 'hydra:totalItems' => 1,
  16. 'hydra:member' => [
  17. ["name" => "My Event"]
  18. ],
  19. ]);
  20. }
  21. }