function BasicTest::testCreate in Currency 8.3
@covers ::create @covers ::__construct
File
- tests/
src/ Unit/ Plugin/ Currency/ AmountFormatter/ BasicTest.php, line 60
Class
- BasicTest
- @coversDefaultClass \Drupal\currency\Plugin\Currency\AmountFormatter\Basic
Namespace
Drupal\Tests\currency\Unit\Plugin\Currency\AmountFormatterCode
function testCreate() {
$container = $this
->createMock(ContainerInterface::class);
$map = array(
array(
'currency.locale_resolver',
ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
$this->localeResolver,
),
array(
'string_translation',
ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE,
$this->stringTranslation,
),
);
$container
->expects($this
->any())
->method('get')
->willReturnMap($map);
$configuration = array();
$plugin_id = $this
->randomMachineName();
$plugin_definition = array();
$sut = Basic::create($container, $configuration, $plugin_id, $plugin_definition);
$this
->assertInstanceOf(Basic::class, $sut);
}