protected function EntityBrowserWebDriverTestBase::setUp in Entity Browser 8
Same name and namespace in other branches
- 8.2 tests/src/FunctionalJavascript/EntityBrowserWebDriverTestBase.php \Drupal\Tests\entity_browser\FunctionalJavascript\EntityBrowserWebDriverTestBase::setUp()
Overrides BrowserTestBase::setUp
6 calls to EntityBrowserWebDriverTestBase::setUp()
- CardinalityTest::setUp in tests/
src/ FunctionalJavascript/ CardinalityTest.php - EntityBrowserViewsWidgetTest::setUp in tests/
src/ FunctionalJavascript/ EntityBrowserViewsWidgetTest.php - EntityReferenceWidgetTest::setUp in tests/
src/ FunctionalJavascript/ EntityReferenceWidgetTest.php - ImageFieldTest::setUp in tests/
src/ FunctionalJavascript/ ImageFieldTest.php - PagerElementTest::setUp in tests/
src/ FunctionalJavascript/ PagerElementTest.php
6 methods override EntityBrowserWebDriverTestBase::setUp()
- CardinalityTest::setUp in tests/
src/ FunctionalJavascript/ CardinalityTest.php - EntityBrowserViewsWidgetTest::setUp in tests/
src/ FunctionalJavascript/ EntityBrowserViewsWidgetTest.php - EntityReferenceWidgetTest::setUp in tests/
src/ FunctionalJavascript/ EntityReferenceWidgetTest.php - ImageFieldTest::setUp in tests/
src/ FunctionalJavascript/ ImageFieldTest.php - PagerElementTest::setUp in tests/
src/ FunctionalJavascript/ PagerElementTest.php
File
- tests/
src/ FunctionalJavascript/ EntityBrowserWebDriverTestBase.php, line 59
Class
- EntityBrowserWebDriverTestBase
- Base class for Entity browser Javascript functional tests.
Namespace
Drupal\Tests\entity_browser\FunctionalJavascriptCode
protected function setUp() {
parent::setUp();
FieldStorageConfig::create([
'field_name' => 'field_reference',
'type' => 'entity_reference',
'entity_type' => 'node',
'cardinality' => FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED,
'settings' => [
'target_type' => 'file',
],
])
->save();
FieldConfig::create([
'field_name' => 'field_reference',
'entity_type' => 'node',
'bundle' => 'article',
'label' => 'Reference',
'settings' => [],
])
->save();
/** @var \Drupal\Core\Entity\Display\EntityFormDisplayInterface $form_display */
$form_display = $this->container
->get('entity_type.manager')
->getStorage('entity_form_display')
->load('node.article.default');
$form_display
->setComponent('field_reference', [
'type' => 'entity_browser_entity_reference',
'settings' => [
'entity_browser' => 'test_entity_browser_file',
'field_widget_display' => 'label',
'open' => TRUE,
],
])
->save();
ConfigurableLanguage::createFromLangcode('fr')
->save();
$account = $this
->drupalCreateUser(static::$userPermissions);
$this
->drupalLogin($account);
}