You are here

public function ConfigurePaymentTypeTest::testTitle in Payment 8.2

@covers ::title

File

tests/src/Unit/Controller/ConfigurePaymentTypeTest.php, line 125

Class

ConfigurePaymentTypeTest
@coversDefaultClass \Drupal\payment\Controller\ConfigurePaymentType

Namespace

Drupal\Tests\payment\Unit\Controller

Code

public function testTitle() {
  $plugin_id = $this
    ->randomMachineName();
  $label = $this
    ->randomMachineName();
  $definition = [
    'label' => $label,
  ];
  $this->paymentTypeManager
    ->expects($this
    ->once())
    ->method('getDefinition')
    ->with($plugin_id)
    ->willReturn($definition);
  $this
    ->assertSame($label, $this->sut
    ->title($plugin_id));
}