protected function XmlSitemapTestBase::setUp in XML sitemap 8
Same name and namespace in other branches
- 2.x tests/src/Functional/XmlSitemapTestBase.php \Drupal\Tests\xmlsitemap\Functional\XmlSitemapTestBase::setUp()
Overrides BrowserTestBase::setUp
12 calls to XmlSitemapTestBase::setUp()
- XmlSitemapCustomFunctionalTest::setUp in xmlsitemap_custom/
tests/ src/ Functional/ XmlSitemapCustomFunctionalTest.php - XmlSitemapEnginesFunctionalTest::setUp in xmlsitemap_engines/
tests/ src/ Functional/ XmlSitemapEnginesFunctionalTest.php - XmlSitemapEntityFunctionalTest::setUp in tests/
src/ Functional/ XmlSitemapEntityFunctionalTest.php - XmlSitemapFunctionalTest::setUp in tests/
src/ Functional/ XmlSitemapFunctionalTest.php - XmlSitemapListBuilderTest::setUp in tests/
src/ Functional/ XmlSitemapListBuilderTest.php
12 methods override XmlSitemapTestBase::setUp()
- XmlSitemapCustomFunctionalTest::setUp in xmlsitemap_custom/
tests/ src/ Functional/ XmlSitemapCustomFunctionalTest.php - XmlSitemapEnginesFunctionalTest::setUp in xmlsitemap_engines/
tests/ src/ Functional/ XmlSitemapEnginesFunctionalTest.php - XmlSitemapEntityFunctionalTest::setUp in tests/
src/ Functional/ XmlSitemapEntityFunctionalTest.php - XmlSitemapFunctionalTest::setUp in tests/
src/ Functional/ XmlSitemapFunctionalTest.php - XmlSitemapListBuilderTest::setUp in tests/
src/ Functional/ XmlSitemapListBuilderTest.php
File
- tests/
src/ Functional/ XmlSitemapTestBase.php, line 99
Class
- XmlSitemapTestBase
- Helper test class with some added functions for testing.
Namespace
Drupal\Tests\xmlsitemap\FunctionalCode
protected function setUp() {
parent::setUp();
$this->entityTypeManager = $this->container
->get('entity_type.manager');
$this->state = $this->container
->get('state');
$this->config = $this->container
->get('config.factory')
->getEditable('xmlsitemap.settings');
$this->moduleHandler = $this->container
->get('module_handler');
$this->languageManager = $this->container
->get('language_manager');
$this->linkStorage = $this->container
->get('xmlsitemap.link_storage');
$this->time = $this->container
->get('datetime.time');
// Create the Article and Page content types.
if ($this->profile != 'standard') {
$this
->drupalCreateContentType([
'type' => 'article',
'name' => 'Article',
]);
$this
->drupalCreateContentType([
'type' => 'page',
'name' => 'Basic page',
'settings' => [
// Set proper default options for the page content type.
'node' => [
'options' => [
'promote' => FALSE,
],
'submitted' => FALSE,
],
],
]);
}
}