public function ConfigOperationsProviderTest::testCreate in Payment 8.2
@covers ::create @covers ::__construct
File
- tests/
src/ Unit/ Plugin/ Payment/ Status/ ConfigOperationsProviderTest.php, line 56
Class
- ConfigOperationsProviderTest
- @coversDefaultClass \Drupal\payment\Plugin\Payment\Status\ConfigOperationsProvider
Namespace
Drupal\Tests\payment\Unit\Plugin\Payment\StatusCode
public function testCreate() {
$entity_type_manager = $this
->createMock(EntityTypeManagerInterface::class);
$entity_type_manager
->expects($this
->once())
->method('getStorage')
->with('payment_status')
->willReturn($this->paymentStatusStorage);
$entity_type_manager
->expects($this
->once())
->method('getListBuilder')
->with('payment_status')
->willReturn($this->paymentStatusListBuilder);
$container = $this
->createMock(ContainerInterface::class);
$container
->expects($this
->once())
->method('get')
->with('entity_type.manager')
->willReturn($entity_type_manager);
$this
->assertInstanceOf(ConfigOperationsProvider::class, ConfigOperationsProvider::create($container));
}