Test your programmable voice twiml call flows, start to finish. Behind the scenes, uses PHPUnit static assertions, and not tested with Pest.
- ☎️ Use twilio's programmable voice for handling phone calls
- 📫 Have multiple endpoints to handle the flow of a call
- 🔀 Multiple paths for the flow of a call
<?php
// ...
use Vehikl\LaravelTwilioProgrammableVoiceTestRig\ProgrammableVoiceRig;
// ...
/** @test */
public function itDoesABasicFlow(): void
{
// ...
}
-
assertTwimlEquals(twml, ...replacements)
(works like sprintf) -
assertTwimlContains(twml, ...replacements)
(works like sprintf) -
assertTwimlOrder([tag1Name, tag2Name])
-
assertRedirect(uri, method)
-
assertSay(textFromASayTag)
-
assertPlay(file)
-
assertDial(phoneNumber)
-
assertPause(numberOfSeconds)
-
assertStream(websocketUrl)
-
assertRecord(attributes)
-
assertGather(attributes, children?)
-
assertCallStatus(status)
-
assertTwilioHit(uri, method = 'POST', byTwimlTag = null)
-
assertCallEnded()
-
assertRejected(reason)
- Ahmed
- Alex
- Brad
- Eric
- Hunter
- Ian
- John I
- John M
- Jeff C
- Justin S
- Ruta