protected function XlsxExporterTest::setUp in Webform XLSX export 8
Prepare variables used in tests.
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ XlsxExporterTest.php, line 32
Class
- XlsxExporterTest
- Class XlsxExporterTest.
Namespace
Drupal\Tests\webform_xlsx_export\UnitCode
protected function setUp() {
parent::setUp();
/** @var \Psr\Log\LoggerInterface $logger */
$logger = $this
->createMock(LoggerInterface::class);
/** @var \Drupal\Core\Config\ConfigFactoryInterface $config_factory */
$config_factory = $this
->createMock(ConfigFactoryInterface::class);
/** @var \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager */
$entity_type_manager = $this
->createMock(EntityTypeManagerInterface::class);
/** @var \Drupal\webform\Plugin\WebformElementManagerInterface $element_manager */
$element_manager = $this
->createMock(WebformElementManagerInterface::class);
/** @var \Drupal\webform\WebformTokenManagerInterface $token_manager */
$token_manager = $this
->createMock(WebformTokenManagerInterface::class);
$this->exporter = new XlsxExporter([], 'foo', NULL, $logger, $config_factory, $entity_type_manager, $element_manager, $token_manager);
}