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


PHP Client::followRedirects方法代碼示例

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


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

示例1: setUp

 protected function setUp()
 {
     $this->client = static::createClient();
     $this->client->followRedirects(true);
     $this->crawler = $this->client->request('GET', self::LOGIN_URL);
     $this->loginForm = $this->crawler->selectButton(self::LOGIN_BUTTON)->form();
 }
開發者ID:GrossumUA,項目名稱:Symfony3-Base-Instance,代碼行數:7,代碼來源:AbstractLoginTest.php

示例2: setUp

 public function setUp()
 {
     parent::setUp();
     $this->loadFixtures(["Dende\\Bundle\\AppBundle\\DataFixtures\\ORM\\TasksData", "Dende\\Bundle\\AppBundle\\DataFixtures\\ORM\\TodoListsData"]);
     $this->client = static::makeClient();
     $this->client->followRedirects(true);
 }
開發者ID:uirapuru,項目名稱:test-phing,代碼行數:7,代碼來源:BaseFunctionalTest.php

示例3: doLogin

 /**
  * Do login with username
  *
  * @param string $username
  */
 private function doLogin($username = 'admin')
 {
     $crawler = $this->client->request('GET', $this->getUrl('fos_user_security_login', array()));
     $form = $crawler->selectButton('_submit')->form(array('_username' => $username, '_password' => 'qwerty'));
     $this->client->submit($form);
     $this->assertTrue($this->client->getResponse()->isRedirect());
     $this->client->followRedirects();
 }
開發者ID:alienpham,項目名稱:portfolio,代碼行數:13,代碼來源:UploadControllerTest.php

示例4: setUp

 /**
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->faker = $this->getContainer()->get("hautelook_alice.faker");
     error_reporting(E_ALL & ~E_USER_DEPRECATED);
     $this->client = static::makeClient();
     $this->client->followRedirects(true);
     $this->fixtures = $this->loadFixtureFiles(['@AppBundle/DataFixtures/ORM/test/calendars.yml', '@AppBundle/DataFixtures/ORM/test/events.yml', '@AppBundle/DataFixtures/ORM/test/occurrences.yml', '@AppBundle/DataFixtures/ORM/test/workshops.yml', '@AppBundle/DataFixtures/ORM/test/lessons.yml']);
 }
開發者ID:uirapuru,項目名稱:evento,代碼行數:12,代碼來源:BaseFunctionalTestCase.php

示例5: testTicketChangePriority

 /**
  * изменение приоритета/показ флеша
  */
 public function testTicketChangePriority()
 {
     $this->client->followRedirects();
     $crawler = $this->client->request('GET', '/ticket/6/show?_locale=ru');
     $form = $crawler->selectButton('Message[changePriority]')->form();
     /** @var $priority ChoiceFormField */
     $priority = $form['Message[priority]'];
     $priorityOptions = $priority->availableOptionValues();
     $priority->select($priorityOptions[1]);
     $crawler = $this->client->submit($form);
     static::assertTrue($this->client->getResponse()->isSuccessful(), 'response status is 2xx');
     static::assertGreaterThan(0, $crawler->filter('html:contains("Приоритет изменен")')->count());
 }
開發者ID:dreamlex,項目名稱:ticketbundle,代碼行數:16,代碼來源:TicketControllerTest.php

示例6: setUp

 public function setUp()
 {
     parent::setUp();
     $this->client = static::createClient();
     $this->client->followRedirects(true);
 }
開發者ID:cegeka,項目名稱:symfony-toolkit,代碼行數:6,代碼來源:FunctionalBase.php

示例7: startFollowingRedirects

 /**
  * Enables automatic redirects to be followed by the client
  */
 public function startFollowingRedirects()
 {
     $this->client->followRedirects(true);
 }
開發者ID:yurireeis,項目名稱:CodeCeptionTest,代碼行數:7,代碼來源:REST.php


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