You are here

public function DuplicatePaymentMethodConfigurationTest::testTitle in Payment 8.2

@covers ::title

File

tests/src/Unit/Controller/DuplicatePaymentMethodConfigurationTest.php, line 94

Class

DuplicatePaymentMethodConfigurationTest
@coversDefaultClass \Drupal\payment\Controller\DuplicatePaymentMethodConfiguration

Namespace

Drupal\Tests\payment\Unit\Controller

Code

public function testTitle() {
  $label = $this
    ->randomMachineName();
  $payment_method_configuration = $this
    ->createMock(PaymentMethodConfigurationInterface::class);
  $payment_method_configuration
    ->expects($this
    ->once())
    ->method('label')
    ->willReturn($label);
  $this
    ->assertStringContainsString($label, (string) $this->sut
    ->title($payment_method_configuration));
}