You are here

function FixedRatesTest::testDelete in Currency 8.3

@covers ::delete

File

tests/src/Unit/Plugin/Currency/ExchangeRateProvider/FixedRatesTest.php, line 155

Class

FixedRatesTest
@coversDefaultClass \Drupal\currency\Plugin\Currency\ExchangeRateProvider\FixedRates

Namespace

Drupal\Tests\currency\Unit\Plugin\Currency\ExchangeRateProvider

Code

function testDelete() {
  list($rates, $rates_data) = $this
    ->prepareExchangeRates();
  unset($rates['EUR']['NLG']);
  unset($rates_data[1]);
  $this->config
    ->expects($this
    ->once())
    ->method('set')
    ->with('rates', $rates_data);
  $this->config
    ->expects($this
    ->once())
    ->method('save');
  $this->sut
    ->delete('EUR', 'NLG');
}