PublicEventsTest.php 660 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace App\Tests\Application\Public;
  3. use App\Tests\Application\OtWebTestCase;
  4. class PublicEventsTest extends OtWebTestCase
  5. {
  6. public function testEvents(): void
  7. {
  8. $this->loadSchema();
  9. $response = static::createClient()->request('GET', '/api/public/events');
  10. $this->assertResponseIsSuccessful();
  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. }