protected function SmsFrameworkProviderTest::createSmsMessage in SMS Framework 2.x
Same name and namespace in other branches
- 8 tests/src/Kernel/SmsFrameworkProviderTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkProviderTest::createSmsMessage()
- 2.1.x tests/src/Kernel/SmsFrameworkProviderTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkProviderTest::createSmsMessage()
Create a SMS message entity for testing.
Parameters
array $values: An mixed array of values to pass when creating the SMS message entity.
Return value
\Drupal\sms\Entity\SmsMessageInterface A SMS message entity for testing.
File
- tests/
src/ Kernel/ SmsFrameworkProviderTest.php, line 582
Class
- SmsFrameworkProviderTest
- Tests SMS Framework provider service.
Namespace
Drupal\Tests\sms\KernelCode
protected function createSmsMessage(array $values = []) {
return SmsMessage::create($values)
->setDirection(Direction::OUTGOING)
->setMessage($this
->randomString());
}