ClientExceptionTest.php 829 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace AlibabaCloud\Client\Tests\LowerthanVersion7_2\Unit\Exception;
  3. use PHPUnit\Framework\TestCase;
  4. use AlibabaCloud\Client\Exception\ClientException;
  5. /**
  6. * Class ClientExceptionTest
  7. *
  8. * @package AlibabaCloud\Client\Tests\LowerthanVersion7_2\Unit\Exception
  9. *
  10. * @coversDefaultClass \AlibabaCloud\Client\Exception\ClientException
  11. */
  12. class ClientExceptionTest extends TestCase
  13. {
  14. /**
  15. * @covers ::__construct
  16. */
  17. public function testConstruct()
  18. {
  19. // Setup
  20. $errorMessage = 'message';
  21. $errorCode = 'code';
  22. // Test
  23. $exception = new ClientException($errorMessage, $errorCode);
  24. // Assert
  25. static::assertEquals($errorMessage, $exception->getErrorMessage());
  26. static::assertEquals($errorCode, $exception->getErrorCode());
  27. }
  28. }