/[drupal]/contributions/modules/workflow_named_transitions/workflow_named_transitions.test
ViewVC logotype

Diff of /contributions/modules/workflow_named_transitions/workflow_named_transitions.test

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1, Tue Dec 23 16:09:31 2008 UTC revision 1.2, Tue Dec 23 18:13:31 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: jammer_preview.test,v 1.2.2.1 2008/12/17 19:23:16 deekayen Exp $  // $Id: workflow_named_transitions.test,v 1.1 2008/12/23 16:09:31 deekayen Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 9  Line 9 
9  class WorkflowNamedTransitionsTest extends DrupalWebTestCase {  class WorkflowNamedTransitionsTest extends DrupalWebTestCase {
10    function getInfo() {    function getInfo() {
11      return array(      return array(
12        'name' => t('Workflow Named Transitions Test'),        'name' => 'Workflow Named Transitions Test',
13        'description' => t("This tests whether the Edit Labels tab exists in the workflow area."),        'description' => "This tests whether the Edit Labels tab exists in the workflow area.",
14        'group' => t('Workflow Named Transitions')        'group' => 'Workflow Named Transitions'
15      );      );
16    }    }
17    
# Line 22  class WorkflowNamedTransitionsTest exten Line 22  class WorkflowNamedTransitionsTest exten
22    function testEditLabelsExistsAdmin() {    function testEditLabelsExistsAdmin() {
23      $user = $this->drupalCreateUser(array('administer workflow'));      $user = $this->drupalCreateUser(array('administer workflow'));
24      $this->drupalLogin($user);      $this->drupalLogin($user);
25      $url = url('admin/build/workflow', array('absolute' => TRUE));      $this->drupalGet('admin/build/workflow');
     $this->drupalGet($url);  
26      // HTML of the Edit labels tab      // HTML of the Edit labels tab
27      $this->assertRaw(sprintf('admin/build/workflow/labels">%s</a>', t('Edit labels')), t('Edit labels tab found'));      $this->assertRaw(sprintf('admin/build/workflow/labels">%s</a>', t('Edit labels')), t('Edit labels tab found'));
28      $url = url('admin/build/workflow/labels', array('absolute' => TRUE));      $this->drupalGet('admin/build/workflow/labels');
     $this->drupalGet($url);  
29      $this->assertResponse('200');      $this->assertResponse('200');
30    }    }
31    
32    function testEditLabelsMissing() {    function testEditLabelsMissing() {
33      $user = $this->drupalCreateUser(array('access content'));      $user = $this->drupalCreateUser(array('access content'));
34      $this->drupalLogin($user);      $this->drupalLogin($user);
35      $url = url('admin/build/workflow', array('absolute' => TRUE));      $this->drupalGet('admin/build/workflow');
     $this->drupalGet($url);  
36      // HTML of the Edit labels tab      // HTML of the Edit labels tab
37      $this->assertNoRaw(sprintf('admin/build/workflow/labels">%s</a>', t('Edit labels')), t('Edit labels tab not found'));      $this->assertNoRaw(sprintf('admin/build/workflow/labels">%s</a>', t('Edit labels')), t('Edit labels tab not found'));
38      $url = url('admin/build/workflow/labels', array('absolute' => TRUE));      $this->drupalGet('admin/build/workflow/labels');
     $this->drupalGet($url);  
39      $this->assertResponse('403');      $this->assertResponse('403');
40    }    }
41    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.2