You are here

public function EditPaymentStatusTest::testTitle in Payment 8.2

@covers ::title

File

tests/src/Unit/Controller/EditPaymentStatusTest.php, line 60

Class

EditPaymentStatusTest
@coversDefaultClass \Drupal\payment\Controller\EditPaymentStatus

Namespace

Drupal\Tests\payment\Unit\Controller

Code

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