protected function SmsFrameworkTestTrait::getTestMessageReports in SMS Framework 8
Same name and namespace in other branches
- 2.x tests/src/Functional/SmsFrameworkTestTrait.php \Drupal\Tests\sms\Functional\SmsFrameworkTestTrait::getTestMessageReports()
- 2.1.x tests/src/Functional/SmsFrameworkTestTrait.php \Drupal\Tests\sms\Functional\SmsFrameworkTestTrait::getTestMessageReports()
Gets all SMS reports for messages sent to 'Memory' gateway.
Parameters
\Drupal\sms\Entity\SmsGatewayInterface $sms_gateway: A gateway plugin.
Return value
\Drupal\sms\Message\SmsDeliveryReportInterface[] An array of SMS reports for messages sent to 'Memory' gateway.
File
- tests/
src/ Functional/ SmsFrameworkTestTrait.php, line 158
Class
- SmsFrameworkTestTrait
- Shared SMS Framework helpers for kernel and web tests.
Namespace
Drupal\Tests\sms\FunctionalCode
protected function getTestMessageReports(SmsGatewayInterface $sms_gateway) {
$gateway_id = $sms_gateway
->id();
$sms_reports = \Drupal::state()
->get('sms_test_gateway.memory.report', []);
return isset($sms_reports[$gateway_id]) ? $sms_reports[$gateway_id] : [];
}