public function PaymentMethodConfigurationTest::testLabel in Payment 8.2
@covers ::setLabel @covers ::label
File
- tests/
src/ Unit/ Entity/ PaymentMethodConfigurationTest.php, line 116
Class
- PaymentMethodConfigurationTest
- @coversDefaultClass \Drupal\payment\Entity\PaymentMethodConfiguration
Namespace
Drupal\Tests\payment\Unit\EntityCode
public function testLabel() {
$entity_type = $this
->createMock(ConfigEntityTypeInterface::class);
$entity_type
->expects($this
->atLeastOnce())
->method('getKey')
->with('label')
->willReturn('label');
$this->entityTypeManager
->expects($this
->atLeastOnce())
->method('getDefinition')
->with($this->entityTypeId)
->willReturn($entity_type);
$label = $this
->randomMachineName();
$this
->assertSame($this->sut, $this->sut
->setLabel($label));
$this
->assertSame($label, $this->sut
->label());
}