ClientTest.php 424 B

1234567891011121314151617181920
  1. <?php
  2. declare(strict_types=1);
  3. namespace Tests\Http;
  4. use MeiliSearch\Client;
  5. use MeiliSearch\Exceptions\CommunicationException;
  6. use Tests\TestCase;
  7. class ClientTest extends TestCase
  8. {
  9. public function testThrowCommunicationException(): void
  10. {
  11. $client = new Client('http://wrongurl:1234');
  12. $this->expectException(CommunicationException::class);
  13. $client->createIndex('some_index');
  14. }
  15. }