Testing
Prueba tu integración de WhatsApp.
Configurar Tests
use Tests\TestCase;
class WhatsappTest extends TestCase
{
public function test_send_text_message()
{
$response = Whatsapp::sendTextMessage(
phoneId: '123456789',
to: '5491234567890',
message: 'Test message'
);
$this->assertTrue($response['success']);
}
}
Ejecutar Tests
php artisan test --filter WhatsappTest
Desarrollo Local
Usa ngrok para probar webhooks localmente:
ngrok http 8000
💡
Testing<br />
Siempre prueba en un entorno de desarrollo antes de producción.