You are here

public function ProtectedNodeStatistics::testTotal in Protected Node 7

Same name and namespace in other branches
  1. 1.0.x tests/protected_node.statistics.test \ProtectedNodeStatistics::testTotal()

Test function.

Test the total number of nodes.

File

tests/protected_node.statistics.test, line 48
Test protected node statistics overview.

Class

ProtectedNodeStatistics
Test protected node statistics overview.

Code

public function testTotal() {

  // Add a new page node.
  $node_data = array(
    'title' => $this
      ->randomName(8),
    'body[und][0][value]' => $this
      ->randomName(32),
  );
  $this
    ->drupalPost('node/add/page', $node_data, t('Save'));

  // Go to the configuration page.
  $this
    ->drupalGet('admin/config/content/protected_node');
  $this
    ->assertRaw('<td>Total nodes</td><td style="text-align:right">1</td>', 'The total number of nodes is right.');
}