diff --git a/core/modules/node/src/Tests/Views/NodeContextualLinksTest.php b/core/modules/node/src/Tests/Views/NodeContextualLinksTest.php index c77df9c..bb01895 100644 --- a/core/modules/node/src/Tests/Views/NodeContextualLinksTest.php +++ b/core/modules/node/src/Tests/Views/NodeContextualLinksTest.php @@ -35,6 +35,7 @@ class NodeContextualLinksTest extends NodeTestBase { * Tests contextual links. */ public function testNodeContextualLinks() { + $this->drupalCreateContentType(array('type' => 'page')); $this->drupalCreateNode(array('promote' => 1)); $this->drupalGet('node'); diff --git a/core/modules/rdf/src/Tests/UserAttributesTest.php b/core/modules/rdf/src/Tests/UserAttributesTest.php index 64c306b..840701a 100644 --- a/core/modules/rdf/src/Tests/UserAttributesTest.php +++ b/core/modules/rdf/src/Tests/UserAttributesTest.php @@ -55,6 +55,8 @@ function testUserAttributesInMarkup() { $this->drupalLogin($user1); + $this->drupalCreateContentType(array('type' => 'article')); + foreach($authors as $author) { $account_uri = url('user/' . $author->id(), array('absolute' => TRUE)); diff --git a/core/modules/statistics/src/Tests/Views/IntegrationTest.php b/core/modules/statistics/src/Tests/Views/IntegrationTest.php index 5ef8610..b26745a 100644 --- a/core/modules/statistics/src/Tests/Views/IntegrationTest.php +++ b/core/modules/statistics/src/Tests/Views/IntegrationTest.php @@ -55,6 +55,7 @@ protected function setUp() { // Create a new user for viewing nodes. $this->webUser = $this->drupalCreateUser(array('access content')); + $this->drupalCreateContentType(array('type' => 'page')); $this->node = $this->drupalCreateNode(array('type' => 'page')); // Enable access logging. diff --git a/core/modules/system/src/Tests/System/DateTimeTest.php b/core/modules/system/src/Tests/System/DateTimeTest.php index a14d002..416a147 100644 --- a/core/modules/system/src/Tests/System/DateTimeTest.php +++ b/core/modules/system/src/Tests/System/DateTimeTest.php @@ -48,6 +48,7 @@ function testTimeZoneHandling() { // Create some nodes with different authored-on dates. $date1 = '2007-01-31 21:00:00 -1000'; $date2 = '2007-07-31 21:00:00 -1000'; + $this->drupalCreateContentType(array('type' => 'article')); $node1 = $this->drupalCreateNode(array('created' => strtotime($date1), 'type' => 'article')); $node2 = $this->drupalCreateNode(array('created' => strtotime($date2), 'type' => 'article')); diff --git a/core/modules/system/src/Tests/System/FrontPageTest.php b/core/modules/system/src/Tests/System/FrontPageTest.php index aeb758c..dd24ef5 100644 --- a/core/modules/system/src/Tests/System/FrontPageTest.php +++ b/core/modules/system/src/Tests/System/FrontPageTest.php @@ -29,6 +29,7 @@ protected function setUp() { // Create admin user, log in admin user, and create one node. $this->admin_user = $this->drupalCreateUser(array('access content', 'administer site configuration')); $this->drupalLogin($this->admin_user); + $this->drupalCreateContentType(array('type' => 'page')); $this->node_path = "node/" . $this->drupalCreateNode(array('promote' => 1))->id(); // Configure 'node' as front page. diff --git a/core/modules/system/src/Tests/Theme/TwigDebugMarkupTest.php b/core/modules/system/src/Tests/Theme/TwigDebugMarkupTest.php index efb0818..102f542 100644 --- a/core/modules/system/src/Tests/Theme/TwigDebugMarkupTest.php +++ b/core/modules/system/src/Tests/Theme/TwigDebugMarkupTest.php @@ -30,6 +30,7 @@ function testTwigDebugMarkup() { $extension = twig_extension(); theme_enable(array('test_theme')); \Drupal::config('system.theme')->set('default', 'test_theme')->save(); + $this->drupalCreateContentType(array('type' => 'page')); // Enable debug, rebuild the service container, and clear all caches. $parameters = $this->container->getParameter('twig.config'); $parameters['debug'] = TRUE; diff --git a/core/modules/user/src/Tests/UserTimeZoneTest.php b/core/modules/user/src/Tests/UserTimeZoneTest.php index f3ea297..4c09de0 100644 --- a/core/modules/user/src/Tests/UserTimeZoneTest.php +++ b/core/modules/user/src/Tests/UserTimeZoneTest.php @@ -46,6 +46,7 @@ function testUserTimeZone() { $date2 = '2007-03-11 01:00:00 -0800'; // One date in PDT (summer time): $date3 = '2007-03-20 21:00:00 -0700'; + $this->drupalCreateContentType(array('type' => 'article')); $node1 = $this->drupalCreateNode(array('created' => strtotime($date1), 'type' => 'article')); $node2 = $this->drupalCreateNode(array('created' => strtotime($date2), 'type' => 'article')); $node3 = $this->drupalCreateNode(array('created' => strtotime($date3), 'type' => 'article')); diff --git a/core/modules/views/src/Tests/Entity/RowEntityRenderersTest.php b/core/modules/views/src/Tests/Entity/RowEntityRenderersTest.php index c0f3a05..7dbc987 100644 --- a/core/modules/views/src/Tests/Entity/RowEntityRenderersTest.php +++ b/core/modules/views/src/Tests/Entity/RowEntityRenderersTest.php @@ -8,6 +8,7 @@ namespace Drupal\views\Tests\Entity; use Drupal\Core\Language\Language; +use Drupal\node\Entity\NodeType; use Drupal\views\Tests\ViewUnitTestBase; use Drupal\views\Views; @@ -63,9 +64,9 @@ protected function setUp() { } // Make sure we do not try to render non-existing user data. - $config = \Drupal::config('node.type.test'); - $config->set('settings.node.submitted', FALSE); - $config->save(); + $node_type = NodeType::create(array('type' => 'test')); + $node_type->setDisplaySubmitted(FALSE); + $node_type->save(); } /** diff --git a/core/modules/views/src/Tests/Plugin/MiniPagerTest.php b/core/modules/views/src/Tests/Plugin/MiniPagerTest.php index f8263a0..f6f31c4 100644 --- a/core/modules/views/src/Tests/Plugin/MiniPagerTest.php +++ b/core/modules/views/src/Tests/Plugin/MiniPagerTest.php @@ -41,6 +41,7 @@ class MiniPagerTest extends PluginTestBase { protected function setUp() { parent::setUp(); + $this->drupalCreateContentType(array('type' => 'page')); // Create a bunch of test nodes. for ($i = 0; $i < 20; $i++) { $this->nodes[] = $this->drupalCreateNode(); diff --git a/core/modules/views/src/Tests/Plugin/PagerTest.php b/core/modules/views/src/Tests/Plugin/PagerTest.php index 7a14e54..28cb593 100644 --- a/core/modules/views/src/Tests/Plugin/PagerTest.php +++ b/core/modules/views/src/Tests/Plugin/PagerTest.php @@ -111,6 +111,7 @@ public function testStorePagerSettings() { public function testNoLimit() { // Create 11 nodes and make sure that everyone is returned. // We create 11 nodes, because the default pager plugin had 10 items per page. + $this->drupalCreateContentType(array('type' => 'page')); for ($i = 0; $i < 11; $i++) { $this->drupalCreateNode(); } diff --git a/core/modules/views/src/Tests/Wizard/SortingTest.php b/core/modules/views/src/Tests/Wizard/SortingTest.php index b5d236a..eb6cc98 100644 --- a/core/modules/views/src/Tests/Wizard/SortingTest.php +++ b/core/modules/views/src/Tests/Wizard/SortingTest.php @@ -20,6 +20,7 @@ class SortingTest extends WizardTestBase { function testSorting() { // Create nodes, each with a different creation time so that we can do a // meaningful sort. + $this->drupalCreateContentType(array('type' => 'page')); $node1 = $this->drupalCreateNode(array('created' => REQUEST_TIME)); $node2 = $this->drupalCreateNode(array('created' => REQUEST_TIME + 1)); $node3 = $this->drupalCreateNode(array('created' => REQUEST_TIME + 2)); diff --git a/core/modules/views_ui/src/Tests/OverrideDisplaysTest.php b/core/modules/views_ui/src/Tests/OverrideDisplaysTest.php index 3b2ecf7..f9985aa 100644 --- a/core/modules/views_ui/src/Tests/OverrideDisplaysTest.php +++ b/core/modules/views_ui/src/Tests/OverrideDisplaysTest.php @@ -40,6 +40,7 @@ function testOverrideDisplays() { // Add a node that will appear in the view, so that the block will actually // be displayed. + $this->drupalCreateContentType(array('type' => 'page')); $this->drupalCreateNode(); // Make sure the title appears in the page. diff --git a/core/modules/views_ui/src/Tests/PreviewTest.php b/core/modules/views_ui/src/Tests/PreviewTest.php index f133354..c681ec4 100644 --- a/core/modules/views_ui/src/Tests/PreviewTest.php +++ b/core/modules/views_ui/src/Tests/PreviewTest.php @@ -98,6 +98,7 @@ function testPreviewUI() { public function testPreviewWithPagersUI() { // Create 11 nodes and make sure that everyone is returned. + $this->drupalCreateContentType(array('type' => 'page')); for ($i = 0; $i < 11; $i++) { $this->drupalCreateNode(); }