1<?php
2
3/**
4 * List of preconditions.
5 *
6 */
7class gtPreConditionList {
8
9  private $preConditions = array(
10      'gtIsSpecifiedTestType',
11      'gtIsSpecifiedFunctionOrMethod',
12      'gtIfClassHasMethod',
13      'gtIsValidClass',
14      'gtIsValidFunction',
15      'gtIsValidMethod',
16  );
17
18
19  /**
20   * Create an instance of each pre-condition and run their check methods
21   *
22   */
23  public function check($clo) {
24    foreach ($this->preConditions as $preCon) {
25      $checkThis = new $preCon;
26      if(!$checkThis->check($clo)) {
27        echo $checkThis->getMessage();
28        die(gtText::get('help'));
29      }
30    }
31  }
32}
33?>
34