You are here

function CpnNodeTest::testNodeSettings in Code per Node 7

Verify the content type settings show up.

File

tests/cpn.node.test, line 23
Test CPN's node integration.

Class

CpnNodeTest
@file Test CPN's node integration.

Code

function testNodeSettings() {
  $permissions = array(
    'administer code per node',
    'administer content types',
    'access administration pages',
  );

  // Reset the static variable used to identify permissions, otherwise it's
  // possible the permissions check in drupalCreateUser will fail.
  $this
    ->checkPermissions(array(), TRUE);
  cache_clear_all();

  // Create an admin user with the above permissions.
  $this->adminUser = $this
    ->drupalCreateUser($permissions);
  $this
    ->drupalLogin($this->adminUser);

  // Load the Page content type settings.
  $this
    ->drupalGet('admin/structure/types/manage/page');
  $this
    ->assertResponse(200);
  $this
    ->assertText(t('Code per Node settings'));
}