1 node.test public NodeLayoutPreviewTestCase::setUp()

Sets up test case.

Overrides BackdropWebTestCase::setUp

File

core/modules/node/tests/node.test, line 829
Tests for node.module.

Class

NodeLayoutPreviewTestCase
Tests that the correct layout is used for node previews.

Code

public function setUp() {
  parent::setUp('node_layout_preview_revision_test');
  // Module node_layout_preview_revision_test is a helper module that creates
  // three layouts used in testing previews and revisions:
  //
  // Layout custom_node has path node/% and uses the Taylor template.
  // Layout custom_node_preview has path node/preview/page/% and uses the
  //   Sutro template. It is initially disabled.
  // Layout custom_node_revision has path node/%/revisions/%/view and uses the
  //   Sutro template. It is initially disabled.

  // Create a content type for checking node/edit page layouts.
  $this->content_type = $this->backdropCreateContentType();

  // Create and login admin user.
  $this->admin_user = $this->backdropCreateUser(array(
    'bypass node access',
  ));
  $this->backdropLogin($this->admin_user);
}