public function testIsVaultEnabled()
 {
     $this->vaultService->expects(static::once())->method('isActiveForPayment')->with(ConfigProvider::CODE)->willReturn(true);
     static::assertTrue($this->block->isVaultEnabled());
 }
Example #2
0
 /**
  * @param array $config
  * @param bool $expected
  * @covers \Magento\BraintreeTwo\Block\Form::isVaultEnabled
  * @dataProvider vaultConfigProvider
  */
 public function testIsVaultEnabled(array $config, $expected)
 {
     $this->vaultConfigProvider->expects(static::once())->method('getConfig')->willReturn([VaultPaymentInterface::CODE => $config]);
     static::assertEquals($expected, $this->block->isVaultEnabled());
 }