~budgester/irm/trunk

« back to all changes in this revision

Viewing changes to testing/FastTrackTest.php

  • Committer: budgester at budgester
  • Date: 2008-03-05 23:14:13 UTC
  • Revision ID: budgester@budgester.com-20080305231413-k5vqfuckfo09ju42
Initial import of IRM codebase

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
class FastTrackFillTest extends IRM_WebTestCase
 
4
{
 
5
        function testAddDisplay()
 
6
        {
 
7
                $rows[] = "INSERT INTO fasttracktemplates
 
8
                                (ID, name, request, response)
 
9
                                VALUES
 
10
                                (17, 'foo', 'req', 'respond to me & only me!')";
 
11
        
 
12
                BulkQueries($rows);
 
13
                
 
14
                $this->get(TESTING_BASEURI.'/users/tracking-fasttrack.php?AUTOFILL=17');
 
15
                $this->assertNoUnwantedPattern(PHP_ERROR_REGEX);
 
16
 
 
17
                $this->assertTitle('IRM: FastTrack');
 
18
 
 
19
                // A few random fields...
 
20
                $this->assertField('ufname', 'Technician User');
 
21
                $this->assertField('uemail', 'tech@localhost');
 
22
 
 
23
                $this->assertWantedPattern('%<textarea.*name="contents">req</textarea>%i');
 
24
                $this->assertWantedPattern('%<textarea.*name="solution">respond to me &amp; only me!</textarea>%i');
 
25
        }
 
26
}
 
27