コード例 #1
0
 /**
  * Decorates SimpleTest's implementation to auto-validate mock objects.
  */
 public function after($method)
 {
     try {
         $this->_mockery()->assertIsSatisfied();
     } catch (Yay_NotSatisfiedException $e) {
         $this->fail($e->getMessage());
     }
     $this->_mockery = null;
     return parent::after($method);
 }
コード例 #2
0
ファイル: cake_test_case.php プロジェクト: cls1991/ryzomcore
 /**
  * Announces the end of a test.
  *
  * @param string $method Test method just finished.
  * @return void
  * @access public
  */
 function after($method)
 {
     $isTestMethod = !in_array(strtolower($method), array('start', 'end'));
     if (isset($this->_fixtures) && isset($this->db) && $isTestMethod) {
         foreach ($this->_fixtures as $fixture) {
             $fixture->truncate($this->db);
         }
         $this->__truncated = true;
     } else {
         $this->__truncated = false;
     }
     if (!in_array(strtolower($method), $this->methods)) {
         $this->endTest($method);
     }
     $this->_should_skip = false;
     parent::after($method);
 }
コード例 #3
0
 /**
  * Announces the end of a test.
  *
  * @param string $method Test method just finished.
  *
  * @access public
  */
 function after($method)
 {
     if (isset($this->_fixtures) && isset($this->db) && !in_array(low($method), array('start', 'end'))) {
         foreach ($this->_fixtures as $fixture) {
             $query = $fixture->truncate();
             if (isset($query) && $query !== false) {
                 $this->db->_execute($query);
             }
         }
     }
     if (!in_array(low($method), $this->methods)) {
         $this->endTest($method);
     }
     parent::after($method);
 }
コード例 #4
0
 /**
  *    Announces the end of the test. Includes private clean up.
  *    @param string $method    Test method just finished.
  *    @access public
  */
 function after($method)
 {
     parent::after($this->cleanCamelCase($method));
 }
コード例 #5
0
ファイル: web_tester.php プロジェクト: GerHobbelt/simpletest
 /**
  *    Announces the end of the test. Includes private clean up.
  *    @param string $method    Test method just finished.
  *    @access public
  */
 function after($method)
 {
     $this->unsetBrowser();
     parent::after($method);
 }
コード例 #6
0
ファイル: cake_test_case.php プロジェクト: kaz0636/openflp
 /**
  * Announces the end of a test.
  *
  * @param string $method Test method just finished.
  *
  * @access public
  */
 function after($method)
 {
     if (isset($this->_fixtures) && isset($this->db) && !in_array(low($method), array('start', 'end'))) {
         foreach ($this->_fixtures as $fixture) {
             $this->db->truncate($fixture->table);
         }
         $this->__truncated = true;
     } else {
         $this->__truncated = false;
     }
     if (!in_array(low($method), $this->methods)) {
         $this->endTest($method);
     }
     parent::after($method);
 }