コード例 #1
0
 function _displayBrowse($path, &$root_group, &$current_group)
 {
     if ($root_group != $current_group) {
         echo '<p><a href="' . $this->getBaseURL() . '?browse=' . $path . '/..">Back</a></p>';
     }
     if (is_a($current_group, 'LimbGroupTest')) {
         $group_tests = $current_group->getTestCasesHandles();
     } else {
         $group_tests = array();
     }
     $buffer = "<br><a href='" . $this->getBaseURL() . "?perform={$path}&back=1'>Run all tests from this group</a>\n";
     $buffer .= "<p>Available test groups in '" . $current_group->getLabel() . "':</p>\n";
     if (sizeof($group_tests)) {
         $buffer .= "<ul>";
         foreach ($group_tests as $index => $group_test) {
             resolve_handle($group_test);
             if (!is_a($group_test, 'LimbGroupTest')) {
                 $buffer .= "<li><a href='" . $this->getBaseURL() . "?perform={$path}/{$index}'>P</a> " . $group_test->getLabel() . "</li>\n";
             } else {
                 $buffer .= "<li><a href='" . $this->getBaseURL() . "?perform={$path}/{$index}'>P</a> <a href='" . $this->getBaseURL() . "?browse={$path}/{$index}'>B</a> " . $group_test->getLabel() . "</li>\n";
             }
         }
         $buffer .= "</ul>\n";
     } else {
         $buffer .= "<p>No groups available.</p> \n";
     }
     echo $buffer;
     echo debug::parse_html_console();
 }
コード例 #2
0
 function test_constructor()
 {
   $handle = array('declared_in_same_file', 'construction_parameter');
   resolve_handle($handle);
   $this->assertIsA($handle, 'declared_in_same_file');
   $this->assertEqual($handle->test_var, 'construction_parameter');
 }
コード例 #3
0
function &create_object($class_name, $arguments = array())
{
    $handle =& $arguments;
    array_unshift($handle, $class_name);
    resolve_handle($handle);
    return $handle;
}
コード例 #4
0
 function process()
 {
     $this->counter = 0;
     if (sizeof($this->filters) > 0) {
         resolve_handle($this->filters[0]);
         $this->filters[0]->run($this, $this->request, $this->response);
     }
 }
コード例 #5
0
 /**
  * Perform the validation
  *
  * @return void
  * @access public
  */
 function validate(&$dataspace)
 {
     foreach ($this->rules as $key => $rule) {
         resolve_handle($this->rules[$key]);
         $this->rules[$key]->set_error_list($this->_get_error_list());
         $this->rules[$key]->validate($dataspace);
         $this->is_valid = (bool) ($this->is_valid & $this->rules[$key]->is_valid());
     }
     return $this->is_valid;
 }
コード例 #6
0
 function _fillTestGroup(&$group)
 {
     $test_cases =& $group->getTestCasesHandles();
     foreach (array_keys($test_cases) as $key) {
         resolve_handle($test_cases[$key]);
         if (is_a($test_cases[$key], 'LimbGroupTest')) {
             $this->_fillTestGroup($test_cases[$key]);
         }
         $group->addTestCase($test_cases[$key]);
     }
 }
コード例 #7
0
 function _displayBrowse($path, &$root_group, &$current_group)
 {
     if (is_a($current_group, 'LimbGroupTest')) {
         $group_tests = $current_group->getTestCasesHandles();
     } else {
         $group_tests = array();
     }
     $buffer = "Available test cases in \n'=== " . $current_group->getLabel() . " ===' :\n";
     if (sizeof($group_tests)) {
         foreach ($group_tests as $index => $group_test) {
             resolve_handle($group_test);
             $buffer .= $path . '/' . $index . ' ' . $group_test->getLabel() . "\n";
         }
         $buffer .= "\n";
     } else {
         $buffer .= "No tests available.\n";
     }
     echo $buffer;
     echo debug::parse_cli_console();
 }
コード例 #8
0
 function &_create_job_object($handle)
 {
     $object = $handle;
     resolve_handle($object);
     return $object;
 }