_test = $test; $this->_calls = array(); if (defined('TESTS_ZEND_SERVICE_SIMPY_USERNAME')) { $username = TESTS_ZEND_SERVICE_SIMPY_USERNAME; $password = TESTS_ZEND_SERVICE_SIMPY_PASSWORD; } else { $username = null; $password = null; } $this->_simpy = new Zend_Service_Simpy($username, $password); $this->init(); } /** * Initialize method to be overridden in subclasses if needed. * * @return void */ public function init() { } /** * Returns the path to the file intended to contain the service consumer * response for the current method call. * * @param string $name Name of the method being called * @return string File path */ protected function _getFilePath($name) { if (!isset($this->_calls[$name])) { $this->_calls[$name] = 0; } $this->_calls[$name]++; $dir = dirname(__FILE__) . '/_files/'; $file = $this->_test . '_' . $name . '_' . $this->_calls[$name]; return $dir . $file; } }