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


PHP Client::getHistory方法代碼示例

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


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

示例1: testUploadThemeNoParentFolder

 /**
  * Test if we can upload a theme with a zip that contains only the files (not wrapped in a parent folder).
  *
  * @return void
  */
 public function testUploadThemeNoParentFolder()
 {
     // Generate zip with no info.xml
     $this->fileName = tempnam(sys_get_temp_dir(), 'Theme');
     $filePath = $this->fileName . '.zip';
     $baseName = self::THEME_NAME;
     $archive = new ZipArchive();
     $archive->open($filePath, ZipArchive::CREATE);
     $archive->addFromString('info.xml', $this->getSampleInfoXmlContents($baseName));
     $archive->close();
     if (file_exists($archive->filename)) {
         throw new FileNotFoundException('Could not create zip file with theme');
     }
     $this->submitThemeUploadForm();
     // We should get a 200 and be redirected to the themes index page.
     self::assertEquals(200, $this->client->getResponse()->getStatusCode());
     self::assertContains(self::URL_THEMES_INDEX, $this->client->getHistory()->current()->getUri());
     self::assertContains(self::THEME_NAME, $this->client->getResponse()->getContent());
 }
開發者ID:forkcms,項目名稱:forkcms,代碼行數:24,代碼來源:UploadThemeTest.php

示例2: runTroughStep5

 /**
  * @param \Symfony\Component\DomCrawler\Crawler $crawler
  * @param \Symfony\Bundle\FrameworkBundle\Client $client
  *
  * @return mixed
  */
 private function runTroughStep5($crawler, $client)
 {
     $form = $crawler->selectButton('Finish installation')->form();
     $client->submit($form, array('install_login[email]' => 'test@test.com', 'install_login[password][first]' => 'password', 'install_login[password][second]' => 'password'));
     $crawler = $client->followRedirect();
     // we should be redirected to step 6
     self::assertEquals(200, $client->getResponse()->getStatusCode());
     self::assertStringEndsWith('/install/6', $client->getHistory()->current()->getUri());
     self::assertGreaterThan(0, $crawler->filter('h2:contains("Installation complete")')->count());
     return $crawler;
 }
開發者ID:forkcms,項目名稱:forkcms,代碼行數:17,代碼來源:InstallerControllerTest.php

示例3: assertIs404

 /**
  * @param Client $client
  */
 protected function assertIs404($client)
 {
     $client->followRedirect();
     $this->assertEquals(404, $client->getResponse()->getStatusCode());
     $this->assertStringEndsWith('404', $client->getHistory()->current()->getUri());
 }
開發者ID:biggtfish,項目名稱:forkcms,代碼行數:9,代碼來源:WebTestCase.php

示例4: assertCurrentRoute

 protected function assertCurrentRoute($route, $param = [])
 {
     $this->assertEquals($this->generateUrl($route, $param), $this->client->getHistory()->current()->getUri());
 }
開發者ID:xtrasmal,項目名稱:iinano,代碼行數:4,代碼來源:WebTestCasePlus.php

示例5: getHistory

 /**
  * Returns the History instance.
  *
  * @return History A History instance
  *
  * @api
  */
 public function getHistory()
 {
     return $this->subject->getHistory();
 }
開發者ID:kleijnweb,項目名稱:swagger-bundle,代碼行數:11,代碼來源:ApiTestClient.php


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