public function SelectPaymentMethodConfigurationTest::testExecute in Payment 8.2
@covers ::execute
File
- tests/
src/ Unit/ Controller/ SelectPaymentMethodConfigurationTest.php, line 90
Class
- SelectPaymentMethodConfigurationTest
- @coversDefaultClass \Drupal\payment\Controller\SelectPaymentMethodConfiguration
Namespace
Drupal\Tests\payment\Unit\ControllerCode
public function testExecute() {
$definitions = [
'payment_unavailable' => [],
'foo' => [
'description' => $this
->randomMachineName(),
'label' => $this
->randomMachineName(),
],
'bar' => [
'description' => $this
->randomMachineName(),
'label' => $this
->randomMachineName(),
],
];
$this->paymentMethodConfigurationManager
->expects($this
->once())
->method('getDefinitions')
->willReturn($definitions);
$this->paymentMethodConfigurationAccessControlHandler
->expects($this
->any())
->method('createAccess')
->willReturn(TRUE);
$this->sut
->execute();
}