/**
  * @covers ::getOperations
  */
 public function testGetOperations()
 {
     $entity_id = $this->randomMachineName();
     $plugin_id = 'payment_config:' . $entity_id;
     $payment_status = $this->getMock(PaymentStatusInterface::class);
     $this->paymentStatusStorage->expects($this->once())->method('load')->with($entity_id)->willReturn($payment_status);
     $operations = array('foo' => array('title' => $this->randomMachineName()));
     $this->paymentStatusListBuilder->expects($this->once())->method('getOperations')->with($payment_status)->willReturn($operations);
     $this->assertSame($operations, $this->sut->getOperations($plugin_id));
 }
 /**
  * @covers ::getOperations
  */
 public function testGetOperations()
 {
     $list_builder_operations = ['edit' => ['title' => 'Edit configuration'], 'delete' => ['title' => 'Delete configuration'], 'enable' => ['title' => 'Enable configuration'], 'disable' => ['title' => 'Disable configuration'], 'foo' => []];
     $destination = $this->randomMachineName();
     $this->redirectDestination->expects($this->atLeastOnce())->method('get')->willReturn($destination);
     $plugin_id = $this->randomMachineName();
     $payment_method_configuration = $this->getMock(PaymentMethodConfigurationInterface::class);
     $this->sut->expects($this->once())->method('getPaymentMethodConfiguration')->with($plugin_id)->willReturn($payment_method_configuration);
     $this->paymentMethodConfigurationListBuilder->expects($this->once())->method('getOperations')->with($payment_method_configuration)->willReturn($list_builder_operations);
     $expected_operations = $list_builder_operations;
     unset($expected_operations['foo']);
     foreach ($expected_operations as $name => $expected_operation) {
         $expected_operations[$name]['title'] = $list_builder_operations[$name]['title'];
         $expected_operations[$name]['query']['destination'] = $destination;
     }
     $this->assertEquals($expected_operations, $this->sut->getOperations($plugin_id));
 }