예제 #1
0
파일: App_test.php 프로젝트: hutchike/YAWF
 /**
  * Render the test run by modifying a render object to include the results
  *
  * @param Object $render the render object to modify with test results
  */
 protected function render_test_run($render)
 {
     if ($this->test_run) {
         return;
     }
     // so we don't repeat the tests
     $service_list = Config::get('REST_SERVICE_LIST');
     $testee = in_array($this->folder, split_list($service_list)) ? $this->service : $this->controller;
     $test_run = $this->test_run = new TestRun($testee);
     $test_run->run_tests();
     $render->test_run_output = $test_run->get_output();
     $render->test_cases = $test_run->get_test_cases();
     $render->count_passed = $test_run->count_test_cases_that_passed();
     $render->count_failed = $test_run->count_test_cases_that_failed();
     $render->testee_name = $test_run->get_testee_name();
     $render->title = 'Testing "' . $test_run->get_testee_name() . '"';
     $render->content = parent::render_view('test_run', $render, array(Symbol::FOLDER => Symbol::TEST));
 }
예제 #2
0
파일: App_test.php 프로젝트: hutchike/YAWF
 /**
  * Setup the tests to run by looking at the config constants
  * APP_TEST_CONTROLLER_LIST and APP_TEST_VIEW_PATH_LIST.
  */
 public function setup()
 {
     $this->controllers = split_list(APP_TEST_CONTROLLER_LIST);
     $this->view_paths = split_list(APP_TEST_VIEW_PATH_LIST);
 }