当前位置: 首页>>代码示例>>PHP>>正文


PHP Client::setServerParameters方法代码示例

本文整理汇总了PHP中Symfony\Bundle\FrameworkBundle\Client::setServerParameters方法的典型用法代码示例。如果您正苦于以下问题:PHP Client::setServerParameters方法的具体用法?PHP Client::setServerParameters怎么用?PHP Client::setServerParameters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Symfony\Bundle\FrameworkBundle\Client的用法示例。


在下文中一共展示了Client::setServerParameters方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: logout

 public function logout()
 {
     $this->client->setServerParameters(array());
     $this->client->getCookieJar()->clear();
     $this->user = null;
     $this->pageEleveur = null;
 }
开发者ID:apflieger,项目名称:zigotoo,代码行数:7,代码来源:TestUtils.php

示例2: setUp

 protected function setUp()
 {
     static::$client = static::createClient();
     $container = static::$client->getContainer();
     $sapiToken = $container->getParameter('storage_api.test.token');
     $sapiUrl = $container->getParameter('storage_api.test.url');
     static::$client->setServerParameters(array('HTTP_X-StorageApi-Token' => $sapiToken));
 }
开发者ID:keboola,项目名称:google-analytics-bundle,代码行数:8,代码来源:MailerTest.php

示例3: setUp

 /**
  * Setup HTTP client, command runner and Storage API client for each test
  */
 protected function setUp()
 {
     $this->httpClient = static::createClient();
     $container = $this->httpClient->getContainer();
     if (!$this->storageApiToken) {
         $this->storageApiToken = $container->getParameter('storage_api.test.token');
     }
     $this->httpClient->setServerParameters(['HTTP_X-StorageApi-Token' => $this->storageApiToken]);
     $this->jobMapper = $container->get('syrup.elasticsearch.current_component_job_mapper');
     $application = new Application($this->httpClient->getKernel());
     $application->add(new JobCommand());
     $command = $application->find('syrup:run-job');
     $this->commandTester = new CommandTester($command);
     $this->storageApiClient = new StorageApiClient(['token' => $this->storageApiToken, 'url' => $container->getParameter('storage_api.test.url')]);
 }
开发者ID:ErikZigo,项目名称:syrup,代码行数:18,代码来源:AbstractFunctionalTest.php

示例4: createClient

 /**
  * {@inheritdoc}
  */
 protected static function createClient(array $options = array(), array $server = array())
 {
     static::bootKernel($options);
     $client = new Client(static::$kernel);
     $client->setServerParameters($server);
     return $client;
 }
开发者ID:hhamon,项目名称:slack-secret-santa,代码行数:10,代码来源:SantaControllerTest.php

示例5: setUp

 protected function setUp()
 {
     self::$client = static::createClient();
     $this->container = self::$client->getContainer();
     $sapiToken = $this->container->getParameter('storage_api.test.token');
     $sapiUrl = $this->container->getParameter('storage_api.test.url');
     self::$client->setServerParameters(array('HTTP_X-StorageApi-Token' => $sapiToken));
     $this->storageApi = new SapiClient(['token' => $sapiToken, 'url' => $sapiUrl, 'userAgent' => 'ex-db']);
     $this->manager = new Manager($this->storageApi, $this->componentName);
     // Cleanup
     $sysBucketId = $this->manager->getSysBucketId();
     $accTables = $this->storageApi->listTables($sysBucketId);
     foreach ($accTables as $table) {
         $this->storageApi->dropTable($table['id']);
     }
 }
开发者ID:keboola,项目名称:db-extractor-bundle,代码行数:16,代码来源:ExtractorTest.php

