/** * Announces the start of a test. * * @param string $method Test method just started. * @return void * @access public */ function before($method) { parent::before($method); if (isset($this->fixtures) && (!is_array($this->fixtures) || empty($this->fixtures))) { unset($this->fixtures); } // Set up DB connection if (isset($this->fixtures) && strtolower($method) == 'start') { $this->_initDb(); $this->_loadFixtures(); } // Create records if (isset($this->_fixtures) && isset($this->db) && !in_array(strtolower($method), array('start', 'end')) && $this->__truncated && $this->autoFixtures == true) { foreach ($this->_fixtures as $fixture) { $inserts = $fixture->insert($this->db); } } if (!in_array(strtolower($method), $this->methods)) { $this->startTest($method); } }
/** * Announces the start of the test. * @param string $method Test method just started. * @access public */ function before($method) { parent::before($this->cleanCamelCase($method)); }
/** * Announces the start of a test. * * @param string $method Test method just started. * * @access public */ function before($method) { parent::before($method); if (isset($this->fixtures) && (!is_array($this->fixtures) || empty($this->fixtures))) { unset($this->fixtures); } // Set up DB connection if (isset($this->fixtures) && low($method) == 'start') { $this->_initDb(); $this->_loadFixtures(); } // Create records if (isset($this->_fixtures) && isset($this->db) && !in_array(low($method), array('start', 'end'))) { foreach ($this->_fixtures as $fixture) { $inserts = $fixture->insert(); if (isset($inserts) && !empty($inserts)) { foreach ($inserts as $query) { if (isset($query) && $query !== false) { $this->db->_execute($query); } } } } } if (!in_array(low($method), $this->methods)) { $this->startTest($method); } }
/** * Announces the start of the test. * @param string $method Test method just started. * @access public */ function before($method) { parent::before($method); $this->setBrowser($this->createBrowser()); }