You are here

public function ExceptionTest::testConstructorStringMessage in TMGMT Translator Smartling 8.2

Same name in this branch
  1. 8.2 api-sdk-php/tests/unit/ExceptionTest.php \Smartling\Tests\ExceptionTest::testConstructorStringMessage()
  2. 8.2 vendor/smartling/api-sdk-php/tests/unit/ExceptionTest.php \Smartling\Tests\ExceptionTest::testConstructorStringMessage()
Same name and namespace in other branches
  1. 8.4 vendor/smartling/api-sdk-php/tests/unit/ExceptionTest.php \Smartling\Tests\ExceptionTest::testConstructorStringMessage()
  2. 8.3 vendor/smartling/api-sdk-php/tests/unit/ExceptionTest.php \Smartling\Tests\ExceptionTest::testConstructorStringMessage()

Check exception's constructor with string error passed in.

File

vendor/smartling/api-sdk-php/tests/unit/ExceptionTest.php, line 15

Class

ExceptionTest
Test class for Smartling\Exceptions\SmartlingApiException.

Namespace

Smartling\Tests

Code

public function testConstructorStringMessage() {
  $exceptionMessage = 'Exception message';
  $e = new SmartlingApiException($exceptionMessage);
  $this
    ->assertTrue(is_string($e
    ->getMessage()));
  $this
    ->assertNotEmpty($e
    ->getMessage());
  $this
    ->assertSame($exceptionMessage, $e
    ->getMessage());
}