當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PhraseanetTestCase::setUp方法代碼示例

本文整理匯總了PHP中PhraseanetTestCase::setUp方法的典型用法代碼示例。如果您正苦於以下問題:PHP PhraseanetTestCase::setUp方法的具體用法?PHP PhraseanetTestCase::setUp怎麽用?PHP PhraseanetTestCase::setUp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PhraseanetTestCase的用法示例。


在下文中一共展示了PhraseanetTestCase::setUp方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     $this->name = 'name-' . mt_rand();
     $this->email = sprintf('name-%s@domain-%s.com', mt_rand(), mt_rand());
     $this->object = new Receiver($this->name, $this->email);
 }
開發者ID:luisbrito,項目名稱:Phraseanet,代碼行數:7,代碼來源:ReceiverTest.php

示例2: setUp

 public function setUp()
 {
     parent::setUp();
     $this->file = __DIR__ . '/tmp-file.php';
     $this->compiler = new Compiler();
     $this->clean();
 }
開發者ID:luisbrito,項目名稱:Phraseanet,代碼行數:7,代碼來源:ManagerTest.php

示例3: setUp

 public function setUp()
 {
     parent::setUp();
     $this->object = new Bridge_Api_Auth_OAuth2();
     $this->parameters = ['client_id' => "client_id", 'client_secret' => "client_secret", 'redirect_uri' => "redirect_uri", 'scope' => 'super_scope', 'response_type' => 'code', 'token_endpoint' => "one_token_endpoint", 'auth_endpoint' => "one_auth_endpoint"];
     $this->mockSettings = $this->getMock("Bridge_AccountSettings", ["get", "set"], [], "", false);
 }
開發者ID:nlegoff,項目名稱:Phraseanet,代碼行數:7,代碼來源:OAuth2Test.php

示例4: setUp

 public function setUp()
 {
     parent::setUp();
     $published = new Zend_Gdata_App_Extension_Published("2011-10-21 12:00:00");
     $updated = new Zend_Gdata_App_Extension_Updated("2011-10-21 12:20:00");
     $id = new Zend_Gdata_App_Extension_Id("Az2cv12");
     $rating = new Zend_Gdata_Extension_Rating(4, 1, 5, 200, 4);
     $duration = new Zend_Gdata_YouTube_Extension_Duration(80);
     $player = new Zend_Gdata_Media_Extension_MediaPlayer();
     $player->setUrl("coucou");
     $stat = new Zend_Gdata_YouTube_Extension_Statistics();
     $stat->setViewCount("5");
     $thumb = new Zend_Gdata_Media_Extension_MediaThumbnail('une url', '120', '90');
     $media = new Zend_Gdata_YouTube_Extension_MediaGroup();
     $media->setPlayer([$player]);
     $media->setDuration($duration);
     $media->setVideoId($id);
     $media->setThumbnail([$thumb]);
     $entry = new Zend_Gdata_YouTube_VideoEntry();
     $entry->setMajorProtocolVersion(2);
     $entry->setMediaGroup($media);
     $entry->setStatistics($stat);
     $entry->setRating($rating);
     $entry->setVideoCategory("category");
     $entry->setVideoDescription("one description");
     $entry->setVideoPrivate();
     $entry->setVideoTags(['tags']);
     $entry->setVideoTitle("hellow");
     $entry->setUpdated($updated);
     $entry->setPublished($published);
     $this->object = new Bridge_Api_Youtube_Element($entry, 'video');
 }
開發者ID:nlegoff,項目名稱:Phraseanet,代碼行數:32,代碼來源:ElementTest.php

示例5: setUp

 public function setUp()
 {
     parent::setUp();
     $mock = $this->getMockBuilder('Alchemy\\Phrasea\\Authentication\\Authenticator')->disableOriginalConstructor()->setMethods(array('getUser'))->getMock();
     $mock->expects($this->any())->method('getUser')->will($this->returnValue(self::$DI['user']));
     self::$DI['app']['authentication'] = $mock;
 }
開發者ID:luisbrito,項目名稱:Phraseanet,代碼行數:7,代碼來源:abstractReportTestCase.php

示例6: setUp

 /**
  * @covers Alchemy\Phrasea\Border\File::__construct
  */
 public function setUp()
 {
     parent::setUp();
     $this->filename = __DIR__ . '/../../../../../tmp/iphone_pic.jpg';
     copy(__DIR__ . '/../../../../files/iphone_pic.jpg', $this->filename);
     $this->media = self::$DI['app']['mediavorus']->guess($this->filename);
     $this->object = new File(self::$DI['app'], $this->media, self::$DI['collection'], 'originalName.txt');
 }
開發者ID:luisbrito,項目名稱:Phraseanet,代碼行數:11,代碼來源:FileTest.php

