public function PaymentReferenceTest::testGetPaymentDescriptionWithNonExistingField in Payment 8.2
@covers ::getPaymentDescription
File
- modules/
payment_reference/ tests/ src/ Unit/ Plugin/ Payment/ Type/ PaymentReferenceTest.php, line 184
Class
- PaymentReferenceTest
- @coversDefaultClass \Drupal\payment_reference\Plugin\Payment\Type\PaymentReference
Namespace
Drupal\Tests\payment_reference\Unit\Plugin\Payment\TypeCode
public function testGetPaymentDescriptionWithNonExistingField() {
$entity_type_id = $this
->randomMachineName();
$bundle = $this
->randomMachineName();
$this->entityFieldManager
->expects($this
->atLeastOnce())
->method('getFieldDefinitions')
->with($entity_type_id, $bundle)
->willReturn([]);
$this->sut
->setEntityTypeId($entity_type_id);
$this->sut
->setBundle($bundle);
$this
->assertInstanceOf(TranslatableMarkup::class, $this->sut
->getPaymentDescription());
}