当前位置: 首页>>代码示例>>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;未经允许,请勿转载。