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

Contents of /contributions/modules/workflow_named_transitions/workflow_named_transitions.test

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


Revision 1.3 - (show annotations) (download) (as text)
Mon Feb 23 18:02:11 2009 UTC (9 months ago) by deekayen
Branch: MAIN
CVS Tags: DRUPAL-6--1-0, DRUPAL-6--1-1, HEAD
Branch point for: DRUPAL-6--1
Changes since 1.2: +2 -2 lines
File MIME type: text/x-php
group test in Workflow instead of its own
1 <?php
2 // $Id: workflow_named_transitions.test,v 1.2 2008/12/23 18:13:31 deekayen Exp $
3
4 /**
5 * @file
6 * Tests for the Workflow Named Transitions module.
7 */
8
9 class WorkflowNamedTransitionsTest extends DrupalWebTestCase {
10 function getInfo() {
11 return array(
12 'name' => 'Workflow Named Transitions Test',
13 'description' => "This tests whether the Edit Labels tab exists in the workflow area.",
14 'group' => 'Workflow'
15 );
16 }
17
18 function setUp() {
19 parent::setUp('workflow', 'workflow_named_transitions');
20 }
21
22 function testEditLabelsExistsAdmin() {
23 $user = $this->drupalCreateUser(array('administer workflow'));
24 $this->drupalLogin($user);
25 $this->drupalGet('admin/build/workflow');
26 // HTML of the Edit labels tab
27 $this->assertRaw(sprintf('admin/build/workflow/labels">%s</a>', t('Edit labels')), t('Edit labels tab found'));
28 $this->drupalGet('admin/build/workflow/labels');
29 $this->assertResponse('200');
30 }
31
32 function testEditLabelsMissing() {
33 $user = $this->drupalCreateUser(array('access content'));
34 $this->drupalLogin($user);
35 $this->drupalGet('admin/build/workflow');
36 // 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'));
38 $this->drupalGet('admin/build/workflow/labels');
39 $this->assertResponse('403');
40 }
41
42 function tearDown() {
43 parent::tearDown();
44 }
45 }

  ViewVC Help
Powered by ViewVC 1.1.2