You are here

protected function SmsFrameworkProviderTest::setUp in SMS Framework 2.1.x

Same name and namespace in other branches
  1. 8 tests/src/Kernel/SmsFrameworkProviderTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkProviderTest::setUp()
  2. 2.x tests/src/Kernel/SmsFrameworkProviderTest.php \Drupal\Tests\sms\Kernel\SmsFrameworkProviderTest::setUp()

Overrides SmsFrameworkKernelBase::setUp

File

tests/src/Kernel/SmsFrameworkProviderTest.php, line 66

Class

SmsFrameworkProviderTest
Tests SMS Framework provider service.

Namespace

Drupal\Tests\sms\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installEntitySchema('sms');
  $this
    ->installEntitySchema('sms_result');
  $this
    ->installEntitySchema('sms_report');
  $this->gateway = $this
    ->createMemoryGateway();
  $this->incomingGateway = $this
    ->createMemoryGateway([
    'plugin' => 'incoming',
  ]);
  $this->smsStorage = $this->container
    ->get('entity_type.manager')
    ->getStorage('sms');
  $this->smsProvider = $this->container
    ->get('sms.provider');
  $this
    ->setFallbackGateway($this->gateway);
}