當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。