當前位置: 首頁>>代碼示例>>PHP>>正文


PHP SimpleInvokerDecorator::invoke方法代碼示例

本文整理匯總了PHP中SimpleInvokerDecorator::invoke方法的典型用法代碼示例。如果您正苦於以下問題:PHP SimpleInvokerDecorator::invoke方法的具體用法?PHP SimpleInvokerDecorator::invoke怎麽用?PHP SimpleInvokerDecorator::invoke使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在SimpleInvokerDecorator的用法示例。


在下文中一共展示了SimpleInvokerDecorator::invoke方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: invoke

 /**
  *    Invokes a test method and dispatches any
  *    untrapped errors. Called back from
  *    the visiting runner.
  *
  *    @param string $method    Test method to call.
  */
 public function invoke($method)
 {
     $queue =& $this->_createErrorQueue();
     set_error_handler('SimpleTestErrorHandler');
     parent::invoke($method);
     restore_error_handler();
     $queue->tally();
 }
開發者ID:kapai69,項目名稱:fl-ru-damp,代碼行數:15,代碼來源:errors.php

示例2: invoke

 /**
  *    Invokes a test method and dispatches any
  *    untrapped errors. Called back from
  *    the visiting runner.
  *    @param string $method    Test method to call.
  *    @access public
  */
 function invoke($method)
 {
     $queue =& $this->_createErrorQueue();
     set_error_handler('SimpleTestErrorHandler', (E_ALL | E_STRICT) & ~E_RECOVERABLE_ERROR);
     parent::invoke($method);
     restore_error_handler();
     $queue->tally();
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:15,代碼來源:errors.php

示例3: invoke

 /**
  *    Invokes a test method and dispatches any
  *    untrapped errors.
  *    @param string $method    Test method to call.
  *    @access public
  */
 function invoke($method)
 {
     try {
         parent::invoke($method);
     } catch (Exception $exception) {
         $test_case =& $this->getTestCase();
         $test_case->exception($exception);
     }
 }
開發者ID:ahiliation,項目名稱:beautifulwork,代碼行數:15,代碼來源:exceptions.php

示例4: invoke

 function invoke($method)
 {
     set_error_handler('simpleTestErrorHandler');
     parent::invoke($method);
     $queue =& SimpleErrorQueue::instance();
     while (list($severity, $message, $file, $line, $globals) = $queue->extract()) {
         $test_case =& $this->getTestCase();
         $test_case->error($severity, $message, $file, $line, $globals);
     }
     restore_error_handler();
 }
開發者ID:BackupTheBerlios,項目名稱:phpbase-svn,代碼行數:11,代碼來源:runner.php

示例5: invoke

 /**
  *    Invokes a test method and dispatches any
  *    untrapped errors.
  *    @param string $method    Test method to call.
  *    @access public
  */
 function invoke($method)
 {
     try {
         parent::invoke($method);
     } catch (Exception $exception) {
         $test_case =& $this->getTestCase();
         $test_case->tearDown();
         // Added by T.J.Hunt@open.ac.uk.
         $test_case->exception($exception);
     }
 }
開發者ID:veritech,項目名稱:pare-project,代碼行數:17,代碼來源:exceptions.php

示例6: invoke

 function invoke($method)
 {
     ob_start();
     parent::invoke($method);
     $output = ob_get_contents();
     ob_end_clean();
     $sock = new SimpleSocket("127.0.0.1", $this->_port, 5);
     $sock->write($output);
     $sock->close();
     echo $sock->getError();
 }
開發者ID:JackCanada,項目名稱:moodle-hacks,代碼行數:11,代碼來源:eclipse.php

示例7: invoke

 /**
  *    Invokes a test method and dispatches any
  *    untrapped errors. Called back from
  *    the visiting runner.
  *    @param string $method    Test method to call.
  *    @access public
  */
 function invoke($method)
 {
     $context =& SimpleTest::getContext();
     $queue =& $context->get('SimpleErrorQueue');
     $queue->setTestCase($this->GetTestCase());
     set_error_handler('SimpleTestErrorHandler');
     parent::invoke($method);
     while (list($severity, $message, $file, $line) = $queue->extract()) {
         $severity = SimpleErrorQueue::getSeverityAsString($severity);
         $test =& $this->getTestCase();
         $test->error($severity, $message, $file, $line);
     }
     restore_error_handler();
 }
開發者ID:JackCanada,項目名稱:moodle-hacks,代碼行數:21,代碼來源:errors.php

示例8: invoke

 /**
  *    Invokes a test method whilst trapping expected
  *    exceptions. Any left over unthrown exceptions
  *    are then reported as failures.
  *    @param string $method    Test method to call.
  */
 function invoke($method)
 {
     $trap = SimpleTest::getContext()->get('SimpleExceptionTrap');
     $trap->clear();
     try {
         parent::invoke($method);
     } catch (Exception $exception) {
         if (!$trap->isExpected($this->getTestCase(), $exception)) {
             $this->getTestCase()->exception($exception);
         }
         $trap->clear();
     }
     if ($message = $trap->getOutstanding()) {
         $this->getTestCase()->fail($message);
     }
 }
開發者ID:hafizubikm,項目名稱:bakeme,代碼行數:22,代碼來源:exceptions.php

示例9: invoke

 /**
  *    Invokes a test method and dispatches any
  *    untrapped errors. Called back from
  *    the visiting runner.
  *    @param string $method    Test method to call.
  *    @access public
  */
 function invoke($method)
 {
     $queue =& $this->_createErrorQueue();
     set_error_handler('SimpleTestErrorHandler');
     //moodle hack start
     // note: this breaks PHP4 compatibility!
     $rethrow = null;
     try {
         parent::invoke($method);
     } catch (Exception $e) {
         $rethrow = $e;
     }
     restore_error_handler();
     $queue->tally();
     if ($rethrow) {
         throw $rethrow;
     }
     //moodle hack end
 }
開發者ID:vuchannguyen,項目名稱:web,代碼行數:26,代碼來源:errors.php

示例10: invoke

 /**
  *    Invokes a test method whilst trapping expected
  *    exceptions. Any left over unthrown exceptions
  *    are then reported as failures.
  *
  *    @param string $method    Test method to call.
  */
 public function invoke($method)
 {
     $trap = SimpleTest::getContext()->get('SimpleExceptionTrap');
     $trap->clear();
     try {
         $has_thrown = false;
         parent::invoke($method);
     } catch (Exception $exception) {
         $has_thrown = true;
         if (!$trap->isExpected($this->getTestCase(), $exception)) {
             $this->getTestCase()->exception($exception);
         }
         $trap->clear();
     }
     if ($message = $trap->getOutstanding()) {
         $this->getTestCase()->fail($message);
     }
     if ($has_thrown) {
         try {
             parent::getTestCase()->tearDown();
         } catch (Exception $e) {
         }
     }
 }
開發者ID:kapai69,項目名稱:fl-ru-damp,代碼行數:31,代碼來源:exceptions.php

示例11: invoke

 /**
  *    Invokes a test method and dispatches any
  *    untrapped assertion failures. Called back from
  *    the visiting runner.
  *    @param string $method    Test method to call.
  *    @access public
  */
 function invoke($method)
 {
     $queue = $this->createFailQueue();
     parent::invoke($method);
     $queue->tally();
 }
開發者ID:GerHobbelt,項目名稱:simpletest,代碼行數:13,代碼來源:fails.php

示例12: invoke

 /**
  *    Builds the browser and runs the test.
  *    @param string $method    Test method to call.
  *    @access public
  */
 function invoke($method)
 {
     $test =& $this->getTestCase();
     $test->setBrowser($test->createBrowser());
     parent::invoke($method);
     $test->unsetBrowser();
 }
開發者ID:BackupTheBerlios,項目名稱:stato-svn,代碼行數:12,代碼來源:web_tester.php


注:本文中的SimpleInvokerDecorator::invoke方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。