~ubuntu-branches/ubuntu/hardy/gallery2/hardy-security

« back to all changes in this revision

Viewing changes to lib/tools/phpunit/index.tpl

  • Committer: Bazaar Package Importer
  • Author(s): Michael C. Schultheiss
  • Date: 2006-04-16 16:42:35 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060416164235-8uy0u4bfjdxpge2o
Tags: 2.1.1-1
* New upstream release (Closes: #362936)
  + Bugfixes for Postgres7 (Closes: #359000, #362152)

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
    </STYLE>
8
8
  </head>
9
9
  <body>
 
10
  <?php if (!isset($compactView)): ?>
10
11
    <script type="text/javascript" language="javascript">
11
12
      function setFilter(value) {
12
13
        document.forms[0].filter.value=value;
13
14
      }
14
 
      function reRun(value) {
15
 
        setFilter(value);
 
15
      function reRun() {
 
16
        setFilter(failedTestFilter);
16
17
        document.forms[0].submit();
17
18
      }
18
19
    </script>
108
109
        <input type="hidden" name="<?php echo $sessionKey?>" value="<?php echo $sessionId ?>"/>
109
110
        <?php endif; ?>
110
111
 
111
 
        <input style="margin-top: 0.3em; margin-bottom: 0.3em" type="text" name="filter" size="60" value="<?php echo $displayFilter ?>" />
 
112
        <input type="text" name="filter" size="60" value="<?php echo $displayFilter ?>"
 
113
               id="filter" style="margin-top: 0.3em; margin-bottom: 0.3em"/>
 
114
        <?php if (!isset($_GET['filter'])): ?>
 
115
          <script type="text/javascript"> document.getElementById('filter').focus(); </script>
 
116
        <?php endif; ?>
112
117
 
113
118
        <br/>
114
119
        <span id="filter_examples_toggle"
116
121
          onclick="toggleFilterExamples()">
117
122
          Help/Examples
118
123
          <span id="filter_examples_toggle_indicator"
119
 
            style="padding-left: .3em; padding-right: 0.3em; border: solid #a6caf0; border-width: 1px; background: #eee">
120
 
            +
121
 
          </span>
 
124
            style="padding-left: .3em; padding-right: 0.3em; border: solid #a6caf0; border-width: 1px; background: #eee">+</span>
122
125
        </span>
123
126
 
124
127
        <div id="help_and_examples" style="display: none">
128
131
          module/class/test name(s) encapsulated in parenthesis and separated with bars, this will
129
132
          exclude the matching tests. Use ":#-#" to restrict which matching tests are actually run.
130
133
          You can also specify multiple spans with ":#-#,#-#,#-#".
 
134
          Append ":1by1" to run tests one-per-request; automatic refresh stops when a test fails.
131
135
 
132
136
          <ul id="filter_examples_list">
133
137
            <li>
163
167
            <li>
164
168
              <a href="javascript:setFilter('comment:-3,4-')">comment:-3,4-</a>
165
169
            </li>
 
170
            <li>
 
171
              <a href="javascript:setFilter('core:1by1)">core:1by1</a>
 
172
            </li>
166
173
          </ul>
167
174
        </div>
168
175
      </form>
169
176
    </div>
170
177
 
171
 
    <h2>
172
 
      Modules
173
 
    </h2>
 
178
    <h2>Modules</h2>
174
179
 
175
180
    <div class="section" style="width: 100%">
176
181
      <?php
182
187
      }
183
188
      ?>
184
189
      <?php printf("%d active, %d total", $activeCount, sizeof($moduleStatusList)); ?>
185
 
      <span onclick="toggleModulesListing()" id="modules_listing_toggle_indicator" style="border: solid #a6caf0; border-width: 1px; background: #eee">
186
 
        +
187
 
      </span>
 
190
      <span onclick="toggleModulesListing()" id="modules_listing_toggle_indicator"
 
191
            style="padding-left: .3em; padding-right: 0.3em; border: solid #a6caf0; border-width: 1px; background: #eee">+</span>
188
192
      <br/>
189
193
      <table cellspacing="1" cellpadding="1" border="0"
190
194
        width="800" align="center" class="details"
210
214
        <?php endforeach; ?>
211
215
      </table>
212
216
    </div>
213
 
 
214
 
    <?php
215
 
    $result = new PrettyTestResult();
 
217
  <?php endif; /* compactView */ ?>
 
218
 
 
219
  <h2>Test Results</h2>
 
220
 
 
221
  <table cellspacing="1" cellpadding="1" border="0" width="90%" align="CENTER" class="details">
 
222
  <tr><th>#</th><th>Module</th><th>Class</th><th>Function</th><th>Success?</th><th>Time</th></tr>
 
223
  <?php $i = 0;
 
224
    foreach ($testSuite->fTests as $testClass):
 
225
    foreach ($testClass->fTests as $test): $i++;
 
226
    if (isset($testOneByOne) && $testOneByOne != $i) continue; ?>
 
227
    <tr id="testRow<?php print $i ?>">
 
228
    <td><?php print $i ?></td>
 
229
    <td><?php print $test->getModuleId() ?></td>
 
230
    <td><?php print $test->classname() ?></td>
 
231
    <td><?php print $test->name() ?></td>
 
232
    <td><a href="#fail<?php print $i ?>" style="display:none">FAIL</a>&nbsp;</td><td>&nbsp;</td>
 
233
  </tr><?php endforeach; endforeach; ?>
 
234
  </table>
 
235
 
 
236
  <div id="testSummary" style="display:none">
 
237
    <h2>Summary</h2>
 
238
 
 
239
    <p><span id="testTime">&nbsp;</span> seconds elapsed</p>
 
240
    <p><span id="testCount">&nbsp;</span> run</p>
 
241
    <p><span id="testFailCount">&nbsp;</span> failed
 
242
       with <span id="testErrorCount">&nbsp;</span></p>
 
243
 
 
244
    <input type="button" onclick="reRun();" value="Re-run broken tests"
 
245
     id="runBrokenButton" style="display:none"/>
 
246
  </div>
 
247
 
 
248
  <?php
 
249
    $result = new GalleryTestResult();
216
250
    $testSuite->run($result, $range);
217
251
    $result->report();
218
 
    ?>
 
252
  ?>
219
253
  </body>
220
254
</html>