public function AddCurrencyTest::testExecute in Currency 8.3
@covers ::execute
File
- tests/
src/ Unit/ Controller/ AddCurrencyTest.php, line 80
Class
- AddCurrencyTest
- @coversDefaultClass \Drupal\currency\Controller\AddCurrency
Namespace
Drupal\Tests\currency\Unit\ControllerCode
public function testExecute() {
$currency = $this
->createMock(CurrencyInterface::class);
$this->currencyStorage
->expects($this
->once())
->method('create')
->with(array())
->willReturn($currency);
$form = $this
->createMock(EntityFormInterface::class);
$this->entityFormBuilder
->expects($this
->once())
->method('getForm')
->with($currency)
->willReturn($form);
$this
->assertSame($form, $this->sut
->execute());
}