You are here

public function SmsFrameworkMessageEntityTest::testMessageEmpty in SMS Framework 8

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

Tests validation violation when message is empty.

File

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

Class

SmsFrameworkMessageEntityTest
Tests SMS message entity.

Namespace

Drupal\Tests\sms\Kernel

Code

public function testMessageEmpty() {
  $sms_message = $this
    ->createSmsMessage();
  $this
    ->assertTrue(in_array('message', $sms_message
    ->validate()
    ->getFieldNames()));
}