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\ControllerCode
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));
}