SampleCodeTest.php 570 B

123456789101112131415161718192021222324
  1. <?php
  2. require __DIR__ .'/../vendor/autoload.php';
  3. use PHPUnit\Framework\TestCase;
  4. class SampleCodeTest extends TestCase
  5. {
  6. /**
  7. * Result of using SendMessage() should be a TextClientResult object.
  8. */
  9. public function testResultModel()
  10. {
  11. $client = new \CMText\TextClient('your-api-key', \CMText\Gateways::GLOBAL);
  12. $response = $client->SendMessage('test message', 'CM.com', ['00334455667788'], 'Your_Reference');
  13. $this->assertInstanceOf(
  14. \CMText\TextClientResult::class,
  15. $response
  16. );
  17. }
  18. }