You are here

public function AddCurrencyLocaleTest::testExecute in Currency 8.3

@covers ::execute

File

tests/src/Unit/Controller/AddCurrencyLocaleTest.php, line 80

Class

AddCurrencyLocaleTest
@coversDefaultClass \Drupal\currency\Controller\AddCurrencyLocale

Namespace

Drupal\Tests\currency\Unit\Controller

Code

public function testExecute() {
  $currency_locale = $this
    ->createMock(CurrencyLocaleInterface::class);
  $this->currencyLocaleStorage
    ->expects($this
    ->once())
    ->method('create')
    ->with(array())
    ->willReturn($currency_locale);
  $form = $this
    ->createMock(EntityFormInterface::class);
  $this->entityFormBuilder
    ->expects($this
    ->once())
    ->method('getForm')
    ->with($currency_locale)
    ->willReturn($form);
  $this
    ->assertSame($form, $this->sut
    ->execute());
}