| 1234567891011121314151617181920212223242526 |
- <?php
- namespace App\Tests\Application\Utils;
- use App\Tests\Application\OtWebTestCase;
- class SiretTest extends OtWebTestCase
- {
- public function testSiretResource(): void
- {
- $this->logger->info("\033[1;34mStarting test... Siret check\033[0m");
- $this->loginAs($this->user);
- $this->get('/api/siret-checking/34919841600035');
- $this->logger->info("\033[1;34mRequest made to /api/siret-checking/34919841600035\033[0m");
- $this->assertResponseStatusCodeSame(200);
- $this->logger->info("\033[1;34mReceived status code 200\033[0m");
- $this->assertJsonContains([
- '@context' => '/api/contexts/Siret',
- '@id' => '/api/siret-checking/34919841600035',
- '@type' => 'Siret',
- 'number' => '34919841600035',
- 'isCorrect' => true,
- ]);
- $this->logger->info("\033[1;32mTest 'Siret check' succeeded\033[0m");
- }
- }
|