X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Ftracker%2Ftests%2Fsrc%2FFunctional%2FViews%2FTrackerTestBase.php;fp=web%2Fcore%2Fmodules%2Ftracker%2Ftests%2Fsrc%2FFunctional%2FViews%2FTrackerTestBase.php;h=d70684378c57deb6f51a2fdc68df9821a1660641;hp=0000000000000000000000000000000000000000;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/modules/tracker/tests/src/Functional/Views/TrackerTestBase.php b/web/core/modules/tracker/tests/src/Functional/Views/TrackerTestBase.php new file mode 100644 index 000000000..d70684378 --- /dev/null +++ b/web/core/modules/tracker/tests/src/Functional/Views/TrackerTestBase.php @@ -0,0 +1,69 @@ +drupalCreateContentType(['type' => 'page', 'name' => 'Basic page']); + // Add a comment field. + $this->addDefaultCommentField('node', 'page'); + + $permissions = ['access comments', 'create page content', 'post comments', 'skip comment approval']; + $account = $this->drupalCreateUser($permissions); + + $this->drupalLogin($account); + + $this->node = $this->drupalCreateNode([ + 'title' => $this->randomMachineName(8), + 'uid' => $account->id(), + 'status' => 1, + ]); + + $this->comment = Comment::create([ + 'entity_id' => $this->node->id(), + 'entity_type' => 'node', + 'field_name' => 'comment', + 'subject' => $this->randomMachineName(), + 'comment_body[' . LanguageInterface::LANGCODE_NOT_SPECIFIED . '][0][value]' => $this->randomMachineName(20), + ]); + + } + +}