Пример #1
0
 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');
 }
Пример #2
0
 /** 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;
 }
Пример #3
0
 /**
  *
  */
 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');
 }
Пример #4
0
 public function setUp()
 {
     \samson\core\Error::$OUTPUT = false;
     /* $module = $this->getMockBuilder('\samson\core\ExternalModule')->getMock();
        $this->database = $this->getMockBuilder('\samson\activerecord\dbQuery')->getMock();
        $this->database->expects($this->any())->method($this->anything())->will($this->returnSelf());
        $this->collection = new Filtered($module, $this->database, new \samson\pager\Pager());*/
 }
Пример #5
0
 /**
  * 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;
 }
Пример #6
0
 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;
 }
Пример #7
0
 /** Tests init */
 public function setUp()
 {
     \samson\core\Error::$OUTPUT = false;
     // Create Request mock
     $this->query = $this->getMockBuilder('\\samsonframework\\orm\\Query')->disableOriginalConstructor()->getMock();
     $materialfield = $this->getMockBuilder(MaterialField::ENTITY)->disableOriginalConstructor()->getMock();
     $gallery = $this->getMockBuilder(CMS::MATERIAL_IMAGES_RELATION_ENTITY)->disableOriginalConstructor()->getMock();
     $this->query->method('entity')->willReturn($this->query);
     $this->query->method('first')->willReturn($materialfield);
     $this->query->method('exec')->willReturn(array($gallery));
     $this->query->method('where')->willReturn($this->query);
     $this->query->method('count')->willReturn(10);
 }
Пример #8
0
 /** 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();
 }
Пример #9
0
 /** Tests init */
 public function setUp()
 {
     \samson\core\Error::$OUTPUT = false;
     $this->remote = new Remote('test', 'test', 'test');
 }
Пример #10
0
 public function setUp()
 {
     \samson\core\Error::$OUTPUT = false;
 }
Пример #11
0
 /** Tests init */
 public function setUp()
 {
     // Disable default error output
     \samson\core\Error::$OUTPUT = false;
     $this->i18n = new \samsonphp\i18n\i18n();
 }