/** Tests init */ public function setUp() { // Get instance using services factory as error will signal other way $this->fileService = \samson\core\Service::getInstance('samson\\fs\\LocalFileService'); // Disable default error output \samson\core\Error::$OUTPUT = false; }
public function setUp() { \samson\core\Error::$OUTPUT = false; $this->instance = \samson\core\Service::getInstance('\\samsonphp\\upload\\UploadController'); $this->instance->fs = \samson\core\Service::getInstance('\\samsonphp\\fs\\FileService'); $this->instance->fs->loadExternalService('\\samsonphp\\fs\\LocalFileService'); }
/** Tests init */ public function setUp() { // Get instance using services factory as error will signal other way $this->router = \samson\core\Service::getInstance('samson\\router\\Router'); // Initialize service $this->router->init(array()); }
/** * */ public function setUp() { \samson\core\Error::$OUTPUT = false; // Create S3 mock $this->request = $this->getMockBuilder('\\samsonphp\\google\\translate\\Request')->disableOriginalConstructor()->getMock(); $this->instance = \samson\core\Service::getInstance('\\samsonphp\\google\\translate\\Translate'); }
/** * Test initialization */ public function setUp() { \samson\core\Error::$OUTPUT = false; // Create Request mock $this->request = $this->getMockBuilder('\\samson\\instagram\\Request')->disableOriginalConstructor()->getMock(); $this->instance = \samson\core\Service::getInstance('\\samson\\instagram\\Instagram'); $this->instance->init(); $this->instance->request =& $this->request; }
public function setUp() { \samson\core\Error::$OUTPUT = false; // Create Server Handler mock $this->serverHandler = $this->getMockBuilder('\\samson\\upload\\ServerHandler')->disableOriginalConstructor()->getMock(); $this->instance = \samson\core\Service::getInstance('\\samson\\upload\\UploadController'); $this->instance->fs = \samson\core\Service::getInstance('\\samsonphp\\fs\\FileService'); $this->instance->fs->loadExternalService('\\samsonphp\\fs\\LocalFileService'); $this->instance->serverHandler =& $this->serverHandler; }
/** Tests init */ public function setUp() { Error::$OUTPUT = false; $this->deploy = Service::getInstance('\\samsonphp\\deploy\\Deploy'); $this->deploy->remote = $this->getMockBuilder('\\samsonphp\\deploy\\Remote')->disableOriginalConstructor()->getMock(); $this->deploy->wwwroot = 'test'; $this->deploy->host = 'test'; $this->deploy->username = '******'; $this->deploy->password = '******'; $this->deploy->sourceroot = sys_get_temp_dir() . '/'; }
/** * Initialize module * @param array $params * @return bool */ public function init(array $params = array()) { // Check configuration if (!isset($this->sourceroot[0])) { return $this->error('Local project folder[' . $this->sourceroot . '] is not specified'); } // Check configuration if (!isset($this->wwwroot[0])) { return $this->error('Remote project folder[' . $this->wwwroot . '] is not specified'); } return parent::init($params); }
/** Tests init */ public function setUp() { // Disable default error output \samson\core\Error::$OUTPUT = false; // Get instance using services factory as error will signal other way $this->fileService = \samson\core\Service::getInstance('samson\\fs\\FileService'); // Init with unreal file service $this->fileService->fileServiceClassName = 'samson\\fs\\test'; $this->fileService->prepare(); $this->fileService->init(); // Normal init $this->fileService->fileServiceClassName = 'samson\\fs\\LocalFileService'; $this->fileService->prepare(); $this->fileService->init(); }
/** * Initialize module * @param array $params * @return bool */ public function init(array $params = array()) { // Check configuration if (!isset($this->sourceroot[0])) { $this->log('Local folder[##] is not specified', $this->sourceroot); return false; } // Check configuration if (!isset($this->sourceroot[0])) { $this->log('Remote folder[##] is not specified', $this->wwwroot); return false; } return parent::init($params); }