function AmountFormattingFormTest::testCreate in Currency 8.3
Same name in this branch
- 8.3 tests/src/Unit/Controller/AmountFormattingFormTest.php \Drupal\Tests\currency\Unit\Controller\AmountFormattingFormTest::testCreate()
- 8.3 tests/src/Unit/Form/AmountFormattingFormTest.php \Drupal\Tests\currency\Unit\Form\AmountFormattingFormTest::testCreate()
@covers ::create @covers ::__construct
File
- tests/
src/ Unit/ Form/ AmountFormattingFormTest.php, line 79
Class
- AmountFormattingFormTest
- @coversDefaultClass \Drupal\currency\Form\AmountFormattingForm
Namespace
Drupal\Tests\currency\Unit\FormCode
function testCreate() {
$container = $this
->createMock(ContainerInterface::class);
$map = array(
array(
'config.factory',
ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
$this->configFactory,
),
array(
'plugin.manager.currency.amount_formatter',
ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
$this->currencyAmountFormatterManager,
),
array(
'string_translation',
ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
$this->stringTranslation,
),
);
$container
->expects($this
->any())
->method('get')
->willReturnMap($map);
$sut = AmountFormattingForm::create($container);
$this
->assertInstanceOf(AmountFormattingForm::class, $sut);
}