示例6: request

 /**
  * {@inheritdoc}
  */
 public function request($method, $uri, array $parameters = array(), array $files = array(), array $server = array(), $content = null, $changeHistory = true)
 {
     if (strpos($uri, 'http://') === false) {
         $uri = self::LOCAL_URL . $uri;
     }
     if ($this->getServerParameter('HTTP_X-WSSE', '') !== '' && !isset($server['HTTP_X-WSSE'])) {
         //generate new WSSE header
         parent::setServerParameters(WebTestCase::generateWsseAuthHeader());
     }
     return parent::request($method, $uri, $parameters, $files, $server, $content, $changeHistory);
 }
开发者ID:Maksold,项目名称:platform,代码行数:14,代码来源:Client.php

示例7: setUp

 protected function setUp()
 {
     self::$client = static::createClient();
     $container = self::$client->getContainer();
     $sapiToken = $container->getParameter('storage_api.test.token');
     $sapiUrl = $container->getParameter('storage_api.test.url');
     self::$client->setServerParameters(array('HTTP_X-StorageApi-Token' => $sapiToken));
     $this->storageApi = new SapiClient(['token' => $sapiToken, 'url' => $sapiUrl, 'userAgent' => $this->componentName]);
     $this->encryptor = $container->get('syrup.encryptor');
     $this->configuration = $container->get('ex_google_drive.configuration');
     $this->configuration->setStorageApi($this->storageApi);
     try {
         $this->configuration->create();
     } catch (\Exception $e) {
         // bucket exists
     }
     // Cleanup
     $sysBucketId = $this->configuration->getSysBucketId();
     $tableId = $sysBucketId . '.' . $this->accountId;
     if ($this->storageApi->tableExists($tableId)) {
         $this->storageApi->dropTable($tableId);
     }
 }
开发者ID:keboola,项目名称:google-drive-bundle,代码行数:23,代码来源:ExtractorTest.php

示例8: setUp

 protected function setUp($driver = null)
 {
     self::$client = static::createClient();
     $this->container = self::$client->getContainer();
     $sapiToken = $this->container->getParameter('storage_api.test.token');
     $sapiUrl = $this->container->getParameter('storage_api.test.url');
     self::$client->setServerParameters(['HTTP_X-StorageApi-Token' => $sapiToken]);
     $this->storageApi = new SapiClient(['token' => $sapiToken, 'url' => $sapiUrl, 'userAgent' => $this->componentName]);
     if ($driver != null) {
         $this->configuration = new Configuration($this->componentName . '-' . $driver, $this->storageApi, $driver);
     } else {
         $this->configuration = new Configuration($this->componentName, $this->storageApi);
     }
     // Cleanup
     $sysBucketId = $this->configuration->getSysBucketId($this->writerId);
     if ($this->storageApi->bucketExists($sysBucketId)) {
         $accTables = $this->storageApi->listTables($sysBucketId);
         foreach ($accTables as $table) {
             $this->storageApi->dropTable($table['id']);
         }
         $this->storageApi->dropBucket($sysBucketId);
     }
 }
开发者ID:keboola,项目名称:db-writer-bundle,代码行数:23,代码来源:AbstractTest.php

示例9: setupStorageApi

 /**
  * Setup storage api from AbstractTest::storageApiToken
  */
 protected function setupStorageApi()
 {
     $this->httpClient->setServerParameters(array('HTTP_X-StorageApi-Token' => $this->storageApiToken));
     $this->storageApi = new StorageApiClient(array('token' => $this->storageApiToken, 'url' => TEST_ORCHESTRATOR_SAPI_URL));
     $this->token = new StorageApiToken($this->storageApi);
 }
开发者ID:keboola,项目名称:orchestrator-bundle,代码行数:9,代码来源:AbstractTest.php

示例10: setServerParameters

 /**
  * Sets server parameters.
  *
  * @param array $server An array of server parameters
  *
  * @api
  */
 public function setServerParameters(array $server)
 {
     $this->subject->setServerParameters($server);
 }
开发者ID:kleijnweb,项目名称:swagger-bundle,代码行数:11,代码来源:ApiTestClient.php


注:本文中的Symfony\Bundle\FrameworkBundle\Client::setServerParameters方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。