diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeAccessBaseTableTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeAccessBaseTableTest.php index e5253a8..5a85c00 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeAccessBaseTableTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeAccessBaseTableTest.php @@ -58,10 +58,12 @@ class NodeAccessBaseTableTest extends NodeTestBase { $num_simple_users = 2; $simple_users = array(); - // nodes keyed by uid and nid: $nodes[$uid][$nid] = $is_private; + // Nodes keyed by uid and nid: $nodes[$uid][$nid] = $is_private; $this->nodesByUser = array(); - $titles = array(); // Titles keyed by nid - $private_nodes = array(); // Array of nids marked private. + // Titles keyed by nid. + $titles = array(); + // Array of nids marked private. + $private_nodes = array(); for ($i = 0; $i < $num_simple_users; $i++) { $simple_users[$i] = $this->drupalCreateUser(array('access content', 'create article content')); } @@ -141,7 +143,7 @@ class NodeAccessBaseTableTest extends NodeTestBase { /** * Checks taxonomy/term listings to ensure only accessible nodes are listed. * - * @param $is_admin + * @param boolean $is_admin * A boolean indicating whether the current user is an administrator. If * TRUE, all nodes should be listed. If FALSE, only public nodes and the * user's own private nodes should be listed. diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeAccessRebuildTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeAccessRebuildTest.php index 612ba36..0195a6f 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeAccessRebuildTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeAccessRebuildTest.php @@ -27,6 +27,9 @@ class NodeAccessRebuildTest extends NodeTestBase { $this->web_user = $web_user; } + /** + * Test the "rebuild permissions" link. + */ function testNodeAccessRebuild() { $this->drupalGet('admin/reports/status'); $this->clickLink(t('Rebuild permissions')); diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeBlockTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeBlockTest.php index 9aca3cf..9ab0381 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeBlockTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeBlockTest.php @@ -27,11 +27,16 @@ class NodeBlockTest extends NodeTestBase { function setUp() { parent::setUp(); - // Create and login user + // Create and login user. $admin_user = $this->drupalCreateUser(array('administer blocks')); $this->drupalLogin($admin_user); } + /** + * Test the search form. + * + * Sees if the search form is available, and one can set is to a region. + */ function testSearchFormBlock() { // Set block title to confirm that the interface is available. $this->drupalPost('admin/structure/block/manage/node/syndicate/configure', array('title' => $this->randomName(8)), t('Save block')); diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeBuildContentTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeBuildContentTest.php index 2b0dbeb..e0a9177 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeBuildContentTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeBuildContentTest.php @@ -20,13 +20,17 @@ class NodeBuildContentTest extends NodeTestBase { ); } - /** - * Test to ensure that a node's content array is rebuilt on every call to node_build_content(). - */ + /** + * Test if nodes get rebuilt. + * + * Test to ensure that a node's content array is rebuilt on every + * call to node_build_content(). + */ function testNodeRebuildContent() { $node = $this->drupalCreateNode(); - // Set a property in the content array so we can test for its existence later on. + // Set a property in the content array so we can test for its existence + // later on. $node->content['test_content_property'] = array('#value' => $this->randomString()); $content = node_build_content($node); diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeCreationTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeCreationTest.php index a8fbb07..d964de7 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeCreationTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeCreationTest.php @@ -56,7 +56,10 @@ class NodeCreationTest extends NodeTestBase { } /** - * Create a page node and verify that a transaction rolls back the failed creation + * Test a failing page creation. + * + * Create a page node and verify that a transaction rolls back the failed + * creation. */ function testFailedPageCreation() { // Create a node. diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeFieldMultilingualTestCase.php b/core/modules/node/lib/Drupal/node/Tests/NodeFieldMultilingualTestCase.php index f51342b..604e488 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeFieldMultilingualTestCase.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeFieldMultilingualTestCase.php @@ -111,7 +111,7 @@ class NodeFieldMultilingualTestCase extends WebTestBase { $this->assertRaw($body_value, t('Body correctly displayed using English as requested language')); } - /* + /** * Test multilingual field display settings. */ function testMultilingualDisplaySettings() { diff --git a/core/modules/node/lib/Drupal/node/Tests/NodePostSettingsTest.php b/core/modules/node/lib/Drupal/node/Tests/NodePostSettingsTest.php index 9ce688a..533cb94 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodePostSettingsTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodePostSettingsTest.php @@ -27,7 +27,10 @@ class NodePostSettingsTest extends NodeTestBase { } /** - * Set "Basic page" content type to display post information and confirm its presence on a new node. + * Test post information on nodes. + * + * Set "Basic page" content type to display post information and confirm its + * presence on a new node. */ function testPagePostInfo() { @@ -50,7 +53,10 @@ class NodePostSettingsTest extends NodeTestBase { } /** - * Set "Basic page" content type to not display post information and confirm its absence on a new node. + * Test 'not display' post information. + * + * Set "Basic page" content type to not display post information and confirm + * its absence on a new node. */ function testPageNotPostInfo() { diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeRSSContentTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeRSSContentTest.php index 97b3b25..7c1ebd6 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeRSSContentTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeRSSContentTest.php @@ -42,6 +42,8 @@ class NodeRSSContentTest extends NodeTestBase { } /** + * Test if custom data is added to the RSS feed. + * * Create a new node and ensure that it includes the custom data when added * to an RSS feed. */ diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeRevisionsTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeRevisionsTest.php index ee12f0a..a6fa28a 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeRevisionsTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeRevisionsTest.php @@ -45,7 +45,8 @@ class NodeRevisionsTest extends NodeTestBase { // Create revision with random title and body and update variables. $this->drupalCreateNode($settings); - $node = node_load($node->nid); // Make sure we get revision information. + // Make sure we get revision information. + $node = node_load($node->nid); $settings = get_object_vars($node); $nodes[] = $node; diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeSaveTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeSaveTest.php index 116ca18..22116e5 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeSaveTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeSaveTest.php @@ -30,7 +30,8 @@ class NodeSaveTest extends NodeTestBase { function setUp() { parent::setUp(); - // Create a user that is allowed to post; we'll use this to test the submission. + // Create a user that is allowed to post; we'll use this to test the + // submission. $web_user = $this->drupalCreateUser(array('create article content')); $this->drupalLogin($web_user); $this->web_user = $web_user; @@ -38,6 +39,7 @@ class NodeSaveTest extends NodeTestBase { /** * Import test, to check if custom node ids are saved properly. + * * Workflow: * - first create a piece of content * - save the content @@ -71,6 +73,8 @@ class NodeSaveTest extends NodeTestBase { } /** + * Test the "created" and "changed" timestamps. + * * Check that the "created" and "changed" timestamps are set correctly when * saving a new node or updating an existing node. */ @@ -108,8 +112,10 @@ class NodeSaveTest extends NodeTestBase { 'uid' => $this->web_user->uid, 'type' => 'article', 'title' => $this->randomName(8), - 'created' => 280299600, // Sun, 19 Nov 1978 05:00:00 GMT - 'changed' => 979534800, // Drupal 1.0 release. + // Sun, 19 Nov 1978 05:00:00 GMT + 'created' => 280299600, + // Drupal 1.0 release. + 'changed' => 979534800, ); entity_create('node', $edit)->save(); @@ -128,6 +134,8 @@ class NodeSaveTest extends NodeTestBase { } /** + * Tests determing changes in hool_node_presave(). + * * Tests determing changes in hook_node_presave() and verifies the static node * load cache is cleared upon save. */ diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeTitleTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeTitleTest.php index 1880d4f..b54818d 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeTitleTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeTitleTest.php @@ -41,7 +41,8 @@ class NodeTitleTest extends NodeTestBase { */ function testNodeTitle() { // Create "Basic page" content with title. - // Add the node to the frontpage so we can test if teaser links are clickable. + // Add the node to the frontpage so we can test if teaser links are + // clickable. $settings = array( 'title' => $this->randomName(8), 'promote' => 1, diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeTypeInitialLanguageTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeTypeInitialLanguageTest.php index 434384f..80a0df2 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeTypeInitialLanguageTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeTypeInitialLanguageTest.php @@ -59,7 +59,7 @@ class NodeTypeInitialLanguageTest extends NodeTestBase { $this->drupalPost('admin/config/regional/language', $edit, t('Save configuration')); // Tests the initial language after changing the site default language. - // First unhide the language selector + // First unhide the language selector. $edit = array( 'node_type_language_hidden' => FALSE, ); diff --git a/core/modules/node/lib/Drupal/node/Tests/PageEditTest.php b/core/modules/node/lib/Drupal/node/Tests/PageEditTest.php index 9fa1061..b92e3e6 100644 --- a/core/modules/node/lib/Drupal/node/Tests/PageEditTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/PageEditTest.php @@ -51,7 +51,8 @@ class PageEditTest extends NodeTestBase { $actual_url = $this->getURL(); $this->assertEqual($edit_url, $actual_url, t('On edit page.')); - // Check that the title and body fields are displayed with the correct values. + // Check that the title and body fields are displayed with the correct + // values. $active = '' . t('(active tab)') . ''; $link_text = t('!local-task-title!active', array('!local-task-title' => t('Edit'), '!active' => $active)); $this->assertText(strip_tags($link_text), 0, t('Edit tab found and marked active.')); @@ -65,7 +66,8 @@ class PageEditTest extends NodeTestBase { // Stay on the current page, without reloading. $this->drupalPost(NULL, $edit, t('Save')); - // Check that the title and body fields are displayed with the updated values. + // Check that the title and body fields are displayed with the updated + // values. $this->assertText($edit[$title_key], t('Title displayed.')); $this->assertText($edit[$body_key], t('Body displayed.')); diff --git a/core/modules/node/lib/Drupal/node/Tests/PagePreviewTest.php b/core/modules/node/lib/Drupal/node/Tests/PagePreviewTest.php index 5bfd342..88b05c6 100644 --- a/core/modules/node/lib/Drupal/node/Tests/PagePreviewTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/PagePreviewTest.php @@ -42,7 +42,8 @@ class PagePreviewTest extends NodeTestBase { $this->assertText($edit[$title_key], t('Title displayed.')); $this->assertText($edit[$body_key], t('Body displayed.')); - // Check that the title and body fields are displayed with the correct values. + // Check that the title and body fields are displayed with the correct + // values. $this->assertFieldByName($title_key, $edit[$title_key], t('Title field displayed.')); $this->assertFieldByName($body_key, $edit[$body_key], t('Body field displayed.')); } @@ -69,7 +70,8 @@ class PagePreviewTest extends NodeTestBase { $this->assertText($edit[$title_key], t('Title displayed.')); $this->assertText($edit[$body_key], t('Body displayed.')); - // Check that the title and body fields are displayed with the correct values. + // Check that the title and body fields are displayed with the correct + // values. $this->assertFieldByName($title_key, $edit[$title_key], t('Title field displayed.')); $this->assertFieldByName($body_key, $edit[$body_key], t('Body field displayed.')); diff --git a/core/modules/node/lib/Drupal/node/Tests/PageViewTest.php b/core/modules/node/lib/Drupal/node/Tests/PageViewTest.php index e3f3e54..a63dd8f 100644 --- a/core/modules/node/lib/Drupal/node/Tests/PageViewTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/PageViewTest.php @@ -17,7 +17,10 @@ class PageViewTest extends NodeTestBase { } /** - * Creates a node and then an anonymous and unpermissioned user attempt to edit the node. + * Test if an unpermissioned user can edit a node. + * + * Creates a node and then an anonymous and unpermissioned user attempt to + * edit the node. */ function testPageView() { // Create a node to view. diff --git a/core/modules/node/lib/Drupal/node/Tests/SummaryLengthTest.php b/core/modules/node/lib/Drupal/node/Tests/SummaryLengthTest.php index ca66678..bba5995 100644 --- a/core/modules/node/lib/Drupal/node/Tests/SummaryLengthTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/SummaryLengthTest.php @@ -17,7 +17,10 @@ class SummaryLengthTest extends NodeTestBase { } /** - * Creates a node and then an anonymous and unpermissioned user attempt to edit the node. + * Test if the summary in 600 characters. + * + * Creates a node and then an anonymous and unpermissioned user attempt to + * edit the node. */ function testSummaryLength() { // Create a node to view. @@ -34,7 +37,7 @@ class SummaryLengthTest extends NodeTestBase { // Attempt to access the front page. $this->drupalGet("node"); - // The node teaser when it has 600 characters in length + // The node teaser when it has 600 characters in length. $expected = 'What is a Drupalism?'; $this->assertRaw($expected, t('Check that the summary is 600 characters in length'), 'Node'); @@ -43,7 +46,8 @@ class SummaryLengthTest extends NodeTestBase { $instance['display']['teaser']['settings']['trim_length'] = 200; field_update_instance($instance); - // Attempt to access the front page again and check if the summary is now only 200 characters in length. + // Attempt to access the front page again and check if the summary is now + // only 200 characters in length. $this->drupalGet("node"); $this->assertNoRaw($expected, t('Check that the summary is not longer than 200 characters'), 'Node'); }