You are here

public function SmsFrameworkMessageEntityTest::testDirectionEntityValidation in SMS Framework 8

Same name and namespace in other branches
  1. 2.x tests/src/Kernel/SmsFrameworkMessageEntityTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkMessageEntityTest::testDirectionEntityValidation()
  2. 2.1.x tests/src/Kernel/SmsFrameworkMessageEntityTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkMessageEntityTest::testDirectionEntityValidation()

Tests entity validation for direction property of SMS message entity.

@covers ::getDirection @covers ::setDirection

File

tests/src/Kernel/SmsFrameworkMessageEntityTest.php, line 109

Class

SmsFrameworkMessageEntityTest
Tests SMS message entity.

Namespace

Drupal\Tests\sms\Kernel

Code

public function testDirectionEntityValidation() {

  // Check for validation violation for missing direction.
  $sms_message1 = $this
    ->createSmsMessage();
  $this
    ->assertTrue(in_array('direction', $sms_message1
    ->validate()
    ->getFieldNames()));
}