| 1234567891011121314151617181920212223242526272829 |
- <?php
- namespace App\Tests\Application\Public;
- use App\Entity\Public\FederationStructure;
- use App\Tests\Application\OtWebTestCase;
- class PublicStructuresTest extends OtWebTestCase
- {
- public function testGetIndex(): void
- {
- $this->loadSchema();
- $crawler = $this->get('api/public/federation_structures');
- $this->validateCollectionSchema(FederationStructure::class);
- $this->assertJsonContains([
- '@context' => '/api/contexts/FederationStructure',
- '@id' => '/api/public/federation_structures',
- '@type' => 'hydra:Collection',
- 'hydra:totalItems' => 1,
- 'hydra:member' => [
- ["name" => "Root2"],
- ["name" => "Other Organization"],
- ],
- ]);
- }
- }
|