| 12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace App\Tests\Application;
- use App\Entity\Billing\ResidenceArea;
- use App\Tests\Application\OtWebTestCase;
- class ResidenceAreaTest extends OtWebTestCase
- {
- public function testGetResidenceAreas(): void
- {
- $this->loginAs($this->user);
- // $this->client->request('GET', '/api/residence_areas');
- // $this->assertResponseIsSuccessful();
- // $this->assertMatchesResourceCollectionJsonSchema(ResidenceArea::class);
- if($this->user->getPerson()) {
- $this->get('/api/residence_areas');
- $this->validateCollectionSchema(ResidenceArea::class);
- $this->assertJsonContains([
- '@context' => '/api/contexts/ResidenceArea',
- '@id' => '/api/residence_areas',
- '@type' => 'hydra:Collection',
- 'hydra:totalItems' => 1,
- 'hydra:member' => [
- ["label" => "My Residence Area"]
- ],
- ]);
- }
- }
- }
|