本文整理汇总了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);
}
示例2: setUp
public function setUp()
{
parent::setUp();
$this->file = __DIR__ . '/tmp-file.php';
$this->compiler = new Compiler();
$this->clean();
}
示例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);
}
示例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');
}
示例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;
}
示例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');
}
示例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);
}
示例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);
}
示例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);
}
示例10: setUp
public function setUp()
{
parent::setUp();
if (!function_exists('xcache_info')) {
$this->markTestSkipped('Xcache not loaded');
}
$this->object = new XcacheCache();
}
示例11: setUp
public function setUp()
{
parent::setUp();
$this->root = __DIR__ . '/root';
if (!is_dir($this->root)) {
mkdir($this->root);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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();
}