You are here

public function BasicTest::testDefaultConfiguration in Payment 8.2

Same name in this branch
  1. 8.2 tests/src/Unit/Plugin/Payment/MethodConfiguration/BasicTest.php \Drupal\Tests\payment\Unit\Plugin\Payment\MethodConfiguration\BasicTest::testDefaultConfiguration()
  2. 8.2 tests/src/Unit/Plugin/Payment/Method/BasicTest.php \Drupal\Tests\payment\Unit\Plugin\Payment\Method\BasicTest::testDefaultConfiguration()
  3. 8.2 tests/src/Unit/Plugin/Payment/LineItem/BasicTest.php \Drupal\Tests\payment\Unit\Plugin\Payment\LineItem\BasicTest::testDefaultConfiguration()

@covers ::defaultConfiguration

File

tests/src/Unit/Plugin/Payment/MethodConfiguration/BasicTest.php, line 98

Class

BasicTest
@coversDefaultClass \Drupal\payment\Plugin\Payment\MethodConfiguration\Basic

Namespace

Drupal\Tests\payment\Unit\Plugin\Payment\MethodConfiguration

Code

public function testDefaultConfiguration() {
  $configuration = $this->sut
    ->defaultConfiguration();
  $this
    ->assertIsArray($configuration);
  foreach (array(
    'brand_label',
    'message_text',
    'message_text_format',
    'execute_status_id',
    'capture_status_id',
  ) as $key) {
    $this
      ->assertArrayHasKey($key, $configuration);
    $this
      ->assertIsString($configuration[$key]);
  }
  $this
    ->assertArrayHasKey('capture', $configuration);
  $this
    ->assertIsBool($configuration['capture']);
}