CotisationTest.php 721 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace App\Tests\Application\Cotisation;
  3. use App\Tests\Application\OtWebTestCase;
  4. class CotisationTest extends OtWebTestCase
  5. {
  6. public function testGetCotisationId(): void
  7. {
  8. // TODO : ces tests nécessitent la base de données adminassos pour fonctionner
  9. $this->loginAs($this->user);
  10. $this->assertResponseIsSuccessful();
  11. $this->get('/api/cotisations/1');
  12. $this->assertResponseStatusCodeSame(200);
  13. $this->assertJsonContains([
  14. '@context' => '/api/contexts/Cotisation',
  15. '@id' => '/api/cotisations/1',
  16. '@type' => 'Cotisation',
  17. 'organizationId' => 1,
  18. 'alertState' => 'null',
  19. 'cotisationYear' => 2021
  20. ]);
  21. }
  22. }