/** * 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); }
/** * 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); }
/** * 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); }
/** * 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)); }
/** * 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); }
/** * 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); }