Files
filament-whatsapp-conector/tests/Unit/EvolutionClientTest.php
Wallace Martins aa606930d2 feat: add WhatsappMessageResource and WhatsappWebhookResource
- Add WhatsappMessageResource to view message history
  - List view with filters by instance, direction, type, status
  - View page with message details and raw payload

- Add WhatsappWebhookResource to view webhook logs
  - List view with filters by instance, event, processed status, errors
  - View page with webhook details, error info and payload

- Update FilamentEvolutionPlugin with optional resource loading:
  - viewMessageHistory() - enable message history resource (default: false)
  - viewWebhookLogs() - enable webhook logs resource (default: false)
  - whatsappInstanceResource() - show/hide instances (default: true)

- Add translations for new resources (en/pt_BR)

- Update README with plugin options documentation

- Fix Filament v4 infolist signature (Schema instead of Infolist)
2025-12-07 12:47:06 -03:00

33 lines
815 B
PHP

<?php
declare(strict_types=1);
namespace WallaceMartinss\FilamentEvolution\Tests\Unit;
use WallaceMartinss\FilamentEvolution\Services\EvolutionClient;
use WallaceMartinss\FilamentEvolution\Tests\TestCase;
class EvolutionClientTest extends TestCase
{
public function test_client_can_be_instantiated(): void
{
$client = new EvolutionClient;
$this->assertInstanceOf(EvolutionClient::class, $client);
}
public function test_client_is_configured_when_has_url_and_key(): void
{
$client = new EvolutionClient;
$this->assertTrue($client->isConfigured());
}
public function test_client_returns_configured_base_url(): void
{
$client = new EvolutionClient;
$this->assertSame('https://api.evolution.test', $client->getBaseUrl());
}
}