示例7: setUp

 public function setUp()
 {
     parent::setUp();
     $this->control = new UserProvider(self::$DI['app']);
     $this->object = new Term($this->value, $this->context);
     $this->basicObject = new Term($this->basicValue);
     $this->objectWithControl = new Term($this->value2, $this->context2, $this->control, $this->id);
 }
開發者ID:nlegoff,項目名稱:Phraseanet,代碼行數:8,代碼來源:TermTest.php

示例8: setUp

 public function setUp()
 {
     parent::setUp();
     $this->account = API_OAuth2_Account::load_with_user(self::$DI['app'], self::$DI['oauth2-app-user'], self::$DI['user']);
     $expires = time() + 100;
     $this->code = random::generatePassword(8);
     $this->object = API_OAuth2_AuthCode::create(self::$DI['app'], $this->account, $this->code, $expires);
 }
開發者ID:romainneutron,項目名稱:Phraseanet,代碼行數:8,代碼來源:AuthCodeTest.php

示例9: setUp

 /**
  * @covers Alchemy\Phrasea\Border\Attribute\Attribute
  * @covers Alchemy\Phrasea\Border\Attribute\Metadata::__construct
  */
 public function setUp()
 {
     parent::setUp();
     $tag = new ObjectName();
     $value = new Mono('Stockhausen !');
     $this->metadata = new ExiftoolMeta($tag, $value);
     $this->object = new Metadata($this->metadata);
 }
開發者ID:luisbrito,項目名稱:Phraseanet,代碼行數:12,代碼來源:MetadataTest.php

示例10: setUp

 public function setUp()
 {
     parent::setUp();
     if (!function_exists('xcache_info')) {
         $this->markTestSkipped('Xcache not loaded');
     }
     $this->object = new XcacheCache();
 }
開發者ID:luisbrito,項目名稱:Phraseanet,代碼行數:8,代碼來源:XcacheCacheTest.php

示例11: setUp

 public function setUp()
 {
     parent::setUp();
     $this->root = __DIR__ . '/root';
     if (!is_dir($this->root)) {
         mkdir($this->root);
     }
 }
開發者ID:luisbrito,項目名稱:Phraseanet,代碼行數:8,代碼來源:LogFileTestCase.php

示例12: setUp

 public function setUp()
 {
     parent::setUp();
     $this->object = new Sha256(self::$DI['app']);
     $this->filename = __DIR__ . '/../../../../../../tmp/test001.jpg';
     copy(__DIR__ . '/../../../../../files/test001.jpg', $this->filename);
     $this->media = self::$DI['app']['mediavorus']->guess($this->filename);
 }
開發者ID:romainneutron,項目名稱:Phraseanet,代碼行數:8,代碼來源:Sha256Test.php

示例13: setUp

 public function setUp()
 {
     parent::setUp();
     $this->account = API_OAuth2_Account::load_with_user(self::$DI['app'], self::$DI['oauth2-app-user'], self::$DI['user']);
     $expires = time() + 100;
     $this->token = random::generatePassword(8);
     $this->scope = 'scopidou';
     $this->object = API_OAuth2_RefreshToken::create(self::$DI['app'], $this->account, $expires, $this->token, $this->scope);
 }
開發者ID:romainneutron,項目名稱:Phraseanet,代碼行數:9,代碼來源:RefreshTokenTest.php

示例14: setUp

 /**
  * @covers Alchemy\Phrasea\Border\Checker\CheckerInterface
  * @covers Alchemy\Phrasea\Border\Checker\Filename::__construct
  */
 public function setUp()
 {
     parent::setUp();
     // initialize record so that it already exist
     $record = self::$DI['record_1'];
     $this->object = new Filename(self::$DI['app']);
     $this->filename = __DIR__ . '/../../../../../../tmp/test001.jpg';
     copy(__DIR__ . '/../../../../../files/test001.jpg', $this->filename);
     $this->media = self::$DI['app']['mediavorus']->guess($this->filename);
 }
開發者ID:nlegoff,項目名稱:Phraseanet,代碼行數:14,代碼來源:FilenameTest.php

示例15: setUp

 public function setUp()
 {
     parent::setUp();
     $_SERVER['SERVER_SOFTWARE'] = 'apache';
     $this->objects['apache'] = new system_server();
     $_SERVER['SERVER_SOFTWARE'] = 'nginx';
     $this->objects['nginx'] = new system_server();
     $_SERVER['SERVER_SOFTWARE'] = 'lighttpd';
     $this->objects['lighttpd'] = new system_server();
 }
開發者ID:romainneutron,項目名稱:Phraseanet,代碼行數:10,代碼來源:serverTest.php


注:本文中的PhraseanetTestCase::setUp方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。