You are here

public function CurrencyTest::testConstructWithNonExistentMethod in Currency 8.3

@covers ::__construct

File

tests/src/Unit/Plugin/views/field/CurrencyTest.php, line 86

Class

CurrencyTest
@coversDefaultClass \Drupal\currency\Plugin\views\field\Currency

Namespace

Drupal\Tests\currency\Unit\Plugin\views\field

Code

public function testConstructWithNonExistentMethod() {
  $this
    ->expectException(\InvalidArgumentException::class);
  $configuration = [
    'currency_method' => $this
      ->randomMachineName(),
  ];
  $plugin_id = $this
    ->randomMachineName();
  $this->sut = new Currency($configuration, $plugin_id, $this->pluginDefinition, $this->stringTranslation, $this->currencyStorage);
}